Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Cant boot after kernel update...
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
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 394

PostPosted: Sun Aug 30, 2020 2:10 am    Post subject: [SOLVED] Cant boot after kernel update... Reply with quote

I just updated my kernel into the latest stable version 5.4.60 in the tree and after reboot I cant boot: after decrypting the disk successfully the following message appears: "cant find root in /dev/mapper/vg0-lvo1" or something like this. The older kernel 5.4.28 boots flawlessly. Those are the steps I have followed:

Code:

~> sudo mount /dev/sda2 /boot
~> df -h
Filesystem             Size  Used Avail Use% Mounted on
udev                    10M  4.0K   10M   1% /dev
/dev/mapper/vg0-lvol1  900G  807G   49G  95% /
tmpfs                  1.6G  896K  1.6G   1% /run
cgroup_root             10M     0   10M   0% /sys/fs/cgroup
shm                    7.7G   61M  7.7G   1% /dev/shm
tmpfs                  1.6G  4.0K  1.6G   1% /run/user/1000
/dev/sda2              248M  161M   76M  69% /boot
~> cd /usr/src/linux
linux> sudo make menuconfig
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

linux> sudo make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
Kernel: arch/x86/boot/bzImage is ready  (#2)
  Building modules, stage 2.
  MODPOST 25 modules
linux> sudo make modules_install
  INSTALL arch/x86/kvm/kvm-intel.ko
  INSTALL arch/x86/kvm/kvm.ko
  INSTALL drivers/gpu/drm/i2c/ch7006.ko
  INSTALL drivers/gpu/drm/i2c/sil164.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/net/wireless/ath/ath10k/ath10k_core.ko
  INSTALL drivers/net/wireless/ath/ath10k/ath10k_pci.ko
  INSTALL drivers/net/wireless/ath/wcn36xx/wcn36xx.ko
  INSTALL drivers/thermal/intel/x86_pkg_temp_thermal.ko
  INSTALL fs/efivarfs/efivarfs.ko
  INSTALL net/ipv4/netfilter/iptable_nat.ko
  INSTALL net/ipv4/netfilter/nf_log_arp.ko
  INSTALL net/ipv4/netfilter/nf_log_ipv4.ko
  INSTALL net/ipv6/netfilter/nf_log_ipv6.ko
  INSTALL net/netfilter/nf_log_common.ko
  INSTALL net/netfilter/nf_nat.ko
  INSTALL net/netfilter/nf_nat_ftp.ko
  INSTALL net/netfilter/nf_nat_irc.ko
  INSTALL net/netfilter/nf_nat_sip.ko
  INSTALL net/netfilter/xt_LOG.ko
  INSTALL net/netfilter/xt_MASQUERADE.ko
  INSTALL net/netfilter/xt_addrtype.ko
  INSTALL net/netfilter/xt_mark.ko
  INSTALL net/netfilter/xt_nat.ko
  INSTALL virt/lib/irqbypass.ko
  DEPMOD  5.4.60-gentoo
linux> sudo make install
sh ./arch/x86/boot/install.sh 5.4.60-gentoo arch/x86/boot/bzImage \
        System.map "/boot"
linux> sudo genkernel --luks --lvm --busybox --install initramfs
* Gentoo Linux Genkernel; Version 4.1.0
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --luks --lvm --busybox --install initramfs

* Working with Linux kernel 5.4.60-gentoo for x86_64
* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ...

* Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not build ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending devicemanager cpio data ...
*         >> Appending auxilary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending blkid cpio data ...
*         >> Appending luks cpio data ...
*         >> Appending lvm cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending modules cpio data ...
*                 modules: 0 modules copied. Is that correct?
*         >> Appending linker cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...
*
* You will find the initramfs in '/boot/initramfs-5.4.60-gentoo.img'.

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:
* - Add "dolvm" for LVM support
* - Add "crypt_root=<device>" for LUKS-encrypted root
* - Add "crypt_swap=<device>" for LUKS-encrypted swap

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
linux> sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.60-gentoo
Found initrd image: /boot/initramfs-5.4.60-gentoo.img
Found linux image: /boot/vmlinuz-5.4.60-gentoo.old
Found initrd image: /boot/initramfs-5.4.60-gentoo.img
Found linux image: /boot/vmlinuz-5.4.48-gentoo
Found initrd image: /boot/initramfs-5.4.48-gentoo.img
Found linux image: /boot/vmlinuz-5.4.48-gentoo.old
Found initrd image: /boot/initramfs-5.4.48-gentoo.img
Found linux image: /boot/vmlinuz-5.4.38-gentoo
Found initrd image: /boot/initramfs-5.4.38-gentoo.img
Found linux image: /boot/vmlinuz-5.4.28-gentoo
Found initrd image: /boot/initramfs-5.4.28-gentoo.img
Found linux image: /boot/vmlinuz-5.4.28-gentoo.old
Found initrd image: /boot/initramfs-5.4.28-gentoo.img
done
linux>


My fstab is empty, but is has always been empty: I am running the same gentoo install for at least 3 years and never needed to write down my partitioning into fstab. Anyway, here is what it says:


Code:

linux> cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# 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.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
#       filesystems.  This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
#       more reliable to use filesystem labels or UUIDs. See your filesystem
#       documentation for details on setting a label. To obtain the UUID, use
#       the blkid(8) command.

#LABEL=boot             /boot           ext4            noauto,noatime  1 2
#UUID=58e72203-57d1-4497-81ad-97655bd56494              /               ext4            noatime         0 1
#LABEL=swap             none            swap            sw              0 0
#/dev/cdrom             /mnt/cdrom      auto            noauto,ro       0 0


The only novel thing I have done before kernel configuration was adding support for a wacom tablet, following the steps shown here.

Thank you all for your attention.


Last edited by vcmota on Mon Aug 31, 2020 12:53 am; edited 1 time in total
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Sun Aug 30, 2020 1:57 pm    Post subject: Reply with quote

Could you please retry with genkernel-4.1.2?

If you will still see a boot failure with genkernel-4.1.2, please get a shell and run "gksosreport" and share this report with us.
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 394

PostPosted: Sun Aug 30, 2020 3:09 pm    Post subject: Reply with quote

Whissi wrote:
Could you please retry with genkernel-4.1.2?

If you will still see a boot failure with genkernel-4.1.2, please get a shell and run "gksosreport" and share this report with us.


Thank you Whissi for your reply. I did what you suggested, and repeated all the compilation installation steps:

Code:

linux> sudo make menuconfig
scripts/kconfig/mconf  Kconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

linux> sudo make && sudo make modules_install
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
Kernel: arch/x86/boot/bzImage is ready  (#2)
  Building modules, stage 2.
  MODPOST 25 modules
  INSTALL arch/x86/kvm/kvm-intel.ko
  INSTALL arch/x86/kvm/kvm.ko
  INSTALL drivers/gpu/drm/i2c/ch7006.ko
  INSTALL drivers/gpu/drm/i2c/sil164.ko
  INSTALL drivers/media/usb/gspca/gspca_main.ko
  INSTALL drivers/net/wireless/ath/ath10k/ath10k_core.ko
  INSTALL drivers/net/wireless/ath/ath10k/ath10k_pci.ko
  INSTALL drivers/net/wireless/ath/wcn36xx/wcn36xx.ko
  INSTALL drivers/thermal/intel/x86_pkg_temp_thermal.ko
  INSTALL fs/efivarfs/efivarfs.ko
  INSTALL net/ipv4/netfilter/iptable_nat.ko
  INSTALL net/ipv4/netfilter/nf_log_arp.ko
  INSTALL net/ipv4/netfilter/nf_log_ipv4.ko
  INSTALL net/ipv6/netfilter/nf_log_ipv6.ko
  INSTALL net/netfilter/nf_log_common.ko
  INSTALL net/netfilter/nf_nat.ko
  INSTALL net/netfilter/nf_nat_ftp.ko
  INSTALL net/netfilter/nf_nat_irc.ko
  INSTALL net/netfilter/nf_nat_sip.ko
  INSTALL net/netfilter/xt_LOG.ko
  INSTALL net/netfilter/xt_MASQUERADE.ko
  INSTALL net/netfilter/xt_addrtype.ko
  INSTALL net/netfilter/xt_mark.ko
  INSTALL net/netfilter/xt_nat.ko
  INSTALL virt/lib/irqbypass.ko
  DEPMOD  5.4.60-gentoo
linux> sudo make install
sh ./arch/x86/boot/install.sh 5.4.60-gentoo arch/x86/boot/bzImage \
        System.map "/boot"
linux> sudo genkernel --luks --lvm --busybox --install initramfs
* Gentoo Linux Genkernel; Version 4.1.2
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --luks --lvm --busybox --install initramfs

* Working with Linux kernel 5.4.60-gentoo for x86_64
* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ...

* Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-x86_64' because kernel was not build ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending devicemanager cpio data ...
*         >> Appending auxilary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending luks cpio data ...
*         >> Appending lvm cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending modules cpio data ...
*                 modules: 0 modules copied. Is that correct?
*         >> Appending linker cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...
*
* You will find the initramfs in '/boot/initramfs-5.4.60-gentoo.img'.

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:
* - Add "dolvm" for LVM support
* - Add "crypt_root=<device>" for LUKS-encrypted root
* - Add "crypt_swap=<device>" for LUKS-encrypted swap

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
linux> sudo grub-mkconfig -o /boot/grub/grub.cfg
Password:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.60-gentoo
Found initrd image: /boot/initramfs-5.4.60-gentoo.img
Found linux image: /boot/vmlinuz-5.4.60-gentoo.old
Found initrd image: /boot/initramfs-5.4.60-gentoo.img
Found linux image: /boot/vmlinuz-5.4.48-gentoo
Found initrd image: /boot/initramfs-5.4.48-gentoo.img
Found linux image: /boot/vmlinuz-5.4.48-gentoo.old
Found initrd image: /boot/initramfs-5.4.48-gentoo.img
Found linux image: /boot/vmlinuz-5.4.38-gentoo
Found initrd image: /boot/initramfs-5.4.38-gentoo.img
Found linux image: /boot/vmlinuz-5.4.28-gentoo
Found initrd image: /boot/initramfs-5.4.28-gentoo.img
Found linux image: /boot/vmlinuz-5.4.28-gentoo.old
Found initrd image: /boot/initramfs-5.4.28-gentoo.img
done


There is something here that I dont like

Code:

*         >> Appending modules cpio data ...
*                 modules: 0 modules copied. Is that correct?


but I am not sure this is a problem. I am writing this here before rebooting in case things go truly south. Thank you again.
Back to top
View user's profile Send private message
Whissi
Retired Dev
Retired Dev


Joined: 12 Jan 2011
Posts: 222

PostPosted: Sun Aug 30, 2020 3:14 pm    Post subject: Reply with quote

Do not reboot.

You are doing it wrong:

Do not compile kernel on your own and just use genkernel to generate initramfs.

If you really want to do that (I don't recommend that), you have to tell genkernel where it can find the kernel config you used for your manual build. Like you can see in your quote, genkernel falls back to genkernel's default generic config (* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ... ). But this config likely doesn't match your actually used kernel config so you are really asking for trouble.

I recommend to use "genkernel all" (i.e. build kernel and initramfs with genkernel) or pass kernel config to genkernel (genkernel --kernel-config).
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
vcmota
Guru
Guru


Joined: 19 Jun 2017
Posts: 394

PostPosted: Mon Aug 31, 2020 12:53 am    Post subject: Reply with quote

Whissi wrote:
Do not reboot.

You are doing it wrong:

Do not compile kernel on your own and just use genkernel to generate initramfs.

If you really want to do that (I don't recommend that), you have to tell genkernel where it can find the kernel config you used for your manual build. Like you can see in your quote, genkernel falls back to genkernel's default generic config (* Using kernel config file '/usr/share/genkernel/arch/x86_64/generated-config' ... ). But this config likely doesn't match your actually used kernel config so you are really asking for trouble.

I recommend to use "genkernel all" (i.e. build kernel and initramfs with genkernel) or pass kernel config to genkernel (genkernel --kernel-config).


Thank you Whissi for your help. It worked! This is what I did:

Code:

linux> sudo genkernel --luks --lvm all
Password:
* Gentoo Linux Genkernel; Version 4.1.2
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --luks --lvm all

* Working with Linux kernel 5.4.60-gentoo-x86_64 for x86_64
* Using kernel config file '/etc/kernels/kernel-config-5.4.60-gentoo-x86_64' ...
*
* Note: The version above is subject to change (depends on config and status of kernel sources)

* kernel: >> Initializing ...
*         >> Running 'make mrproper' ...
*         >> Running 'make oldconfig' ...
*         >> Re-running 'make oldconfig' due to changed kernel options ...
*         >> Compiling 5.4.60-gentoo-x86_64 bzImage ...
*         >> Compiling 5.4.60-gentoo-x86_64 modules ...
*         >> Installing 5.4.60-gentoo-x86_64 modules (and stripping) ...
*         >> Generating module dependency data ...
*         >> Compiling out-of-tree module(s) ...
*         >> Saving config of successful build to '/etc/kernels/kernel-config-5.4.60-gentoo-x86

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending util-linux cpio data ...
*         >> Appending eudev cpio data ...
*         >> Appending devicemanager cpio data ...
*         >> Appending auxilary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending luks cpio data ...
*         >> Appending lvm cpio data ...
*         >> Appending modprobed cpio data ...
*         >> Appending modules cpio data ...
*         >> Appending linker cpio data ...
*         >> Deduping cpio ...
*         >> Pre-generating initramfs' /etc/ld.so.cache ...
*         >> Compressing cpio data (.xz) ...

* Kernel compiled successfully!
*
* --no-bootloader set; Skipping bootloader update ...
*
* Required kernel parameter:
*
*       root=/dev/$ROOT
*
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab

* If you require Genkernel's hardware detection features, you MUST
* tell your bootloader to use the provided initramfs file '/boot/initramfs-5.4.60-gentoo-x86_64

* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly:
* - Add "dolvm" for LVM support
* - Add "crypt_root=<device>" for LUKS-encrypted root
* - Add "crypt_swap=<device>" for LUKS-encrypted swap

* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
linux>


and after that just updated the boot loader. Reboot went smooth just after. So it may be the case that there are issues with the current stable version of genkernel.

Thank you again!
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