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
Debian 9 grub boots to command line but works SOLVED
-
- Posts: 23
- Joined: 2017-11-18 18:40
Debian 9 grub boots to command line but works SOLVED
I installed debian 9 on my laptop using the live usb method. It is the only OS on the laptop. When it boots up the first screen I see is the grub command line. It's the same screen you get when pressing C at the main grub menu. If I type the exit command there, it will go to the main grub menu and boot into debian with no issues. I've tried reinstalling and it didn't help.
After searching around for info on this issue I've learned that the grub partition is set up as EFI and it is the first partition. Debian is the second partition and swap is the 3rd.
I've tried using resatux via live usb to repair grub and it didn't do anything.
Does anyone have a similar issue or know a solution to this problem? Thanks
After searching around for info on this issue I've learned that the grub partition is set up as EFI and it is the first partition. Debian is the second partition and swap is the 3rd.
I've tried using resatux via live usb to repair grub and it didn't do anything.
Does anyone have a similar issue or know a solution to this problem? Thanks
Last edited by justinmk85 on 2017-11-23 12:33, edited 1 time in total.
-
- Posts: 93
- Joined: 2015-03-19 12:49
Re: Debian 9 grub boots to command line but works
From the grub command line...
type "ls" and post the result
type "set" and post the result
type "ls" and post the result
type "set" and post the result
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
Thanks for replying. Below is what I got:
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
The first line got cut off in the image, here it is
cmdpath=(hd0,gpt1)/EFI/UBUNTU
cmdpath=(hd0,gpt1)/EFI/UBUNTU
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Debian 9 grub boots to command line but works
It seems that you have two GRUB installed.
The first one displaying the command line seems to be from Ubuntu (previous installation ? Dual boot ?).
The second one displaying the menu is from Debian.
Please install boot-info-script and post the report created by the command bootinfoscript.
The first one displaying the command line seems to be from Ubuntu (previous installation ? Dual boot ?).
The second one displaying the menu is from Debian.
Please install boot-info-script and post the report created by the command bootinfoscript.
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
Yes I had mint installed before I went to debian.
Would I use apt install to install that?
Would I use apt install to install that?
-
- Posts: 93
- Joined: 2015-03-19 12:49
Re: Debian 9 grub boots to command line but works
in the grub command prompt type the followingjustinmk85 wrote:Thanks for replying. Below is what I got:
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
set root=hd0
chainloader +1
boot
Please post what happens.
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
Ok I will try both of these suggestions later tonight and post.
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
This is what happened when I tried the chainloader command https://imgur.com/a/PmiiK
boot info script:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
============================ Drive/Partition Info: =============================
no valid partition table found
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/mmcblk0
/dev/mmcblk0p1 6E89-3EA0 vfat
/dev/mmcblk0p2 8e77bcd0-bb33-4549-a329-5abfed7e0a8c ext4
/dev/mmcblk0p3 cc96a754-5db9-4a3d-8bf6-62512b7e5f03 swap
/dev/mmcblk1
/dev/mmcblk1p1 0101-07DC vfat NO_NAME
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/mmcblk0p1 /boot/efi vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/mmcblk0p2 / ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mmcblk1p1 /media/justin/NO_NAME vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
boot info script:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
============================ Drive/Partition Info: =============================
no valid partition table found
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/mmcblk0
/dev/mmcblk0p1 6E89-3EA0 vfat
/dev/mmcblk0p2 8e77bcd0-bb33-4549-a329-5abfed7e0a8c ext4
/dev/mmcblk0p3 cc96a754-5db9-4a3d-8bf6-62512b7e5f03 swap
/dev/mmcblk1
/dev/mmcblk1p1 0101-07DC vfat NO_NAME
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/mmcblk0p1 /boot/efi vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
/dev/mmcblk0p2 / ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/mmcblk1p1 /media/justin/NO_NAME vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
-
- Posts: 93
- Joined: 2015-03-19 12:49
Re: Debian 9 grub boots to command line but works
please try this...justinmk85 wrote:Thanks for replying. Below is what I got:
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
set root=hd0,gpt1
ls /
post result please
set root=hd0,gpt2
ls /
post result please
set root=hd0,gpt3
ls /
post result please
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Debian 9 grub boots to command line but works
This is EFI boot, not BIOS boot. You must chainload an EFI executable file, not a boot sector.maximus1978 wrote:set root=hd0
chainloader +1
boot
Code: Select all
chainloader /EFI/debian/grubx64.efi
boot
Is that all ? Many parts are missing. Did you run the command as root ?justinmk85 wrote:boot info script:
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Debian 9 grub boots to command line but works
The output of
would probably tell us most of what we need to know, I have no idea if that silly wall-of-output "boot info script" includes such a detail but I would prefer to not have to wade through that...
Code: Select all
# efibootmgr -v
deadbang
-
- Posts: 93
- Joined: 2015-03-19 12:49
Re: Debian 9 grub boots to command line but works
grub is not finding the /boot/grub/grub.cfgmaximus1978 wrote:please try this...justinmk85 wrote:Thanks for replying. Below is what I got:
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
set root=hd0,gpt1
ls /
post result please
set root=hd0,gpt2
ls /
post result please
set root=hd0,gpt3
ls /
post result please
root=hd0,gpt1
? Is this the EFI partition?
try
set root=hd0,gpt2
(assuming that this is the Debian partition)
configfile /boot/grub/grub.cfg
Does this bring up your menu?
It would help if you post the "ls /" commands.
Last edited by maximus1978 on 2017-11-20 06:59, edited 1 time in total.
-
- Posts: 93
- Joined: 2015-03-19 12:49
Re: Debian 9 grub boots to command line but works
just verifyingp.H wrote:This is EFI boot, not BIOS boot. You must chainload an EFI executable file, not a boot sector.maximus1978 wrote:set root=hd0
chainloader +1
bootCode: Select all
chainloader /EFI/debian/grubx64.efi boot
Is that all ? Many parts are missing. Did you run the command as root ?justinmk85 wrote:boot info script:
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: Debian 9 grub boots to command line but works
Yes, bootinfoscript is supposed to include the output of efibootmgr -v.Head_on_a_Stick wrote:I have no idea if that silly wall-of-output "boot info script" includes such a detail
Indeed this is a possible cause for GRUB spawning the normal prompt (NOT the rescue prompt) instead of displaying the menu. However /boot/grub seems to be on the EFI partition itself (unlike in Debian), so I wonder why grub.cfg is not found. If the whole /boot/grub was not found then GRUB would spawn the rescue prompt.maximus1978 wrote:grub is not finding the /boot/grub/grub.cfg
Yes it is. See the value of $cmdpath in the output of "set".maximus1978 wrote:root=hd0,gpt1? Is this the EFI partition?
It will probably, but what's the use ? Just typing "exit" to quit the first GRUB from Ubuntu/Mint causes the UEFI firmware to load the next GRUB from Debian.maximus1978 wrote:try(assuming that this is the Debian partition)Code: Select all
set root=hd0,gpt2
Does this bring up your menu?Code: Select all
configfile /boot/grub/grub.cfg
Verify what ?maximus1978 wrote:just verifying
No need to verify that GRUB is in EFI mode. We already know from the value of $platform in the output of set.
If you wanted to verify if the MBR contained a GRUB BIOS boot loader, you cannot chainload it from GRUB EFI.
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
I did run bootinfoscript as root.
I will post the ls / of each later today.
I will try the set root and config file also.
I will post the ls / of each later today.
I will try the set root and config file also.
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
I don't know what these partitions are (see boot info script output).
/dev/mmcblk1
/dev/mmcblk1p1 0101-07DC vfat NO_NAME
Edit... these are probably an sd card I have inserted never mind
/dev/mmcblk1
/dev/mmcblk1p1 0101-07DC vfat NO_NAME
Edit... these are probably an sd card I have inserted never mind
-
- Posts: 23
- Joined: 2017-11-18 18:40
Re: Debian 9 grub boots to command line but works
maximus1978 wrote:please try this...justinmk85 wrote:Thanks for replying. Below is what I got:
ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)
set
image is at this link:
https://imgur.com/j6RsaQV
set root=hd0,gpt1
ls /
post result please
set root=hd0,gpt2
ls /
post result please
set root=hd0,gpt3
ls /
post result please
Result is here https://imgur.com/a/2cjnB