[SOLVED] Grub boots to command instead of desktop

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] Grub boots to command instead of desktop

Postby drfox » 2018-02-10 18:48

I am moving from ubuntu to debian. Installation went fine, but now when I boot I get this:
"Grub version 2.02~beta3-4ubuntu7.1
Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions.
grub>_ "
I can get to my desktop if I type exit, then <enter>, then exit, then <enter>
I have my linux partitions on sda and windows on sdb.
sda1 fat32 boot,efi flag: boot, esp
sda2 ext2
sda3 ext4 /
sda4 linux-swap
sda5 /home
I commented grub so that it would not boot "quiet", but it boots directly to the command without showing errors.
Thanks in advance for any help.
Last edited by drfox on 2018-02-11 12:59, edited 1 time in total.
Lawrence M. Fox, DVM DABVP
Certified in Canine & Feline Practice
River Grove (Chicago), IL USA
drfox
 
Posts: 2
Joined: 2006-08-10 01:54
Location: Chicago, IL USA

Re: Grub boots to command instead of desktop

Postby Head_on_a_Stick » 2018-02-10 18:51

Please load up a "live" ISO image and post the full output of
Code: Select all
# efibootmgr -v

You could try https://wiki.debian.org/GrubEFIReinstall
"An you're a prick. Prick on a stick." — acewiza
User avatar
Head_on_a_Stick
 
Posts: 7474
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Grub boots to command instead of desktop

Postby drfox » 2018-02-10 20:44

Head_on_a_Stick wrote:Please load up a "live" ISO image and post the full output of
Code: Select all
# efibootmgr -v

You could try https://wiki.debian.org/GrubEFIReinstall


Thanks, Head...
Looks like Boot0001 and 0002 are the same...Grub is getting confused. :?
Also, I don't know why ubuntu is showing up as Boot0013
What's my next step?

root@sysresccd /root % efibootmgr -v
BootCurrent: 0014
Timeout: 1 seconds
BootOrder: 0001,0014,0013,0002,0000,0012,0011,0010,000F
Boot0000* Windows Boot Manager HD(1,GPT,215d721b-24db-4dbc-b6c7-039da609b6c1,0x800,0x82000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* ubuntu HD(1,GPT,7c961717-ec3a-4b8e-9754-38a1ac92feef,0x800,0x100000)/File(\EFI\UBUNTU\GRUBX64.EFI)
Boot0002* debian HD(1,GPT,7c961717-ec3a-4b8e-9754-38a1ac92feef,0x800,0x100000)/File(\EFI\DEBIAN\GRUBX64.EFI)
Boot000F* Generic Usb Device VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0010* CD/DVD Device VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0011* UEFI: IPV4 Intel(R) Ethernet Connection (H) I219-LM PciRoot(0x0)/Pci(0x1f,0x6)/MAC(00016cd98190,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0012* UEFI: IPV6 Intel(R) Ethernet Connection (H) I219-LM PciRoot(0x0)/Pci(0x1f,0x6)/MAC(00016cd98190,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0013* ubuntu HD(1,GPT,7c961717-ec3a-4b8e-9754-38a1ac92feef,0x800,0x100000)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO
Boot0014* UEFI: KingstonDataTraveler 2.0PMAP, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(4,0)/HD(1,GPT,dd5058be-515c-4106-996e-ff1575e5a3e6,0x800,0x1d13000)..BO
root@sysresccd /root %
Lawrence M. Fox, DVM DABVP
Certified in Canine & Feline Practice
River Grove (Chicago), IL USA
drfox
 
Posts: 2
Joined: 2006-08-10 01:54
Location: Chicago, IL USA

Re: Grub boots to command instead of desktop

Postby p.H » 2018-02-11 10:14

drfox wrote:I commented grub so that it would not boot "quiet"

Huh ? "Comment GRUB" ? What did you do exactly ?
drfox wrote:Looks like Boot0001 and 0002 are the same

No they're not. Read more carefully. 0001 is for Ubuntu and 0002 is for Debian.

There are currently two instances of GRUB registered in the EFI boot variables : one for Ubuntu and one for Debian.
The current boot order is : 0001 (Ubuntu GRUB), 0014 (USB drive), 0013 (Ubuntu GRUB with secure boot), 0002 (Debian GRUB), 0000 (Windows Boot Manager)... No wonder why you have to exit twice before getting the boot menu : The UEFI firmwares tries to boot the two Ubuntu entries before trying the Debian entry.

It is weird that Debian's GRUB entry was not put first in the boot order, as the latest installed system.
You can clean the Ubuntu stuff and/or change the boot order with efibootmgr.
Code: Select all
efibootmgr -b 0001 -B
efibootmgr -b 0013 -B

And delete the /boot/efi/EFI/ubuntu directory from the EFI partition.

PS : you don't have to run efibootmgr from a live system. You can do it from Debian.
p.H
 
Posts: 383
Joined: 2017-09-17 07:12

Re: Grub boots to command instead of desktop

Postby Head_on_a_Stick » 2018-02-11 11:23

p.H wrote:you don't have to run efibootmgr from a live system. You can do it from Debian.

Yes indeed, sorry OP!

I completely missed the bit where you said you could boot into your system :roll:

EDIT: does setting the Debian entry first cure your problem?
Code: Select all
# efibootmgr -o 2,f,10
"An you're a prick. Prick on a stick." — acewiza
User avatar
Head_on_a_Stick
 
Posts: 7474
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Grub boots to command instead of desktop

Postby p.H » 2018-02-11 12:53

Head_on_a_Stick wrote:I completely missed the bit where you said you could boot into your system

efibootmgr is installed by default only when the installation is performed in EFI mode. At that time we did not know yet whether the system was installed in EFI mode and efibootmgr was present (although the OP could installed it if missing).
Only now we know from the "debian" EFI boot entry that it was installed in EFI mode and efibootmgr is present.
p.H
 
Posts: 383
Joined: 2017-09-17 07:12


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable