Install ZFS on Ubuntu

  1. 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

  1. check to see zfs

modprobe zfs dmesg | grep ZFS

  1. -> ZFS: Loaded module v0.6.0.89-rc12, ZFS pool version 28, ZFS filesystem version 5

cfdisk

  1. 100MB bootable Partition mit Type BE
  2. restlicher Platz mit Type BF
  3. checken und anzeigen lassen

fdisk -l /dev/disk/by-id/scsi-SATA_disk1

  1. GRUB installieren auf part-1

mke2fs -m 0 -L /boot/grub -j /dev/disk/by-id/scsi-SATA_disk1-part1

  1. 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

  1. Kompression einschalten

zfs set compression=on rpool zpool set bootfs=rpool/ROOT/ubuntu-1 rpool zpool export rpool

  1. Pool importieren

zpool import -d /dev/disk/by-id -R /mnt rpool mkdir -p /mnt/boot/grub

  1. part-1 beachten

mount /dev/disk/by-id/scsi-SATA_disk1-part1 /mnt/boot/grub

  1. Minimales System installieren

debootstrap precise /mnt

  1. einige Live-CD Inhalte kopieren

cp /etc/hostname /mnt/etc/ cp /etc/hosts /mnt/etc/

  1. /mnt/etc/fstab editieren und part-1 hinzugügen

vi /mnt/etc/fstab

  1. -> /dev/disk/by-id/scsi-SATA_disk1-part1 /boot/grub auto defaults 0 1

vi /mnt/etc/network/interfaces

  1. -> # interfaces(5) file used by ifup(8) and ifdown(8)
  2. -> auto lo
  3. -> iface lo inet loopback
  4. ->
  5. -> auto eth0
  6. -> iface eth0 inet dhcp

mount --bind /dev /mnt/dev mount --bind /proc /mnt/proc mount --bind /sys /mnt/sys chroot /mnt /bin/bash --login

  1. 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

  1. 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

  1. Rootpasswort setzten

passwd root

  1. Quellen editieren

vi /ets/apt/sources.list

  1. -> deb http://archive.ubuntu.com/ubuntu precise main universe

apt-get update

  1. verify ZFS

grub-probe /

  1. -> zfs

ls /boot/grub/zfs*

  1. -> /boot/grub/zfs.mod /boot/grub/zfsinfo.mod

update-initramfs -c -k all

  1. -> update-initramfs: Generating /boot/initrd.img-3.2.0-23-generic

update-grub

  1. -> Generating grub.cfg ...
  2. -> Found linux image: /boot/vmlinuz-3.2.0-23-generic
  3. -> Found initrd image: /boot/initrd.img-3.2.0-23-generic
  4. -> done

grep boot=zfs /boot/grub/grub.cfg

  1. -> linux /ROOT/ubuntu-1/@/boot/vmlinuz-3.2.0-23-generic root=/dev/sda2 ro boot=zfs $bootfs quiet splash $vt_handoff
  2. -> linux /ROOT/ubuntu-1/@/boot/vmlinuz-3.2.0-23-generic root=/dev/sda2 ro single nomodeset boot=zfs $bootfs
  1. MBR auf die Festplatte (keine Partition) schreiben

grub-install $(readlink -f /dev/disk/by-id/scsi-SATA_disk1)

  1. chroot verlassen

exit

  1. Live-CD umounten

umount /mnt/boot/grub umount /mnt/dev umount /mnt/proc umount /mnt/sys zfs umount -a zpool export rpool

  1. rebooten

reboot

  1. als root einloggen und xubuntu nachinstallieren

apt-get install xubuntu-desktop

[ Go home ]