LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-04-2024, 09:03 AM   #1
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Rep: Reputation: 0
Angry grub always comes up with command line


I installed grub to my Pop os pc because systemd boot was broken, it could not boot any kernel after version 6.2. Currently i boot computer by specifying prefix and root directories manually in grub cli:

Code:
set prefix=(hd0,gpt1)/grub
set root=(hd0,gpt2)/
normal
I tried grub-update, not even a sign of improvement. I added custom menu to /etc/grub.d/40_custom:

Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "pop_os" {
set root=(hd0,gpt2)
set prefix=(hd0,gpt1)/grub
linux /boot/efi/EFI/Pop_OS-1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4/vmlinuz
initrd /boot/efi/EFI/Pop_OS-1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4/initrd.img
}
Not even a sign of improvement.
 
Old 05-04-2024, 01:21 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Do you have a directory for Pop-OS in the /boot/efi/EFI directory and if so, what is it? If this directory exists, does it have a grub.cfg file? What's in it? Is Grub not in the /boot directory as indicated in your post? Are the vmlinuz and initrd files actually on the EFI partition?
 
Old 05-04-2024, 01:40 PM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
open a terminal and post the output of the following
Code:
sudo lsblk -f
sudo cat /boot/efi/EFI/ubuntu/grub.cfg
sudo cat /etc/fstab
sudo efibootmgr -v
 
Old 05-05-2024, 05:02 PM   #4
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Do you have a directory for Pop-OS in the /boot/efi/EFI directory and if so, what is it? If this directory exists, does it have a grub.cfg file? What's in it? Is Grub not in the /boot directory as indicated in your post? Are the vmlinuz and initrd files actually on the EFI partition?
thats just default kernel storing directory

grub.cfg is in /boot/grub
 
Old 05-05-2024, 05:04 PM   #5
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Post

Quote:
Originally Posted by colorpurple21859 View Post
open a terminal and post the output of the following
Code:
sudo lsblk -f
sudo cat /boot/efi/EFI/ubuntu/grub.cfg
sudo cat /etc/fstab
sudo efibootmgr -v
1.:
Code:
   sudo lsblk -f | grep -v loop
NAME        FSTYPE   FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0                                                                                [SWAP]
nvme0n1                                                                              
├─nvme0n1p1 vfat     FAT32       27F9-7039                             811.7M    21% /boot/efi
├─nvme0n1p2 ext4     1.0         1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4   67.8G    66% /
└─nvme0n1p3 swap     1           53629eae-780e-43c4-b14f-bd52f292cf28                [SWAP]
2.:cat: /boot/efi/EFI/ubuntu/grub.cfg: No such file or directory
its in /boot/grub/grub.cfg probably

3.:
Code:
   sudo cat /etc/fstab
# /dev/nvme0n1p2
UUID=1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4	/         	ext4      	rw,relatime,stripe=32	0 1

# /dev/nvme0n1p1
UUID=27F9-7039      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/nvme0n1p3
UUID=53629eae-780e-43c4-b14f-bd52f292cf28	none      	swap      	defaults  	0 0
4.:
Code:
   sudo efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0000,0001,0012,0013,0014,0015,0016,0017,0018
Boot0000* GRUB	HD(1,GPT,3b6f7f47-9fb3-4898-85e1-b39b1ded6207,0x800,0x200000)/File(\EFI\GRUB\grubx64.efi)
Boot0001* arch	HD(1,GPT,b9d0f340-ee91-4ef9-985b-325de5c537e4,0x800,0x64000)/File(\EFI\arch\grubx64.efi)
Boot0002* pop	HD(1,GPT,3b6f7f47-9fb3-4898-85e1-b39b1ded6207,0x800,0x200000)/File(\EFI\pop\grubx64.efi)
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(86488440-41bb-42c7-93ac-450fbf7766bf)
Boot0012* NVMe: SAMSUNG MZALQ256HBJD-00BL2             	PciRoot(0x0)/Pci(0x1,0x1)/Pci(0x0,0x0)/NVMe(0x1,00-25-38-D5-21-C0-5D-A1)....2.LN........
Boot0013* eMMC Card:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,63a04a38d7705b4888c69653c982e114)
Boot0014* ATA HDD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f600)
Boot0015* USB HDD: SanDisk Cruzer Blade	PciRoot(0x0)/Pci(0x8,0x1)/Pci(0x0,0x3)/USB(1,0)3.!..3.G..A.....
Boot0016* USB LAN:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,e854bca4cae7704ca322b00da0376322)
Boot0017* USB FDD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot0018* USB CD:	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)

Last edited by cwdztsd88; 05-05-2024 at 05:06 PM.
 
Old 05-05-2024, 05:13 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
At the grub> prompt
Code:
grub> set pager=1
grub> set
What is the contents of the prefix= line?
 
Old 05-06-2024, 07:18 AM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,547

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Quote:
Do you have a directory for Pop-OS in the /boot/efi/EFI directory and if so, what is it?
I asked the above question in post 2 and you neglected to answer it? Your efibootmgr output in post 5 shows the directory there is named 'pop' which would be what you should use in your grub.cfg. Most Ubuntu's like Pop use 'ubuntu' as the directory in the EFI partition but it appears that Pop does not, that was the reason for the question/suggestion above.

Did you check the /boot/efi/EFI/pop directory to see if there was a grub.cfg directory there? Many Ubuntu's have a small grub.cfg file there which points to the main grub.cfg file on your root filesystem partition.

The entry you posted in post 1 does not have a correct path. The kernel (linux file) and initrd are generally in the /boot directory not in the EFI directory. I don't use Pop OS so have you verified the location of these files? The kernel should probably be: linux /boot/vmlinuz root=UUID=1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4
Might need some parameters after the UUID.

You indicate you installed Grub as you were having boot problems and you have an entry for GRUB in your efi boot options Boot0000. What happens when you select that option in the BIOS firmware options?
 
Old 05-07-2024, 10:38 AM   #8
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by yancek View Post
Did you check the /boot/efi/EFI/pop directory to see if there was a grub.cfg directory there? Many Ubuntu's have a small grub.cfg file there which points to the main grub.cfg file on your root filesystem partition.
checked /boot/efi/EFI/pop and it actually exists, because of i never saw it before. i always headed to Pop_OS-randomnumbers to configure my kernel iamges whilst i used systemd-boot at the time

Quote:
Originally Posted by yancek View Post
The entry you posted in post 1 does not have a correct path. The kernel (linux file) and initrd are generally in the /boot directory not in the EFI directory. I don't use Pop OS so have you verified the location of these files? The kernel should probably be: linux /boot/vmlinuz root=UUID=1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4
Might need some parameters after the UUID.
yes kernels first copied to /boot then to /boot/efi/EFI/Pop_OS-1d18dfdb-3d9c-4e7c-aa0c-c2eb92b1adb4/ thats default and i am used to it its definely true, there are no typos.

i will look and try for uuid.

Quote:
Originally Posted by yancek View Post
You indicate you installed Grub as you were having boot problems and you have an entry for GRUB in your efi boot options Boot0000. What happens when you select that option in the BIOS firmware options?
grub cli again

Last edited by cwdztsd88; 05-08-2024 at 04:07 AM.
 
Old 05-07-2024, 10:42 AM   #9
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by colorpurple21859 View Post
At the grub> prompt
Code:
grub> set pager=1
grub> set
What is the contents of the prefix= line?
grub.cfg=

search.fs_uuid 1d18dfdb-3d9c-aa0c-c2eb92b1adb4
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

btw what is that set pager thing's command, it made grub show some expressions

Last edited by cwdztsd88; 05-07-2024 at 10:45 AM. Reason: content
 
Old 05-07-2024, 11:52 AM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
The ‘set pager=1’ allows to you to see all the lines of the set command. I was looking to see if
‘prefix=/EFI/ubuntu’
Reinstall grub with this:
Code:
sudo grub-install --no-efi-secure-boot

Last edited by colorpurple21859; 05-07-2024 at 04:55 PM.
 
Old 05-08-2024, 04:10 AM   #11
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colorpurple21859 View Post
The ‘set pager=1’ allows to you to see all the lines of the set command. I was looking to see if
‘prefix=/EFI/ubuntu’
Reinstall grub with this:
Code:
sudo grub-install --no-efi-secure-boot
grub-install: unrecognized option '--no-efi-secure-boot'
 
Old 05-08-2024, 04:11 AM   #12
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
maybe i was using old grub version?

Code:
   grub-install --version 
grub-install (GRUB) 2.06-2ubuntu7.2
 
Old 05-08-2024, 04:15 AM   #13
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by cwdztsd88 View Post
grub.cfg=

search.fs_uuid 1d18dfdb-3d9c-aa0c-c2eb92b1adb4
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

btw what is that set pager thing's command, it made grub show some expressions

to not get it wrong, thats content of prefix directory i use when booting manually, not set pager
 
Old 05-08-2024, 05:09 AM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
did you run the two commands in post #6 just as they are and notice what the prefix= line references?

Last edited by colorpurple21859; 05-08-2024 at 05:24 AM.
 
Old 05-08-2024, 03:56 PM   #15
cwdztsd88
LQ Newbie
 
Registered: Feb 2024
Distribution: Pop_OS
Posts: 27

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by colorpurple21859 View Post
did you run the two commands in post #6 just as they are and notice what the prefix= line references?
prefix line is:

prefix=(hd0,gpt1)/EFI/ubuntu
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
after reinstalling grub, grub comes in command prompt mode daudiam Linux - General 17 05-24-2010 03:54 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Doesn't boot. Comes up with GRUB command line. jjbuchan Linux - Newbie 4 10-24-2005 01:00 PM
Command ls --color=always, can always be always Kevin Tough Linux - Newbie 1 09-08-2005 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration