Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] systemd on separate /usr with zfs root and /usr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dscherger
n00b
n00b


Joined: 08 Mar 2004
Posts: 8

PostPosted: Mon Jan 06, 2014 12:37 am    Post subject: [SOLVED] systemd on separate /usr with zfs root and /usr Reply with quote

I've just finished the gnome 3.8 upgrade, which includes systemd and I'm having problems getting the init=/usr/lib/systemd/systemd kernel command line option to work.

I think the problem is that /usr is on a separate filesystem and isn't available at boot time. Both / and /usr are zfs filesystems and /usr/lib/systemd is NOT in my initramfs, generated by genkernel-next. The initramfs does contain the usr/lib/systemd directory and usr/lib/systemd/systemd-udevd executable but not the usr/lib/systmed/systemd executable used for init.

Is there an easy way to fix this?

I'm thinking about either including everything under /usr/lib/systemd in the initramfs (can I do that with genkernel??) or convincing zfs to mount /usr before init starts (assuming that's possible??). Other ideas/options/solutions are welcome!

The messages left on my screen after booting with the init=/usr/lib/systemd/systemd kernel command line option look like:

>> Initializing root device...
>> Detected zfs root: alpha/ROOT
>> Mounting alpha/ROOT as root...
>> Detected fstype: zfs_member
>> Using mount fstype: zfs
>> Using mount opts: -o rw,zfsutil
!! The filesystem alpha/ROOT, mounted at /newroot does not contain a valid init=/usr/lib/systemd/systemd
!! Please file a bug report with this message
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

Booting without the init=/usr/lib/systemd/systemd option sort of works, although gnome doesn't get started (I get an "Oh no! Something has gone wrong" message displayed) and it appears the the old /sbin/init is running things rather than systemd.

Thanks


Last edited by dscherger on Wed Jan 08, 2014 9:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
dscherger
n00b
n00b


Joined: 08 Mar 2004
Posts: 8

PostPosted: Wed Jan 08, 2014 9:43 pm    Post subject: Reply with quote

Following up my own post with the solution that I ended up using:

The initramfs from genkernel-next actually does have provisions to mount /usr and other filesystems listed in /etc/initramfs.mounts
Appropriate ZFS entries for these additional mounts must exist in /etc/fstab for them to be mounted and I was missing these.

i.e. adding the following entry to /etc/fstab:
tank/usr /usr zfs defaults 0 0

Will cause the /usr entry in /etc/initramfs.mounts to be mounted by the initramfs before init (systemd) starts.

Not sure if this is also required but I have set the zfs mountpoint for /usr to be "legacy" as well.

Many thanks to jyxent on #zfsonlinux for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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