Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to use systemd on my Gentoo box. Unfortunately, I have /usr on a separate partition and Gentoo puts libdbus into /usr/lib, leading to a segfault on boot, since systemd relies on dbus.

Hence I would like to generate an initramfs using dracut that mounts /usr for me. This partition is on an md raid. I think that I have setup dracut correctly to include mdadm, but somehow it does not mount /usr

I think that it is configured to only mount the root partition by default, even if it detects other partitions.

How can I tell dracut to mount /usr also before switching to the real init?

share|improve this question
    
Just curios, Is there a good reason to put /usr on a separate partition? –  user606723 Aug 4 '11 at 20:32
    
Not in my case, no. It's just that it is a bit complicated to change this in the current setup, and I thought that creating an initramfs using dracut would be a simple task that solved the problem until I manage to repartition the machine. –  lytenyn Aug 5 '11 at 6:29

2 Answers 2

I may have found a solution by digging through a lot of forums. For a cross-distribution framework, documentation certainly is scarce.

There is a dracut-module called fstab-sys, which reads /etc/fstab.sys and mounts all partitions mentioned there. The format is the same as the one of /etc/fstab.

To sum up, I had to create /etc/fstab.sys containing /usr/ and create the dracut image with something like

dracut -a fstab-sys --mdadmconf -H "" <kernel_version>

Warning: I could not test this yet. I will remove this warning once this is verified.

share|improve this answer
    
Unfortunately, I could not verify this yet, since I seem to have problems with the mdraid module also.. –  lytenyn Aug 15 '11 at 7:27
    
It does not work. But it might be a dracut bug, since I am fairly sure this is how it is supposed to be... –  lytenyn Sep 8 '11 at 15:50

From dracut-012 NEWS:

 ...
 8 - try to mount /usr, if init points to a path in /usr
 ...
share|improve this answer
    
Thank you, that is indeed interesting but will not help, since systemd is at /bin/systemd, it just uses libdbus which is in /usr/lib. –  lytenyn Aug 15 '11 at 7:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.