Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

[SOLVED] Having trouble with boot-update and LVM


xsilentmurmurx

Question

Hello all

 

I am installing a VM of Funtoo, using LVM, and I keep getting the following error after running boot-update after grub-install:

(chroot) livecd / # boot-update

boot-update 1.8.2 /
Copyright 2009-2017 Funtoo Technologies

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

  * Generating config for grub...


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

  * ERR : Did not complete successfully.

 

My /etc/boot.conf was configured to look like this:

 

(chroot) livecd / # cat /etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux genkernel" 
        timeout 3 
}

"Funtoo Linux" {
        kernel bzImage[-v]
}

"Funtoo Linux genkernel" {
        kernel kernel[-v]
        initrd initramfs[-v]
        params += dolvm real_root=/dev/mapper/VolGroup-LogVol00 rootfstype=ext4 resume=swap:/dev/sda2 quiet
} 

 

My /etc/fstab looks like this:

(chroot) livecd / # cat /etc/fstab
# /etc/fstab: static file system information.                                                                                                  
#                                                                                                                                              
# The root filesystem should have a pass number of either 0 or 1.                                                                              
# All other filesystems should have a pass number of 0 or greater than 1.                                                                      
#                                                                                                                                              
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.                                                                     
#                                                                                                                                              
# See the manpage fstab(5) for more information.                                                                                               
#                                                                                                                                              
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>                                                            
                                                                                                                                               
/dev/sda1               /boot           ext2            noauto,noatime  1 2                                                                    
/dev/sda2               none            swap            sw              0 0                                                                    
LABEL="ROOT"            /               ext4            noatime         0 1                                                                    
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0 

LABEL="ROOT' is /dev/VolGroup00/LogVol00

I have no idea what is going on and why I get the error I mentioned.  Also, someone should update the LVM Wiki page for Funtoo with up to date information

 

All help is greatly appreciated! Thanks!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Well I saw this post:

https://forums.funtoo.org/topic/927-boot-update-error-with-lvm/

It mentions that the path for the LVM, in /etc/fstab and /etc/boot.conf have to be the same (i.e. if you have /dev/VolGroup00/LogVol00 in /etc/fstab, it should be the same in the /etc/boot.conf file)   I changed the entry in /etc/boot.conf to /dev/VolGroup00/LogVol00 but left the entire in /etc/fstab as LABEL="ROOT" and I got the same error.  How come boot-update will not accept the LABEL="ROOT" entry?

 

Link to comment
Share on other sites

  • 0
5 hours ago, Oleg Vinichenko said:

LABEL is actually not that boot-update directly using, it is kernel command line argument that is passed to kernel. 

If you using prebuilt kernel from older installation, it's initramfs is not using --disklabel. It was fixed, but to get the fix, you need to do emerge debian-sources.

 

Thank you for your reply. I just built the VM last night and it is a brand new installation. I can try to reemerge debian-sources again and see if that works.

Link to comment
Share on other sites

  • 0
5 hours ago, jhan said:

Have you looked at https://www.funtoo.org/LVM_Install_Guide ?

There the / entry in fstab looks as follows:


/dev/funtoo/ROOT                /                   ext4        noatime     0           1

Notice the naming of the root entry? It seems that you should not use labels for LVM devices in fstab:

"LVM snapshots can result in duplicate UUIDs and labels, so LVM logical volumes should always be identified by logical volume name (/dev/mapper/name)." (source https://wiki.debian.org/fstab#Defining_filesystems)

Thank you for your reply.. I changed my /etc/fstab so it uses the logical volume name instead of the label and I still get the same error

Link to comment
Share on other sites

  • 0
1 hour ago, xsilentmurmurx said:

Thank you for your reply. I just built the VM last night and it is a brand new installation. I can try to reemerge debian-sources again and see if that works.

I emerged debian-sources and did boot-update again and I still get the same error..  I am lost as to how to fix this

 

This is my /etc/fstab:

(chroot) livecd / # cat /etc/fstab
# /etc/fstab: static file system information.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# See the manpage fstab(5) for more information.
#
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda2               none            swap            sw              0 0
/dev/VolGroup00/LogVol00        /       ext4            noatime         0 1
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0

 

 

Link to comment
Share on other sites

  • 0

I fixed it!  I had misspelled my Volume Group name in /etc/boot.conf and when I fixed that and changed both my /etc/fstab and my /etc/boot.conf to the following:

/etc/fstab:

(chroot) livecd / # cat /etc/fstab
# /etc/fstab: static file system information.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# See the manpage fstab(5) for more information.
#
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda2               none            swap            sw              0 0
/dev/mapper/VolGroup00-LogVol00 /       ext4            noatime         0 1
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0

and my /etc/boot.conf to:

(chroot) livecd / # cat /etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux genkernel" 
        timeout 3 
}

"Funtoo Linux" {
        kernel bzImage[-v]
}

"Funtoo Linux genkernel" {
        kernel kernel[-v]
        initrd initramfs[-v]
        params += dolvm real_root=/dev/mapper/VolGroup00-LogVol00 rootfstype=ext4 resume=swap:/dev/sda2 quiet
} 

 

It finally worked after I ran boot-update!  

 

I recommend adding the following to the LVM install guide for funtoo:

The real_root path for the root partition, in /etc/boot.conf, has to match the entry in /etc/fstab exactly in the same format. Also giving examples in the guide, will also help! Just a friendly suggestion :)

 

Thank you for your help! Now onto rebooting the VM and seeing if it even boots!

Link to comment
Share on other sites

×
×
  • Create New...