Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

/usr on lvm with debian-sources


Recommended Posts

I'm running the debian-sources kernel.  I have put /usr on an lvm partition.  I get the following messages during boot:

 

Mounting /dev/vg1/usr as /usr:  mount -t ext4 -o noatime,ro /dev/vg1/usr /newroot/usr

mount:  mounting /dev/vg1/usr on /newroot/usr failed:  No such file or directory

!! Unable to mount /dev/vg1/usr for /usr

>> Booting (initramfs)..

 

and then later:

 

Setting up the Logical Volume Manager ...

/etc/init.d/device-mapper:  line 65:  uniq: command not found

/etc/init.d/device-mapper:  line 64:  awk: command not found

/etc/init.d/device-mapper:  line 64:  awk: command not found

/etc/init.d/device-mapper:  line 65:  uniq: command not found

 

Awk and uniq are in /usr/bin, so /usr must not be mounted yet.  Then:

 

/dev/mapper/vg1-usr:  clean, 145293/327680 files, 645590/1310720 blocks

 

And /usr ends up mounted by the time the system boots.

 

I'm guessing initramfs is my answer.  Debian-sources provides an initramfs file, but I'm not sure if it supports lvm and I'm not sure what to specify in grub.  I tried adding 'lvm' to the boot parameters, but that didn't change anything as far as I could tell.

Link to comment
Share on other sites

Linux funtoo 3.19.3-1~exp1 #1 SMP Mon May 18 05:17:08 2015 x86_64 Intel® Core2 Duo CPU E4500 @ 2.20GHz GenuineIntel GNU/Linux

The pre-compiled kernel has the LVM compile options enabled, I checked mine here: /usr/src/linux-debian-sources-3.19.3/.config

I use this guide:

http://www.funtoo.org/LVM_Install_Guide

Starting here:

Build initramfs (genkernel):

Link to comment
Share on other sites

Thanks for the pointer, cardinal.

 

Here's what I've done:

 

'emerge genkernel'

'genkernel --lvm initramfs'

Edited /etc/boot.conf:

    added 'dolvm' to parms, like this:    params += dolvm real_root=auto rootfstype=auto

    updated initrd line, like this:             initrd initramfs-genkernel-x86-3.19.3-1~exp1

'boot-update'

 

I checked /boot/grub/grub.cfg and it looks good to me.  Unfortunately I'm getting the same errors as before.  My system boots, but it mounts /usr late in the boot process.

 

I've tried several variations of the params line, including hard-coding real_root and rootfstype instead of setting them to 'auto'.  Nothing has worked so far.  Am I doing something wrong or is this a bug?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...