Debian 9 grub boots to command line but works SOLVED

Help with issues regarding installation of Debian

Debian 9 grub boots to command line but works SOLVED

Postby justinmk85 » 2017-11-18 18:55

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
Last edited by justinmk85 on 2017-11-23 12:33, edited 1 time in total.
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby maximus1978 » 2017-11-19 02:45

From the grub command line...

type "ls" and post the result
type "set" and post the result
maximus1978
 
Posts: 68
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

Postby justinmk85 » 2017-11-19 13:30

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

Image
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby justinmk85 » 2017-11-19 16:29

The first line got cut off in the image, here it is

cmdpath=(hd0,gpt1)/EFI/UBUNTU
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby Head_on_a_Stick » 2017-11-19 16:36

"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6787
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 9 grub boots to command line but works

Postby p.H » 2017-11-19 20:50

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.
p.H
 
Posts: 177
Joined: 2017-09-17 07:12

Re: Debian 9 grub boots to command line but works

Postby justinmk85 » 2017-11-19 20:56

Yes I had mint installed before I went to debian.

Would I use apt install to install that?
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby p.H » 2017-11-19 21:06

Yes.
p.H
 
Posts: 177
Joined: 2017-09-17 07:12

Re: Debian 9 grub boots to command line but works

Postby maximus1978 » 2017-11-19 22:49

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

Image


in the grub command prompt type the following

set root=hd0
chainloader +1
boot

Please post what happens.
maximus1978
 
Posts: 68
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

Postby justinmk85 » 2017-11-19 22:55

Ok I will try both of these suggestions later tonight and post.
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby justinmk85 » 2017-11-20 04:35

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)
justinmk85
 
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

Postby maximus1978 » 2017-11-20 05:07

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

Image


please try this...

set root=hd0,gpt1
ls /
post result please

set root=hd0,gpt2
ls /
post result please

set root=hd0,gpt3
ls /
post result please
maximus1978
 
Posts: 68
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

Postby p.H » 2017-11-20 05:32

maximus1978 wrote:set root=hd0
chainloader +1
boot

This is EFI boot, not BIOS boot. You must chainload an EFI executable file, not a boot sector.
Code: Select all
chainloader /EFI/debian/grubx64.efi
boot


justinmk85 wrote:boot info script:

Is that all ? Many parts are missing. Did you run the command as root ?
p.H
 
Posts: 177
Joined: 2017-09-17 07:12

Re: Debian 9 grub boots to command line but works

Postby Head_on_a_Stick » 2017-11-20 06:32

The output of
Code: Select all
# efibootmgr -v

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...
"Only the mediocre are always at their best." — Jean Giraudoux
User avatar
Head_on_a_Stick
 
Posts: 6787
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 9 grub boots to command line but works

Postby maximus1978 » 2017-11-20 06:57

maximus1978 wrote:
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

Image


please try this...

set root=hd0,gpt1
ls /
post result please

set root=hd0,gpt2
ls /
post result please

set root=hd0,gpt3
ls /
post result please


grub is not finding the /boot/grub/grub.cfg

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.
maximus1978
 
Posts: 68
Joined: 2015-03-19 12:49

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable