Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd and a separate /usr (what is the correct way?)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
g.laber
n00b
n00b


Joined: 22 Dec 2002
Posts: 26
Location: Germany, Berlin

PostPosted: Sun Dec 22, 2013 11:48 am    Post subject: systemd and a separate /usr (what is the correct way?) Reply with quote

Hello out there,
I would like to know the right way how to set up the initramfs for using systemd on a separate /usr partition. I searched the web a long time but most discussions ended in "migrate your /usr into the root partition". This answer is a little bit strange for me. Up to now I thought windows users have to change their setup the way the system tells them an as a linux user, you tell the system what you want :-) So my problem is actualy "how to tell my wishes to the system.

If I am right, the problem is, that the /usr-partition has to be mounted directly after the root-partition and not when all the other partitions listed in fstab (because mounting fstab entries is done by systemd).
I have a full encrypted system (lvm in a luks-volume) which will be booted by using an usb-stick for kernel and initramfs.

At the moment, I am using a tuxonice-kernel and an initramfs, both build up by genkernel.
Because I have no experience in creating my own initramfs this is my (creepy) workaround:
- extract the initramfs
- change etc/initrd.d/00-rootdev.sh
- compress the initramfs again
I changed the following in etc/initrd.d/00-rootdev.sh:
old:
mount -t "auto" -o "${mopts}" "${REAL_ROOT}" "${NEW_ROOT}" && return 0
new:
mount -t "auto" -o "${mopts}" "${REAL_ROOT}" "${NEW_ROOT}" && mount -t "auto" -o "${mopts}" "/dev/dm-2" "${NEW_ROOT}/usr" && return 0

This brings my system up, but there are error messages that un-/re-/mounting of /usr has problems (is still in use).

So I would like to know what is the right way to set up /usr in initramfs.

busybox is merged with USE="sep-usr" but I do not know if this is important

Greetings

g.laber
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Sun Dec 22, 2013 12:53 pm    Post subject: Reply with quote

Check out genkernel-next instead of genkernel.
Back to top
View user's profile Send private message
g.laber
n00b
n00b


Joined: 22 Dec 2002
Posts: 26
Location: Germany, Berlin

PostPosted: Sun Dec 22, 2013 5:10 pm    Post subject: Reply with quote

Oh sorry, i wrote about genkernel because the binary is called so but I meant genkernel-next.

If systemd is installed emerge tells you not to use the "old" genkernel-package.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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