Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
About install Gentoo on ZFS
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
kimux
n00b
n00b


Joined: 25 Mar 2013
Posts: 12

PostPosted: Sat Dec 21, 2019 7:06 am    Post subject: About install Gentoo on ZFS Reply with quote

hello everyone

I'm trying to install Gentoo on ZFS

Find installation methods everywhere

There is a question: if the root partition is a ZFS file system, must initramfs be used for booting?

Because I can't find the answer, and I don't want to use initramfs

If I don't use initramfs, is there any relevant article for me
Back to top
View user's profile Send private message
steve_v
Apprentice
Apprentice


Joined: 20 Jun 2004
Posts: 152
Location: New Zealand

PostPosted: Sun Dec 22, 2019 10:34 am    Post subject: Re: About install Gentoo on ZFS Reply with quote

kimux wrote:
if the root partition is a ZFS file system, must initramfs be used for booting?
If you're talking about ZoL and it's compiled as modules, yes.
It is possible to build ZoL into the kernel, but it is considerable shagging about, and you'll have to repeat it every time the kernel sources are updated. Nobody is going to provide kernel sources with this pre-baked, due to GPL vs CDDL licence compatibility problems. Thanks a bunch for that Oracle.
Whether or not you will still need a minimal built-in initrd to set up dev nodes etc. depends on the rest of your boot configuration (i.e. mdev/udev).

This would be far too much hassle for me, unless I had a very good reason to avoid an initrd.
_________________
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Back to top
View user's profile Send private message
kimux
n00b
n00b


Joined: 25 Mar 2013
Posts: 12

PostPosted: Sun Dec 22, 2019 12:53 pm    Post subject: Re: About install Gentoo on ZFS Reply with quote

steve_v wrote:
kimux wrote:
if the root partition is a ZFS file system, must initramfs be used for booting?
If you're talking about ZoL and it's compiled as modules, yes.
It is possible to build ZoL into the kernel, but it is considerable shagging about, and you'll have to repeat it every time the kernel sources are updated. Nobody is going to provide kernel sources with this pre-baked, due to GPL vs CDDL licence compatibility problems. Thanks a bunch for that Oracle.
Whether or not you will still need a minimal built-in initrd to set up dev nodes etc. depends on the rest of your boot configuration (i.e. mdev/udev).

This would be far too much hassle for me, unless I had a very good reason to avoid an initrd.


Thanks for the answer.

I've given up ZFS

Using Btrfs :D
Back to top
View user's profile Send private message
jfp
Guru
Guru


Joined: 08 Jul 2007
Posts: 319
Location: Virginia, USA

PostPosted: Sun Dec 22, 2019 6:55 pm    Post subject: Reply with quote

About a year ago, I decided I wanted to use ZFS for my root filesystem. To do that I read quite a few HOWTOs and guides. Most of these were (only from my point of view) confusing in that they were based on non-Gentoo distributions or were too minimalist for me to understand. The guide that I finally used was written by a former Gentoo Developer Jonathan Vasquez known as Fearedbliss. His guide is sort of an overlay of the Gentoo Handbook, so it made sense to me given that I am totally unfamiliar with any other Linux distribution, but am very familiar with Gentoo since I have been using it on a daily basis since 2004. That does not make me anything like a Gentoo guru, but at least I am very familiar with working in a Gentoo environment.

Fearedbliss's guide is here https://wiki.gentoo.org/wiki/User:Fearedbliss/Installing_Gentoo_Linux_On_ZFS
As noted in that guide, you will also need his custom SystemRescueCD that includes ZFS support. (His SRCD is a bit dated, but it works perfectly up to at least sys-fs/zfs-0.7.13-r1 and sys-kernel/gentoo-sources-4.19.88. I have not tried it yet for a sys-fs/zfs-0.8.x and sys-kernel/gentoo-sources-5.x installation and therefore have no idea if it works with those newer versions although my assumption is that it will. (Fearedbliss does provide a guide on creating a new SRCD that would be based on a newer kernel and/or ZFS version and I have started working through how to do that).

There are a bunch of ways to generate an initramfs but to me the easiest is genkernel. I looked at others, such as Dracut, but found them to be beyond my abilities (or at least beyond my interest in actually trying to figure them out). Setting up genkernel to work with ZFS was actually quite simple and works perfectly, but it does use an initramfs...

If you truly cannot or do not want an initramfs, then steve_v is absolutely correct. You would need to build support for zfs into the kernel. That is yet another learning opportunity, but from what I've seen on the procedure it doesn't seem overwhelming. I'm betting that once this I've figured it out it is not going to be much of a hassle at all.

I am currently trying to figure out the zfs builtin to the kernel puzzle. To do that I am setting a virtualbox Gentoo VM with a minimal install as a playground for figuring it all out without trashing my current Gentoo installation.
_________________
jfp
Back to top
View user's profile Send private message
kimux
n00b
n00b


Joined: 25 Mar 2013
Posts: 12

PostPosted: Tue Dec 24, 2019 5:37 am    Post subject: Reply with quote

jfp wrote:

Fearedbliss's guide is here https://wiki.gentoo.org/wiki/User:Fearedbliss/Installing_Gentoo_Linux_On_ZFS


Yes, I also tried to install Gentoo once according to feedbliss's Guide

SystemRescueCD ,When booting, the screen is black. I didn't look for a solution carefully. It seems to be solved by adding the booting parameter insmod all video.But I saw it later. I didn't test it

Because I changed Ubuntu 19.10.iso made the boot Udisk.
The installation was basically successful, but when mkconfig was used to generate grub.cfg, the prompt failed to find root(probably this prompt, I can't remember clearly, I was very sleepy at that time, it was too late.Now I think maybe I need to manually configure grub.cfg file). So I didn't continue. The next day I replaced Btrfs and reinstalled Gentoo.
Maybe I'll try to use ZFS later, but so far I'm going to use Btrfs for a while

Anyway, thank you for your reply.

By the way.Build support for zfs into the kernel. It's an impossible task for me





If my English looks a little strange, that's right.Because this is the result of Google translation :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum