Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Stuck at GRUB command line

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Stuck at GRUB command line

#21 Post by p.H »

How did you switch to root ?
"su" -> bad, the resulting root environment is incomplete.
"su -" -> good
sudo is fine too.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Stuck at GRUB command line

#22 Post by sunrat »

DebianNewbie wrote: 2022-11-26 12:32 @p.H Yes, I came across the instructions to run "bootinfoscript" as root, but some time ago, I read that it's not good to use root, but rather to give the user root privileges. Just to avoid being compromised by an attack. However, this morning, I went ahead and opened terminal and switched to root and ran bootinfoscript and got the same error I did yesterday (logged in as my normal user) - "bash bootinfoscript command not found".
You probably ran it with su whereas you need to get root with su - (with a dash) to get root environment in order to run applications in /usr/sbin/.

I just tried several ways to run it and found the easiest way is to download the zip file from https://github.com/arvidjaar/bootinfosc ... master.zip
then open a terminal in your downloads directory and (assuming sudo is set up) run

Code: Select all

unzip bootinfoscript-master.zip
cd bootinfoscript-master/
sudo ./bootinfoscript
which results in

Code: Select all

Finished. The results are in the file "RESULTS.txt"
located in "/home/<username>/Downloads/bootinfoscript-master/".
The RESULTS.txt file can then be uploaded here as attachment.

I wasn't planning to write a howto but it was slightly more involved than I remembered so though I'd post here for others' benefit. :wink:
I also tried the package from Debian repo but usage proved to be more tricky than above method.
Edited 8 hours later to make it simpler and easier to follow. “Everything should be as simple as it can be, but not simpler”
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#23 Post by DebianNewbie »

p.H wrote: 2022-11-26 12:58 How did you switch to root ?
"su" -> bad, the resulting root environment is incomplete.
"su -" -> good
sudo is fine too.
I did "su" which was my problem.

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#24 Post by DebianNewbie »

@sunrat Many thanks for the howto! I was able to simply use "su -" and the RESULTS.txt was generated. I'll attach it for review.

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#25 Post by DebianNewbie »

@p.H @sunrat Attached is the RESULTS.txt generated by bootinfoscript.... welp, I've spent the last 25 minutes or so trying to upload the file with no success. Perhaps Linux isn't for me. lol. I moved the file (had to enter admin pwd) to a directory I created in my normal user profile (home>'username'>debian forum attachments) and tried to upload from there and get a "permissions-related" error.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Stuck at GRUB command line

#26 Post by sunrat »

DebianNewbie wrote: 2022-11-26 19:33 @p.H @sunrat Attached is the RESULTS.txt generated by bootinfoscript.... welp, I've spent the last 25 minutes or so trying to upload the file with no success. Perhaps Linux isn't for me. lol. I moved the file (had to enter admin pwd) to a directory I created in my normal user profile (home>'username'>debian forum attachments) and tried to upload from there and get a "permissions-related" error.
Permissions error is likely because file is owned by root. Change it to your username with

Code: Select all

sudo chown username RESULTS.txt.
Those very permissions errors are exactly why I wrote that howto. If you run it with su - it will create the file with root permissions. Running it with sudo from the home directory makes a file owned by the user which can be easily uploaded.
Even more frustrating if you run the version installed from the Debian repo which places the script in /usr/sbin/ so running it without a target directory ends up with RESULTS.txt file owned by root and in /root/ directory. Of course you can move it from there and change ownership to your user but it is less steps for a beginner to do it the way I described. I just edited the howto to make it simpler.

Did you use the package from the repo, or the script download from Github?
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#27 Post by DebianNewbie »

@sunrat I will follow your howto and post the results. Many thanks!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Stuck at GRUB command line

#28 Post by p.H »

You can also copy/paste the contents of the report directly in a post within code tags.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Stuck at GRUB command line

#29 Post by sunrat »

p.H wrote: 2022-11-27 09:42 You can also copy/paste the contents of the report directly in a post within code tags.
Indeed. It's limited to 60,000 characters though and bootinfo results can be quite large. Mine is 333,339 characters but that includes several installs in multiboot.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#30 Post by DebianNewbie »

Code: Select all

Boot Info Script 0.78      [09 October 2019]


============================= Boot Info Summary: ===============================

 => No boot loader is installed in the MBR of /dev/sda.

sda1: __________________________________________________________________________

    File system:       vfat
    Boot sector type:  FAT32
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /efi/BOOT/fbx64.efi /efi/BOOT/mmx64.efi 
                       /efi/debian/fbx64.efi /efi/debian/grubx64.efi 
                       /efi/debian/mmx64.efi /efi/debian/shimx64.efi 
                       /efi/ubuntu/grubx64.efi /efi/ubuntu/mmx64.efi 
                       /efi/ubuntu/shimx64.efi /efi/debian/grub.cfg 
                       /efi/ubuntu/grub.cfg

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Debian GNU/Linux 11 (bullseye)
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda3: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: TOSHIBA MQ01ABF0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1                   1   976,773,167   976,773,167  ee GPT


GUID Partition Table detected.

Partition  Attrs   Start Sector    End Sector  # of Sectors System
/dev/sda1                 2,048     1,050,623     1,048,576 EFI System partition
/dev/sda2             1,050,624   974,772,223   973,721,600 Data partition (Linux)
/dev/sda3           974,772,224   976,771,071     1,998,848 Swap partition (Linux)

Attributes: R=Required, N=No Block IO, B=Legacy BIOS Bootable, +=More bits set

"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        1D7F-3E2A                              vfat       
/dev/sda2        fdad590b-a50a-4bd8-b813-7bb9ff9241c0   ext4       
/dev/sda3        9cb979dc-fec5-4ab2-96e0-a1d49e2b4064   swap       

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 Nov 26 06:17 ata-hp_DVD-RAM_UJ8D1_1342TP371336E0H7H -> ../../sr0
lrwxrwxrwx 1 root root  9 Nov 26 06:17 ata-TOSHIBA_MQ01ABF050_X352SEUSS -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 26 06:17 ata-TOSHIBA_MQ01ABF050_X352SEUSS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 26 06:17 ata-TOSHIBA_MQ01ABF050_X352SEUSS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 26 06:17 ata-TOSHIBA_MQ01ABF050_X352SEUSS-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Nov 26 06:17 wwn-0x5000039515680912 -> ../../sda
lrwxrwxrwx 1 root root 10 Nov 26 06:17 wwn-0x5000039515680912-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Nov 26 06:17 wwn-0x5000039515680912-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Nov 26 06:17 wwn-0x5000039515680912-part3 -> ../../sda3

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda1        /boot/efi                vfat       (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/sda2        /                        ext4       (rw,relatime,errors=remount-ro)


========================== sda1/efi/debian/grub.cfg: ===========================

--------------------------------------------------------------------------------
search.fs_uuid fdad590b-a50a-4bd8-b813-7bb9ff9241c0 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--------------------------------------------------------------------------------

========================== sda1/efi/ubuntu/grub.cfg: ===========================

--------------------------------------------------------------------------------
search.fs_uuid 0ad339a8-facb-493a-8dd0-62ff0df7fff8 root hd0,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--------------------------------------------------------------------------------

=========================== sda2/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
else
  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
else
  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
fi
insmod png
if background_image /usr/share/desktop-base/homeworld-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
	else
	  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
	fi
	echo	'Loading Linux 5.10.0-19-amd64 ...'
	linux	/boot/vmlinuz-5.10.0-19-amd64 root=UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-5.10.0-19-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
	menuentry 'Debian GNU/Linux, with Linux 5.10.0-19-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-19-amd64-advanced-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		else
		  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		fi
		echo	'Loading Linux 5.10.0-19-amd64 ...'
		linux	/boot/vmlinuz-5.10.0-19-amd64 root=UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.10.0-19-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.10.0-19-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-19-amd64-recovery-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		else
		  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		fi
		echo	'Loading Linux 5.10.0-19-amd64 ...'
		linux	/boot/vmlinuz-5.10.0-19-amd64 root=UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.10.0-19-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.10.0-18-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-18-amd64-advanced-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		else
		  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		fi
		echo	'Loading Linux 5.10.0-18-amd64 ...'
		linux	/boot/vmlinuz-5.10.0-18-amd64 root=UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.10.0-18-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 5.10.0-18-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.0-18-amd64-recovery-fdad590b-a50a-4bd8-b813-7bb9ff9241c0' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		else
		  search --no-floppy --fs-uuid --set=root fdad590b-a50a-4bd8-b813-7bb9ff9241c0
		fi
		echo	'Loading Linux 5.10.0-18-amd64 ...'
		linux	/boot/vmlinuz-5.10.0-18-amd64 root=UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.10.0-18-amd64
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# 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.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda2/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=fdad590b-a50a-4bd8-b813-7bb9ff9241c0 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=1D7F-3E2A  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda3 during installation
UUID=9cb979dc-fec5-4ab2-96e0-a1d49e2b4064 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
--------------------------------------------------------------------------------

=================== sda2: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

 200.627277374 = 215.421898752  boot/grub/grub.cfg                             1
   0.819957733 = 0.880422912    boot/vmlinuz-5.10.0-18-amd64                   1
   1.593399048 = 1.710899200    boot/vmlinuz-5.10.0-19-amd64                   1
   1.593399048 = 1.710899200    vmlinuz                                        1
   0.819957733 = 0.880422912    vmlinuz.old                                    1
   1.293609619 = 1.389002752    boot/initrd.img-5.10.0-18-amd64                1
 386.150650024 = 414.626103296  boot/initrd.img-5.10.0-19-amd64                1
 386.150650024 = 414.626103296  initrd.img                                     1
   1.293609619 = 1.389002752    initrd.img.old                                 1
Edited by administrator to enclose code inside code tags.

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#31 Post by DebianNewbie »

Good morning @p.H and @sunrat! Your suggestion of copy/paste seemed the simplest and it appears that my bootlog is under 60K characters, so there it is! Hopefully it sheds some light on the setting/configuration that is causing my laptop to hang age the GRUB screen.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: Stuck at GRUB command line

#32 Post by sunrat »

@DebianNewbie you didn't post inside code tags as advised. I fixed it for you.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#33 Post by DebianNewbie »

@sunrat Sorry about that. I'll remember next go around. Thank you.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Stuck at GRUB command line

#34 Post by p.H »

I do not see anything wrong in the report. The UUID in /boot/efi/efi/debian/grub.cfg matches the root partition.
You can delete /boot/efi/efi/BOOT and /boot/efi/efi/ubuntu which do not contain anything useful, and delete ubuntu's EFI boot entry with efibootmgr.

Code: Select all

efibootmgr # list boot variables
efibootmgr -b XXXX -B # with BootXXXX being labelled "ubuntu" in the previous output
Maybe I missed something and you can also try to reinstall GRUB with

Code: Select all

grub-install --force-extra-removable

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#35 Post by DebianNewbie »

@p.H I'm not sure how to go about removing /boot/efi/efi/BOOT and /boot/efi/efi/ubuntu however, I was able to remove the Ubuntu entry with efibootmgr. I also accidentally removed Boot3000 which was an Internal Hard Disk or Solid State Disk. Hopefully that doesn't break anything. Will restart now to see what happens. Also, out of curiosity - is the UUID in boot/efi/efi/debian/grub.cfg fdad590b-a50a-4bd8-b813-7bb9ff9241c0? Seems as though there are several ids.

EDIT: After restarting, I was again confronted with the GRUB screen. Running efibootmgr shows that the entries that I deleted (Ubuntu and the Internal Hard Disk) have been restored. :-/ Wondering if I should try to remove /boot/efi/efi/BOOT and /boot/efi/efi/ubuntu.

Code: Select all

[username]@hostNameForHP2000:~$ efibootmgr
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0001,2001,2002,2003
Boot0001* debian
Boot0005* Internal Hard Disk or Solid State Disk
Boot0006* Internal Hard Disk or Solid State Disk
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk
Boot3003* Internal Hard Disk or Solid State Disk

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Stuck at GRUB command line

#36 Post by p.H »

DebianNewbie wrote: 2022-11-28 11:50 I'm not sure how to go about removing /boot/efi/efi/BOOT and /boot/efi/efi/ubuntu

Code: Select all

rm -r /path/to/directory
DebianNewbie wrote: 2022-11-28 11:50 is the UUID in boot/efi/efi/debian/grub.cfg fdad590b-a50a-4bd8-b813-7bb9ff9241c0?
Why do you ask ? Do you see any other UUID in that file ?
DebianNewbie wrote: 2022-11-28 11:50 Seems as though there are several ids.
Where do you see other UUIDs ?

Weird. efibootmgr says that BootCurrent=0000 but there is no such boot entry number (Boot0000). It may indicate that the firmware booted from the "removable media path" (/efi/boot/bootx64.efi) but the bootinfoscript report does not mention any such file. However it mentions efi/BOOT/fbx64.efi and /efi/BOOT/mmx64.efi which are usually installed along with /efi/boot/bootx64.efi.
If bootx64.efi exists and the firmwares boots it, then run the grub-install command in my previous post.

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#37 Post by DebianNewbie »

Okay, so it appears to be fixed. First thing I did was to remove /boot/efi/efi/BOOT and /boot/efi/efi/ubuntu using the command you provided, then I set the boot order to have Debian first, then I deleted the Ubuntu entry (0000) again and restarted. Below is what now appears in efibootmgr. @p.H and @sunrat many thanks for your help! Also, just realized that I didn't explain my confusion about "several ids". I did a search (ctrl+f) for UUID and noticed 1D7F-3E2A and fdad590b-a50a-4bd8-b813-7bb9ff9241c0. Just wasn't clear on the difference between the 2.

Code: Select all

[username]@hostNameForHP2000:~$ efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,3001,2001,2002,2003
Boot0001* debian
Boot0005* Internal Hard Disk or Solid State Disk
Boot0006* Internal Hard Disk or Solid State Disk
Boot2001* USB Drive (UEFI)
Boot2002* Internal CD/DVD ROM Drive (UEFI)
Boot3000* Internal Hard Disk or Solid State Disk
Boot3001* Internal Hard Disk or Solid State Disk
Boot3002* Internal Hard Disk or Solid State Disk
Boot3003* Internal Hard Disk or Solid State Disk

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Stuck at GRUB command line

#38 Post by p.H »

fdad590b-a50a-4bd8-b813-7bb9ff9241c0 is the ext4 root filesystem UUID. It is in /boot/efi/efi/debian/grub.cfg because /boot/grub is part of the root filesystem.

1D7F-3E2A is the EFI system partition FAT filesystem UUID. Technically, it is not really a 128-bit UUID but a 32-bit FAT volume ID used as a UUID by blkid. Anyway, it is not present in /boot/efi/efi/debian/grub.cfg.

If the problem is solved, can you mark it by editing the subject of the first post ?

DebianNewbie
Posts: 21
Joined: 2022-11-18 14:28
Has thanked: 16 times

Re: Stuck at GRUB command line

#39 Post by DebianNewbie »

@p.H Thank you for explaining about the difference between the two and thank you again for your help in getting my laptop to load smoothly! Will mark the problem as solved. Best, Jon

Post Reply