Start Update 03.18.15:
This is untested but I suspect if you are upgrading the kernel to 3.19.0 and you have issues you may need to change to the daily Vivid ppa. In my initial post I used stable and Utopic since Vivid was very new.
End Update 03.18.15:
This is what I did to make an Ubuntu 15.04 virtualbox guest (works for Ubuntu 14.10 also) boot with the ZFS file system.
Previous articles:
http://blog.ls-al.com/ubuntu-on-a-zfs-root-file-system-for-ubuntu-14-04/
http://blog.ls-al.com/booting-ubuntu-on-a-zfs-root-file-system/
SYSTEM REQUIREMENTS
64-bit Ubuntu Live CD. (Not the alternate or 32-bit installer)
AMD64 or EM64T compatible computer. (ie: x86-64)
15GB disk, 2GB memory minimum, Virtualbox
Create new VM. I use bridged networking in case I want to use ssh during the setup.
Start the Ubuntu LiveCD and open a terminal at the desktop. I used the 15.04 64-bit alpha CD.
Control-F1 to first text terminal.
1. Setup repo.
** Change /etc/apt/sources.list.d/... down to trusty. Or utopic possibly. I did not test.
2. Install zfs.
[ 3900.114234] ZFS: Loaded module v0.6.3-4~trusty, ZFS pool version 5000, ZFS filesystem version 5 |
** takes a long time to compile initial module for 3.16.0-28-generic
3. Install ssh.
Using a ssh terminal makes it easier to copy and paste for both command execution and documentation. However with this bare bones environment at this point openssh might not install very clean. I played with it a little to get at least sshd to run.
** check with ps if ssh process is running
** edit sshd_config and allow root login
** set root passwd
4. Setup disk partitions.
Disk /dev/loop0: 1 GiB, 1103351808 bytes, 2154984 sectors |
Units: sectors of 1 * 512 = 512 bytes |
Sector size (logical/physical): 512 bytes / 512 bytes |
I/O size (minimum/optimal): 512 bytes / 512 bytes |
Disk /dev/sda: 15 GiB, 16106127360 bytes, 31457280 sectors |
Units: sectors of 1 * 512 = 512 bytes |
Sector size (logical/physical): 512 bytes / 512 bytes |
I/O size (minimum/optimal): 512 bytes / 512 bytes |
Disk identifier: 0xc2c7def9 |
Device Boot Start End Sectors Size Id Type |
/dev/sda1 2048 411647 409600 200M be Solaris boot |
/dev/sda2 411648 31457279 31045632 14.8G bf Solaris |
5. Format partitions.
6. ZFS Setup and Mountpoints.
7. Install Ubuntu 15.04 on /mnt
I: Base system installed successfully. |
/dev/disk/by- id /ata-VBOX_HARDDISK_VBf3c0d5ba-e6881c52-part1 /boot/grub auto defaults 0 1 |
source -directory /etc/network/interfaces.d |
8. Setup chroot to update and install ubuntu-minimal
9. Setup ZOL repo
** leave grub repo off for now.
deb http://ppa.launchpad.net/zfs-native/stable/ubuntu trusty main |
** skipped grub stuff for this pass
10. Make sure root has access
11. Test grub
bash : grub-probe: command not found |
12. Use older patched grub from ZOL project
gpg: keyring `/tmp/tmp5urr4u7g/secring.gpg' created |
gpg: keyring `/tmp/tmp5urr4u7g/pubring.gpg' created |
gpg: requesting key F6B0FC61 from hkp server keyserver.ubuntu.com |
gpg: /tmp/tmp5urr4u7g/trustdb.gpg: trustdb created |
gpg: key F6B0FC61: public key "Launchpad PPA for Native ZFS for Linux" imported |
gpg: Total number processed: 1 |
gpg: imported: 1 (RSA: 1) |
deb http://ppa.launchpad.net/zfs-native/grub/ubuntu raring main |
Installation finished. No error reported. |
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/ata-VBOX_HARDDISK_VBf3c0d5ba-e6881c52-part2'. |
** As you can see grub has issues with dev path.
/boot/grub/i386-pc/zfscrypt.mod /boot/grub/i386-pc/zfsinfo.mod /boot/grub/i386-pc/zfs.mod |
** Note at the end I show a udev rule that can help work around this path issue.
linux /ROOT/ubuntu-1@/boot/vmlinuz-3.16.0-28-generic root=ZFS=rpool/ROOT/ubuntu-1 ro boot=zfs quiet splash $vt_handoff |
GRUB_CMDLINE_LINUX_DEFAULT= "quiet splash boot=zfs" |
Generating grub configuration file ... |
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. |
Found linux image: /boot/vmlinuz-3.16.0-28-generic |
Found initrd image: /boot/initrd.img-3.16.0-28-generic |
Installing for i386-pc platform. |
Installation finished. No error reported. |
13. unmount chroot and shutdown
14. Cleanup and finish
** Create snapshot
** bootup
** install ssh and configure root to login in sshd_config, restart ssh
15. udev rule for grub bug
ENV{DEVTYPE}== "partition" , IMPORT{parent}= "ID_*" , ENV{ID_FS_TYPE}== "zfs_member" , SYMLINK+= "$env{ID_BUS}-$env{ID_SERIAL} $env{ID_BUS}-$env{ID_SERIAL}-part%n" |
16. install desktop software