105 lines
3.1 KiB
Plaintext
105 lines
3.1 KiB
Plaintext
= Install ZFS on Ubuntu =
|
|
|
|
# Repos hinzufügen, unbedingt durchlaufen lassen!
|
|
sudo -i
|
|
apt-add-repository --yes ppa:zfs-native/daily
|
|
apt-get update
|
|
apt-get install debootstrap ubuntu-zfs
|
|
# check to see zfs
|
|
modprobe zfs
|
|
dmesg | grep ZFS
|
|
# -> ZFS: Loaded module v0.6.0.89-rc12, ZFS pool version 28, ZFS filesystem version 5
|
|
cfdisk
|
|
# 100MB bootable Partition mit Type BE
|
|
# restlicher Platz mit Type BF
|
|
# checken und anzeigen lassen
|
|
fdisk -l /dev/disk/by-id/scsi-SATA_disk1
|
|
# GRUB installieren auf part-1
|
|
mke2fs -m 0 -L /boot/grub -j /dev/disk/by-id/scsi-SATA_disk1-part1
|
|
# root pool erstellen
|
|
zpool create rpool /dev/disk/by-id/scsi-SATA_disk1-part2
|
|
zfs create rpool/ROOT
|
|
zfs create rpool/ROOT/ubuntu-1
|
|
zfs umount -a
|
|
zfs set mountpoint=/ rpool/ROOT/ubuntu-1
|
|
# Kompression einschalten
|
|
zfs set compression=on rpool
|
|
zpool set bootfs=rpool/ROOT/ubuntu-1 rpool
|
|
zpool export rpool
|
|
# Pool importieren
|
|
zpool import -d /dev/disk/by-id -R /mnt rpool
|
|
mkdir -p /mnt/boot/grub
|
|
# part-1 beachten
|
|
mount /dev/disk/by-id/scsi-SATA_disk1-part1 /mnt/boot/grub
|
|
# Minimales System installieren
|
|
debootstrap precise /mnt
|
|
# einige Live-CD Inhalte kopieren
|
|
cp /etc/hostname /mnt/etc/
|
|
cp /etc/hosts /mnt/etc/
|
|
# /mnt/etc/fstab editieren und part-1 hinzugügen
|
|
vi /mnt/etc/fstab
|
|
# -> /dev/disk/by-id/scsi-SATA_disk1-part1 /boot/grub auto defaults 0 1
|
|
vi /mnt/etc/network/interfaces
|
|
# -> # interfaces(5) file used by ifup(8) and ifdown(8)
|
|
# -> auto lo
|
|
# -> iface lo inet loopback
|
|
# ->
|
|
# -> auto eth0
|
|
# -> iface eth0 inet dhcp
|
|
mount --bind /dev /mnt/dev
|
|
mount --bind /proc /mnt/proc
|
|
mount --bind /sys /mnt/sys
|
|
chroot /mnt /bin/bash --login
|
|
# Install PPA support
|
|
locale-gen en_US.UTF-8
|
|
locale-gen de_DE.UTF-8
|
|
apt-get update
|
|
apt-get install ubuntu-minimal python-software-properties
|
|
# im chroot ZFS installieren
|
|
apt-add-repository --yes ppa:zfs-native/daily
|
|
apt-add-repository --yes ppa:zfs-native/grub
|
|
apt-get update
|
|
apt-get install ubuntu-zfs
|
|
apt-get install zfs-initramfs
|
|
apt-get dist-upgrade
|
|
# Rootpasswort setzten
|
|
passwd root
|
|
# Quellen editieren
|
|
vi /ets/apt/sources.list
|
|
# -> deb http://archive.ubuntu.com/ubuntu precise main universe
|
|
apt-get update
|
|
# verify ZFS
|
|
grub-probe /
|
|
# -> zfs
|
|
ls /boot/grub/zfs*
|
|
# -> /boot/grub/zfs.mod /boot/grub/zfsinfo.mod
|
|
update-initramfs -c -k all
|
|
# -> update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic
|
|
update-grub
|
|
# -> Generating grub.cfg ...
|
|
# -> Found linux image: /boot/vmlinuz-3.2.0-23-generic
|
|
# -> Found initrd image: /boot/initrd.img-3.2.0-23-generic
|
|
# -> done
|
|
grep boot=zfs /boot/grub/grub.cfg
|
|
# -> linux /ROOT/ubuntu-1/@/boot/vmlinuz-3.2.0-23-generic root=/dev/sda2 ro boot=zfs $bootfs quiet splash $vt_handoff
|
|
# -> linux /ROOT/ubuntu-1/@/boot/vmlinuz-3.2.0-23-generic root=/dev/sda2 ro single nomodeset boot=zfs $bootfs
|
|
|
|
# MBR auf die Festplatte (keine Partition) schreiben
|
|
grub-install $(readlink -f /dev/disk/by-id/scsi-SATA_disk1)
|
|
# chroot verlassen
|
|
exit
|
|
# Live-CD umounten
|
|
umount /mnt/boot/grub
|
|
umount /mnt/dev
|
|
umount /mnt/proc
|
|
umount /mnt/sys
|
|
zfs umount -a
|
|
zpool export rpool
|
|
# rebooten
|
|
reboot
|
|
# als root einloggen und xubuntu nachinstallieren
|
|
apt-get install xubuntu-desktop
|
|
|
|
|
|
[ [[index|Go home]] ]
|