Grub 2.04 command line : can't boot.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Grub 2.04 command line : can't boot.

Post by fasord »

Hello, I've been using linux mint for nearly a year now and it's awesome but my pc is very old and after last kernel update I got an error (reading/writing hd0) so I used the earlier version of the kernel to boot. But after I updated grub it doesn't boot and I tried to do it manually but the tab completion doesn't work and I don't know the kernel version ( all I know is : 5.4.??-122-generic).
Could s.o please help me ?I am really bad when it comes to this.
deepakdeshp
Level 20
Level 20
Posts: 10696
Joined: Sun Aug 09, 2015 10:00 am

Re: Grub 2.04 command line : can't boot.

Post by deepakdeshp »

From grub -- advanced options,you can boot to all installed kernels.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

Mint 20.3 Cinnamon 64 bit with AMD A6 / 8GB
Mint 20.3 Cinnamon AMD Ryzen3500U/8gb
motoryzen
Level 6
Level 6
Posts: 1449
Joined: Sun Dec 08, 2019 12:25 am

Re: Grub 2.04 command line : can't boot.

Post by motoryzen »

Adding to deepakdeshp 's point.... you'll need to kind of time it right on barely as your ( P.O.S.T ) ing is done to press around a good 5 to 7 times the Esc key on your keyboard and you should be able to access the advance grub menu ...Select the Advanced option and it should next show you multiple kernel booting options.
deepakdeshp
Level 20
Level 20
Posts: 10696
Joined: Sun Aug 09, 2015 10:00 am

Re: Grub 2.04 command line : can't boot.

Post by deepakdeshp »

If grub menu isn't visible,

Grub Menu will appear if you press and hold Shift during loading Grub, if you boot using BIOS. When your system boots using UEFI, press Esc.

For permanent change you'll need to edit your /etc/default/grub file -- place a "#" symbol at the start of line GRUB_HIDDEN_TIMEOUT=0.

Save changes and run sudo update-grub to apply changes.

Documentation: https://help.ubuntu.com/community/Grub2
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

Mint 20.3 Cinnamon 64 bit with AMD A6 / 8GB
Mint 20.3 Cinnamon AMD Ryzen3500U/8gb
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

If this is a BIOS computer, it's Right-Shift to bring up the Grub menu, not Esc.
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

Thank you very much for your help. Actually I was able to boot (I was setting root to the wrong disk partition). And I deleted the last version of the kernel I was having problems with so currently I am using the older one. However the Grub command line appears after I restart the computer and I have to do the same thing again.
PS: I ran this command after booting to try and solve the problem but it didn't work:

Code: Select all

sudo update-grub
Thank you.
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

To revert to using the old kernel automatically, open Update Manager > Linux Kernels and uninstall the kernel(s) you don't want to use.

Grub automatically uses the most recent kernel, so the only way to get what want is to make the desired default kernel the most recent one installed.
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

Thank you I removed the kernel.
Is there anyway I can boot without having to go through the grub command line every time?
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

Have you tried booting since you removed the kernel? It should work automatically now.
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

pbear wrote:
Sat Aug 06, 2022 9:39 pm
Have you tried booting since you removed the kernel? It should work automatically now.
Hi, I tried booting and it did not work automatically. The strange thing is that the kernel is somehow installed again and I did not install it and I am sure that I removed it.
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

Please report the output of ls -l /boot (run in Terminal).
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

pbear wrote:
Sun Aug 07, 2022 11:44 am
Please report the output of ls -l /boot (run in Terminal).
This is the output:

Code: Select all

total 315552
-rw-r--r-- 1 root root   237975 Jun 15 14:13 config-5.4.0-121-generic
-rw-r--r-- 1 root root   237947 Jun 22 14:00 config-5.4.0-122-generic
-rw-r--r-- 1 root root   237851 May  8  2021 config-5.4.0-74-generic
drwx------ 3 root root     4096 Jan  1  1970 efi
drwxr-xr-x 4 root root     4096 Aug  7 15:37 grub
lrwxrwxrwx 1 root root       28 Aug  7 15:34 initrd.img -> initrd.img-5.4.0-122-generic
-rw-r--r-- 1 root root 89683620 Aug  3 13:47 initrd.img-5.4.0-121-generic
-rw-r--r-- 1 root root 89672863 Aug  7 15:36 initrd.img-5.4.0-122-generic
-rw-r--r-- 1 root root 89644133 Aug  3 13:49 initrd.img-5.4.0-74-generic
lrwxrwxrwx 1 root root       28 Aug  7 15:34 initrd.img.old -> initrd.img-5.4.0-121-generic
-rw------- 1 root root  4761203 Jun 15 14:13 System.map-5.4.0-121-generic
-rw------- 1 root root  4758694 Jun 22 14:00 System.map-5.4.0-122-generic
-rw------- 1 root root  4751152 May  8  2021 System.map-5.4.0-74-generic
lrwxrwxrwx 1 root root       25 Aug  7 15:34 vmlinuz -> vmlinuz-5.4.0-122-generic
-rw------- 1 root root 13672704 Jun 15 14:18 vmlinuz-5.4.0-121-generic
-rw------- 1 root root 13660416 Jun 22 14:26 vmlinuz-5.4.0-122-generic
-rw-r--r-- 1 root root 11763968 Aug 12  2021 vmlinuz-5.4.0-74-generic
lrwxrwxrwx 1 root root       25 Aug  7 15:34 vmlinuz.old -> vmlinuz-5.4.0-121-generic
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

fasord wrote:
Sun Aug 07, 2022 12:00 pm
This is the output [edited]:

Code: Select all

total 315552
-rw-r--r-- 1 root root   237947 Jun 22 14:00 config-5.4.0-122-generic
lrwxrwxrwx 1 root root       28 Aug  7 15:34 initrd.img -> initrd.img-5.4.0-122-generic
-rw-r--r-- 1 root root 89672863 Aug  7 15:36 initrd.img-5.4.0-122-generic
-rw------- 1 root root  4758694 Jun 22 14:00 System.map-5.4.0-122-generic
lrwxrwxrwx 1 root root       25 Aug  7 15:34 vmlinuz -> vmlinuz-5.4.0-122-generic
-rw------- 1 root root 13660416 Jun 22 14:26 vmlinuz-5.4.0-122-generic
That says the -122 kernel is still installed. Please post a screenshot of what you see in Update Manager, the page that looks like this:
.
Kernels - Installed.png
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

pbear wrote:
Sun Aug 07, 2022 10:40 pm
fasord wrote:
Sun Aug 07, 2022 12:00 pm
This is the output [edited]:

Code: Select all

total 315552
-rw-r--r-- 1 root root   237947 Jun 22 14:00 config-5.4.0-122-generic
lrwxrwxrwx 1 root root       28 Aug  7 15:34 initrd.img -> initrd.img-5.4.0-122-generic
-rw-r--r-- 1 root root 89672863 Aug  7 15:36 initrd.img-5.4.0-122-generic
-rw------- 1 root root  4758694 Jun 22 14:00 System.map-5.4.0-122-generic
lrwxrwxrwx 1 root root       25 Aug  7 15:34 vmlinuz -> vmlinuz-5.4.0-122-generic
-rw------- 1 root root 13660416 Jun 22 14:26 vmlinuz-5.4.0-122-generic
That says the -122 kernel is still installed. Please post a screenshot of what you see in Update Manager, the page that looks like this:
.
Kernels - Installed.png
Yes that's the problem I removed it but when I booted again it's there and I did not reinstall it. Here is 2 screenshots one before I removed it (again) and one after.
Attachments
After.png
Before.png
pbear
Level 16
Level 16
Posts: 6559
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Grub 2.04 command line : can't boot.

Post by pbear »

Update Manager will offer to update the kernel, and I wasn't having you disable that (yet) for a reason, but it shouldn't update the kernel without your knowing. Indeed, as you may recall, kernel updates require a separate confirmation. Are you using automatic updates?
fasord
Level 1
Level 1
Posts: 10
Joined: Sat Aug 14, 2021 3:14 pm

Re: Grub 2.04 command line : can't boot.

Post by fasord »

pbear wrote:
Mon Aug 08, 2022 11:42 am
Update Manager will offer to update the kernel, and I wasn't having you disable that (yet) for a reason, but it shouldn't update the kernel without your knowing. Indeed, as you may recall, kernel updates require a separate confirmation. Are you using automatic updates?
Actually, yes I checked it now and I have "Packages updates" and "Automatic maintenance" set on automatic. Although I don't recall doing that.
Attachments
update.png
Post Reply

Return to “Installation & Boot”