Jump to content

Photo

Installing Funtoo on ZFS

zfs

4 replies to this topic

#1
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationSwitzerland

Trying to follow up the installation process as described in <http://www.funtoo.or...Install_Guide>.

 

Only yesterday, however, I discovered the tutorial at <http://www.funtoo.or..._File_System>. I think I understand, now, after reading the notes there-in the problem I am stuck on (read below).  But don't know how to work-it-around. I use(d) sysresccd-4.7.0_zfs_0.6.5.4.  After staging and installing portage (both funtoo-stable), I am to the point of confirming that the zfs pool can be read.

 

I get the following error:

```
The device /dev/zfs is missing and must be created.
Try running 'udevadm trigger' as root to create it.
```

The `/dev/zfs` exists however.  And outside of the "chroot", the pool and the datasets are correctly reported.
I guess this all boils down to "5. Upgrading to zfs version >= 0.6.5.4" as per the notes in <http://www.funtoo.or...t_File_System>.

I did install zfs and zfs-kmod version 0.6.5.4-r1 (this is the one installed when requesting for emerge sys-zfs/zfs-0.6.5.4 at the moment). And still, the zpool utility does not work.

Since the
initramfs/kernel in sysresccd-4.7.0_zfs_0.6.5.4 is pre zfs-0.6.5.3 and does not understand zfs-0.6.5.4 (!?), how does an update of the kernel and initramfs, using genkernel, e.g.
```
# genkernel all --zfs --no-clean --kerneldir=/usr/src/linux -- kernel-config=/usr/src/<path_to_config> --callback="emerge -1 spl zfs-kmod zfs"
```

will solve the issue, if I can't "boot this kernel"?

 

I opted for having a dedicated boot partition (/dev/sda1) and not installing everything on ZFS.

Still, I can't make any use of grub, i.e. install it in /dev/sda. The command `grub-install` does respond with

```

Installing for x86_64-efi platform.

grub-install: error: cannot find EFI directory.

```

 

Any pointers?


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#2
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationSwitzerland

I got past the problem with zfs. I can see the zpool status report. The only missing part is to install grub. I don't understand why `grub-install` does not find the EFI directory.  There is a valid partition marked as EF02. I guess I have to report this with more details.


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#3
cardinal

cardinal

    Advanced Member

  • Members
  • PipPipPip
  • 242 posts

Funtoo Bug Report: [FL-3138] kernel of sysresccd-4.7.0_zfs_0.6.5.4 seems to be pre zfs 0.6.5.3



#4
NikosAlexandris

NikosAlexandris

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationSwitzerland

Yes, I read this.  But, this can be worked-around.  And, in fact, it's not the problem. Installing GRUB is the problem.  Is there a way to first go through the normal installtion process and have working GRUB. Then, migrate almost everything to ZFS?


Nikos Alexandris | Remote Sensing *
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3


#5
erikr

erikr

    Member

  • Members
  • PipPip
  • 28 posts

I used to run ZFS as root on Gentoo. I have not tried for Funtoo and I know that there are differences in the initramfs-file.

 

The setup I had was:

/dev/sda1     etx2 boot

/dev/sda2     zpool

 

I was using grub-legacy and sadly I am no friend of grub 2, it just won't work for me and I am not able to write my own grub-config any more.

 

The key to success was to create a initramfs with ZFS enabled. To do that I used genkernel --zfs but I did not use genkernel to build the actual kernel.

One thing though. The ZFS cache file /etc/zfs...something is included in the initramfs and used to automaticalle import the zpool and mount the root.

 

Another thing is that all cached volumes are mounted at initramfs-time. I use to have an exported pool (not the same pool as root). As the pool was imported before NFS was started it never exported the file systems. I wrote a hack in /etc/init.d/zfs to fix this and you annyhow need to add that to the open-rc.

 

There are some boot parameters needed as well. I recall dozfs nad some aditional ZFS-related flags. I sugest looking into the genkernel initramfs scipt for this.

 

And by the way, I have never manage to get EFI and those things working.

 

I now use BTRFS as root using the very same concept I had with ZFS.

 

BR
Erik





Reply to this topic



  



Also tagged with one or more of these keywords: zfs

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users