Score:2

Issue starting Ubuntu from Grub on 20.10

vn flag

I have an Ubuntu 20.10 system in a dualboot with Windows 10. It has been working for about the past 8 months, but suddenly today it no longer boots from Grub. Immediately after selecting Ubuntu from the drop down menu my laptop switches to an illuminated but black screen and sits there forever. My laptop is a Lenovo Yoga 720 15". The longest I let it sit without powering it off was 30 minutes. I tried to use boot-repair on a live-USB, but that did not fix anything. It gave me the following link: https://paste.ubuntu.com/p/QfkxbrnmNX/

In Grub I can select advanced options for Ubuntu. If I select Ubuntu, with Linux 5.8.0-59-generic only two lines display on the screen:

Loading Linux 5.8.0-59-generic ...
Loading initial ramdisk ...

The same result occurs when in advanced options if I select Linux 5.8.0-59-generic(recovery).

I can successfully boot the system only when using 5.8.0-55-generic.

Has anyone faced this issue before, or has any recommendations on how to fix it?

Any help is greatly appreciated!

Update #1: I am currently using this workaround. It means I have to press the return key twice on boot-up instead of just once, How can I boot with an older kernel version?, but it looks like I may have run across a bug.

Update #2: Running suggested comment and output:

(base) tyler@tyler-desktop:~$ ls -al /boot

total 204836

drwxr-xr-x  5 root root      4096 Jul 16 20:44 .
drwxr-xr-x 23 root root      4096 Apr 30 16:15 ..
-rw-r--r--  1 root root    248155 Jun  1 02:57 config-5.8.0-55-generic
-rw-r--r--  1 root root    248155 Jun 16 18:11 config-5.8.0-59-generic
drwxr-xr-x  4 root root     16384 Dec 31  1969 efi
drwxr-xr-x  4 root root      4096 Jul 18 14:30 grub
drwxr-xr-x  5 root root      4096 Jan 20 14:02 grub.bak
lrwxrwxrwx  1 root root        27 Jun 22 17:47 initrd.img -> initrd.img-5.8.0-59-generic
-rw-r--r--  1 root root  54119063 Jul  5 19:46 initrd.img-5.8.0-55-generic
-rw-r--r--  1 root root 115559351 Jul 16 20:44 initrd.img-5.8.0-59-generic
lrwxrwxrwx  1 root root        27 Jun 22 17:47 initrd.img.old -> initrd.img-5.8.0-55-generic
-rw-r--r--  1 root root    182704 Aug 18  2020 memtest86+.bin
-rw-r--r--  1 root root    184380 Aug 18  2020 memtest86+.elf
-rw-r--r--  1 root root    184884 Aug 18  2020 memtest86+_multiboot.bin
-rw-------  1 root root   5654214 Jun  1 02:57 System.map-5.8.0-55-generic
-rw-------  1 root root   5654841 Jun 16 18:11 System.map-5.8.0-59-generic
lrwxrwxrwx  1 root root        24 Jun 22 17:47 vmlinuz -> vmlinuz-5.8.0-59-generic
-rw-------  1 root root  13824992 Jun  1 03:01 vmlinuz-5.8.0-55-generic
-rw-------  1 root root  13825888 Jun 16 18:20 vmlinuz-5.8.0-59-generic
lrwxrwxrwx  1 root root        24 Jun 22 17:47 vmlinuz.old -> vmlinuz-5.8.0-55-generic

Update #3: Again runnning suggested input:

(base) tyler@tyler-desktop:~$ sudo update-initramfs -c -k 5.8.0-59-generic

[sudo] password for tyler: 
update-initramfs: Generating /boot/initrd.img-5.8.0-59-generic
I: The initramfs will attempt to resume from /dev/nvme0n1p5
I: (UUID=53453367-1200-4da4-85dc-38594b9965a7)
I: Set the RESUME variable to override this.
(base) tyler@tyler-desktop:~$ ls -al /boot
total 204836
drwxr-xr-x  5 root root      4096 Jul 19 18:25 .
drwxr-xr-x 23 root root      4096 Apr 30 16:15 ..
-rw-r--r--  1 root root    248155 Jun  1 02:57 config-5.8.0-55-generic
-rw-r--r--  1 root root    248155 Jun 16 18:11 config-5.8.0-59-generic
drwxr-xr-x  4 root root     16384 Dec 31  1969 efi
drwxr-xr-x  4 root root      4096 Jul 18 14:30 grub
drwxr-xr-x  5 root root      4096 Jan 20 14:02 grub.bak
lrwxrwxrwx  1 root root        27 Jun 22 17:47 initrd.img -> 
initrd.img-5.8.0-59-generic
-rw-r--r--  1 root root  54119063 Jul  5 19:46 initrd.img-5.8.0-55-generic
-rw-r--r--  1 root root 115558409 Jul 19 18:25 initrd.img-5.8.0-59-generic
lrwxrwxrwx  1 root root        27 Jun 22 17:47 initrd.img.old -> 
initrd.img-5.8.0-55-generic
-rw-r--r--  1 root root    182704 Aug 18  2020 memtest86+.bin
-rw-r--r--  1 root root    184380 Aug 18  2020 memtest86+.elf
-rw-r--r--  1 root root    184884 Aug 18  2020 
memtest86+_multiboot.bin
-rw-------  1 root root   5654214 Jun  1 02:57 System.map-5.8.0-55-generic
-rw-------  1 root root   5654841 Jun 16 18:11 System.map-5.8.0-59-generic
lrwxrwxrwx  1 root root        24 Jun 22 17:47 vmlinuz -> vmlinuz-5.8.0-59-generic
-rw-------  1 root root  13824992 Jun  1 03:01 vmlinuz-5.8.0-55-generic
-rw-------  1 root root  13825888 Jun 16 18:20 vmlinuz-5.8.0-59-generic
lrwxrwxrwx  1 root root        24 Jun 22 17:47 vmlinuz.old -> vmlinuz-5.8.0-55-generic

Update #4:

(base) tyler@tyler-desktop:~$ grep -i compress /etc/initramfs-tools/initramfs.conf
 # Amount of RAM to use for RAM-based compressed swap space.
 # COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ] 
COMPRESS=lz4
(base) tyler@tyler-desktop:~$ grep -v "#" /etc/modules

If there was an expected output from the second input, there was nothing.

Update #5: More outputs:

(base) tyler@tyler-desktop:~$ grep -i resume /etc/default/grub
(base) tyler@tyler-desktop:~$ cat /etc/initramfs-tools/conf.d/resume
cat: /etc/initramfs-tools/conf.d/resume: No such file or directory
(base) tyler@tyler-desktop:~$ grep -i swap /etc/fstab
# swap was on /dev/nvme0n1p5 during installation
UUID=53453367-1200-4da4-85dc-38594b9965a7 none            swap    sw              0       0

Update #6:

(base) tyler@tyler-desktop:~$ cat /etc/initramfs-tools/initramfs.conf
#
# initramfs.conf
# Configuration file for mkinitramfs(8). See initramfs.conf(5).
#
# Note that configuration options from this file can be overridden
# by config files in the /etc/initramfs-tools/conf.d directory.

#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add most filesystem and all harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#

MODULES=most

#
# BUSYBOX: [ y | n | auto ]
#
# Use busybox shell and utilities.  If set to n, klibc utilities will be used.
# If set to auto (or unset), busybox will be used if installed and klibc will
# be used otherwise.
#

BUSYBOX=auto

#
# COMPCACHE_SIZE: [ "x K" | "x M" | "x G" | "x %" ]
#
# Amount of RAM to use for RAM-based compressed swap space.
#
# An empty value - compcache isn't used, or added to the initramfs at all.
# An integer and K (e.g. 65536 K) - use a number of kilobytes.
# An integer and M (e.g. 256 M) - use a number of megabytes.
# An integer and G (e.g. 1 G) - use a number of gigabytes.
# An integer and % (e.g. 50 %) - use a percentage of the amount of RAM.
#
# You can optionally install the compcache package to configure this setting
# via debconf and have userspace scripts to load and unload compcache.
#

COMPCACHE_SIZE=""

#
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]
#

COMPRESS=lz4

#
# NFS Section of the config.
#

#
# DEVICE: ...
#
# Specify a specific network interface, like eth0
# Overridden by optional ip= or BOOTIF= bootarg
#

DEVICE=

#
# NFSROOT: [ auto | HOST:MOUNT ]
#

NFSROOT=auto

#
# RUNSIZE: ...
#
# The size of the /run tmpfs mount point, like 256M or 10%
# Overridden by optional initramfs.runsize= bootarg
#

RUNSIZE=10%

Update#7: Stuck directories that might be causing an issue

(base) tyler@tyler-desktop:~/Downloads$ rm -r ventoy-1.0.46
rm: cannot remove 'ventoy-1.0.46': Read-only file system
(base) tyler@tyler-desktop:~/Downloads$ rm ventoy-1.0.46-linux.tar.gz 
rm: cannot remove 'ventoy-1.0.46-linux.tar.gz': Read-only file system
heynnema avatar
ru flag
Boot to -55, and do `ls -al /boot`, and edit that output (copy/paste) into your question. Start comments to me with @heynnema or I'll miss them.
guiverc avatar
cn flag
Note: If it's a bug, it likely won't be fixed as the release reach EOL this thursday (https://fridge.ubuntu.com/2021/06/18/ubuntu-20-10-groovy-gorilla-reaches-end-of-life-on-july-22-2021/) so I'd likely boot a 21.04 system and confirm it's reliable, then upgrade to it; as your alternative is to go backwards to Ubuntu 20.04 LTS in the next few days given 20.10 is down to mere hours/days remaining in it's support cycle.
Tyler Kovach avatar
vn flag
@heynnema -- Ran the input and added the output to Update#2
heynnema avatar
ru flag
@TylerKovach Please see my answer. If it helps solve the problem, please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks!
heynnema avatar
ru flag
@TylerKovach Status please...
Tyler Kovach avatar
vn flag
@heynnema I got an interesting message back that I don't know how to interpret. It appears that file size has not changed so it is still corrupt.
heynnema avatar
ru flag
I assume that it still won't boot, yes? What was the message? Also show me the output of `grep -i compress /etc/initramfs-tools/initramfs.conf` and `grep -v "#" /etc/modules`.
Tyler Kovach avatar
vn flag
@heynnema The message I put in the original post under Update#3. Yes it still does not boot. Those outputs you requested are in Update #4.
heynnema avatar
ru flag
Show me `grep -i resume /etc/default/grub` and `cat /etc/initramfs-tools/conf.d/resume` and `grep -i swap /etc/fstab`.
heynnema avatar
ru flag
Do `cat /etc/initramfs-tools/initramfs.conf` and confirm that "COMPRESS=lz4" is on its own line... not at the end of another line like your Update #4 shows.
heynnema avatar
ru flag
Do `cat /etc/initramfs-tools/initramfs.conf`
Tyler Kovach avatar
vn flag
@heynnena Indeed it is on its own line, I missed that. Do you want to see the output?
heynnema avatar
ru flag
Yes, please. I'm actually looking at something else now... `cat /etc/initramfs-tools/initramfs.conf`.
Tyler Kovach avatar
vn flag
@heynnema --Added it to Update #6
heynnema avatar
ru flag
Hum. Do you remember making any changes to your system on Jul 16? For now, continue to boot to the -55 kernel. I need some time to think about what else could be wrong. Do you have a Ubuntu Live 20.10 DVD/USB? Do you have good backups?
Tyler Kovach avatar
vn flag
@heynnema On July 16th I installed Ventoy since I was attempting to test out and install Linux onto my Macbook following the directions here <https://t2linux.org/>. It did not work out, but that is besides the point. Anyways, there are some stuck directories that I cannot delete with rm that are frustrating me that might be a cause, IDK. They are in update #7.
Tyler Kovach avatar
vn flag
Also, I ended up replacing my copy of Ubuntu Live 20.10 with Ventoy and then after it didn't work out I downloaded Ubuntu Live 21.04. I also should probably backup my PC again since the last time was 6 months ago
heynnema avatar
ru flag
Your disk is in read-only mode, which usually happens because something is wrong with your file system. See Update #1 in my answer. After your backup, reinstall Ubuntu, and let's see if that solves your problem.
heynnema avatar
ru flag
@TylerKovach Status please...
Tyler Kovach avatar
vn flag
@heynnema I think the issue was that the windows partition was controlling the NTFS filesystem I had setup for my storage so I could access the same files from both Windows and Ubuntu if needed. Your solution did not fix the read only filesystem. I ended up removing the windows partition and reinstalling a new copy of Ubuntu 21.04 after my backup over the entire hard-drive. It appears to be running smoothly. Thanks so much for all your help!
heynnema avatar
ru flag
Thanks for the update!
Score:3
ru flag

Your initrd.img-5.8.0-59-generic ramdisk file is corrupt, and that's why you can't boot to the -59 kernel.

Loading Linux 5.8.0-59-generic ...
Loading initial ramdisk ...

See the file sizes and mod dates in the following two ramdisk files in /boot...

-rw-r--r-- 1 root root  54119063 Jul  5 19:46 initrd.img-5.8.0-55-generic
-rw-r--r-- 1 root root 115559351 Jul 16 20:44 initrd.img-5.8.0-59-generic

The fix...

Boot to the -55 kernel, open a terminal and type the following commands:

sudo update-initramfs -c -k 5.8.0-59-generic

ls -al /boot # confirm new file size for initrd.img-5.8.0-59-generic

reboot # to the normal -59 kernel

Update #1:

To check your file system...

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.