Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

boot-update error with LVM


hick518

Question

I have a new install using LVM for the root filesystem. 

 

When I run boot-update, I get:

Copyright 2009-2015 Funtoo Technologies

 [use option "-l" for license info, "-h" for help]

 * Generating config for grub...

 * NOTE : Detected MBR boot. Configuring for Legacy MBR booting.
 * ERROR : (rootfstype=auto) - cannot find a valid / entry in /etc/fstab.
 * ERROR : No matching kernels or boot entries found in /etc/boot.conf.
 * Did not complete successfully.

/etc/boot.conf looks like this:

boot {
        generate grub
        default "Funtoo Linux genkernel lvm" 
        timeout 3 
}

"Funtoo Linux genkernel lvm" {
        kernel kernel[-v]
        initrd initramfs-genkernel[-v]
        params += dolvm real_root=/dev/mapper/vg1-rootfs rootfstype=ext4 resume=swap:/dev/mapper/vg1-swap
} 

Notice that boot.conf does not contain rootfs=auto, yet boot-update seems to think it does.

 

Here is /etc/fstab:

/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/vg1/swap           none            swap            sw              0 0
/dev/vg1/rootfs         /               ext4            noatime         0 1

Any idea what is wrong?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Arg, I figured it out right after posting this.  I specified my LVM root partition by two different paths, although both of them are valid.

 

In boot.conf I had /dev/mapper/vg1-rootfs

In fstab I had /dev/vg1/rootfs (which is a symbolic link to /dev/mapper/vg1-rootfs)

 

Once I made them the same, boot-update worked.

 

I realized two other mistakes I made, which I would like to point out. 

 

1)  In boot.conf I had this:

        kernel kernel[-v]
        initrd initramfs-genkernel[-v]

This does not work because [-v] is not a wildcard like I had thought.  It seems to be a variable which gets its value from the kernel line.  On my system the kernel is 'kernel-debian-sources-x86_64-4.4.6-1'.  So I think [-v] equals '-debian-sources-x86_64-4.4.6-1'.  Boot-update cannot find a match for my initrd line, which would be 'initramfs-genkernel-debian-sources-x86_64-4.4.6-1' -- that file does not exist.  I thought my initrd line would match to initramfs-genkernel-x86_64-4.4.6-1, but I was wrong about that.

 

The other mistake I made is that I do not need the genkernel initramfs at all.  The debian one works fine for an LVM root filesystem.

 

So my files now look like this, and my system is bootable.

 

/etc/boot.conf:

boot {
        generate grub
        default "Funtoo Linux genkernel lvm" 
        timeout 3 
}

"Funtoo Linux genkernel lvm" {
        kernel kernel[-v]
        initrd initramfs[-v]
        params += dolvm real_root=/dev/vg1/rootfs rootfstype=ext4 resume=swap:/dev/mapper/vg1-swap

/etc/fstab:

/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/vg1/swap           none            swap            sw              0 0
/dev/vg1/rootfs         /               ext4            noatime         0 1

boot-update configures grub.cfg with the following kernel and initrd:

kernel-debian-sources-x86_64-4.4.6-1
initramfs-debian-sources-x86_64-4.4.6-1

Sorry for the noise!

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...