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

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
justinmk85
Posts: 23
Joined: 2017-11-18 18:40

Re: Debian 9 grub boots to command line but works

#31 Post by justinmk85 »

maximus1978 wrote:
justinmk85 wrote:
maximus1978 wrote:The prefix variable is defaulting to...

(hd0,gpt1)/grub

hd0,gpt1 is the efi partition
There is no directory grub in that efi partition?
please try in this order

set root=hd0,gpt2
save_env root

set prefix=(hd0,gpt2)/boot/grub
save_env prefix

Please reboot and let me know the result.

If the command prompt comes back up, please type "set" and post the results.
Command line did come back up
https://imgur.com/gallery/XHHZH
https://imgur.com/gallery/Lva4Q
Please try in this order.

set root=hd0,gpt2
set prefix=(hd0,gpt2)/boot/grub

save_env root
save_env prefix

Please reboot

Let me know what happens.

if command prompt comes back, type set

post the results please
No errors but went to command line after reboot
Set https://imgur.com/gallery/v9udb

maximus1978
Posts: 93
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

#32 Post by maximus1978 »

Please boot into Debian system.

Post the output of...

Code: Select all

cat /etc/fstab
Post the output of......

Code: Select all

fdisk -l
Is the main hard drive "/dev/sda"?

If it is, then do this next step.

Code: Select all

[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
if this is the result...("EFI boot on HDD")

Code: Select all

grub-install /dev/sda
update-grub
Please reboot.

Let me know the result.

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

Re: Debian 9 grub boots to command line but works

#33 Post by justinmk85 »

maximus1978 wrote:Please boot into Debian system.

Post the output of...

Code: Select all

cat /etc/fstab
Post the output of......

Code: Select all

fdisk -l
root@debian:/home/justin# cat /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).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/mmcblk0p2 during installation
UUID=8e77bcd0-bb33-4549-a329-5abfed7e0a8c / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/mmcblk0p1 during installation
UUID=6E89-3EA0 /boot/efi vfat umask=0077 0 1
# swap was on /dev/mmcblk0p3 during installation
UUID=cc96a754-5db9-4a3d-8bf6-62512b7e5f03 none swap sw 0 0
--------------------------

root@debian:/home/justin# fdisk -l
Disk /dev/mmcblk0: 29.1 GiB, 31268536320 bytes, 61071360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A47A49D4-CC6A-4DD8-A859-2ABEB9825947

Device Start End Sectors Size Type
/dev/mmcblk0p1 2048 1050623 1048576 512M EFI System
/dev/mmcblk0p2 1050624 57120767 56070144 26.8G Linux filesystem
/dev/mmcblk0p3 57120768 61069311 3948544 1.9G Linux swap

Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
maximus1978 wrote:Is the main hard drive "/dev/sda"?
The main hd is mmcblk0 (toshiba cl15t laptop with emmc sd drive)

There are 2 boot partitions in the fdisk output... boot0 and boot1... just noticed that

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

Re: Debian 9 grub boots to command line but works

#34 Post by justinmk85 »

maximus1978 wrote:Is the main hard drive "/dev/sda"?

If it is, then do this next step.

Code: Select all

[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
if this is the result...("EFI boot on HDD")

Code: Select all

grub-install /dev/sda
update-grub
Please reboot.

Let me know the result.
root@debian:/home/justin# [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
EFI boot on HDD
root@debian:/home/justin# grub-install /dev/mmcblk0
Installing for x86_64-efi platform.
Installation finished. No error reported.
root@debian:/home/justin# update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.9.0-4-amd64
Found initrd image: /boot/initrd.img-4.9.0-4-amd64
Adding boot menu entry for EFI firmware configuration
done
root@debian:/home/justin#

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

Re: Debian 9 grub boots to command line but works

#35 Post by justinmk85 »

maximus1978 wrote: Please reboot.

Let me know the result.
Rebooted and the command line still came up.

maximus1978
Posts: 93
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

#36 Post by maximus1978 »

The main hd is mmcblk0 (toshiba cl15t laptop with emmc sd drive)

There are 2 boot partitions in the fdisk output... boot0 and boot1... just noticed that
wow

something wrong here for sure

Question 1:

Is this already a production install?
I would suggest running the Debian installer again and doing a fresh install. Delete all partitions and let the Linux installer use the disk and partition accordingly. (if possible of course)

Please login to debian system as is right now thou.

Code: Select all

blkid
Please post the result of this command.

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

Re: Debian 9 grub boots to command line but works

#37 Post by justinmk85 »

maximus1978 wrote:
The main hd is mmcblk0 (toshiba cl15t laptop with emmc sd drive)

There are 2 boot partitions in the fdisk output... boot0 and boot1... just noticed that
wow

something wrong here for sure

Question 1:

Is this already a production install?
I would suggest running the Debian installer again and doing a fresh install. Delete all partitions and let the Linux installer use the disk and partition accordingly. (if possible of course)

Please login to debian system as is right now thou.

Code: Select all

blkid
Please post the result of this command.
root@debian:/home/justin# blkid
/dev/mmcblk0: PTUUID="a47a49d4-cc6a-4dd8-a859-2abeb9825947" PTTYPE="gpt"
/dev/mmcblk0p1: UUID="6E89-3EA0" TYPE="vfat" PARTUUID="75974d51-c29f-4c59-b617-129a3385fc10"
/dev/mmcblk0p2: UUID="8e77bcd0-bb33-4549-a329-5abfed7e0a8c" TYPE="ext4" PARTUUID="2cb69ac2-51a4-4cf6-b24b-e0c1f52eea83"
/dev/mmcblk0p3: UUID="cc96a754-5db9-4a3d-8bf6-62512b7e5f03" TYPE="swap" PARTUUID="d5ae4405-eed2-4460-8769-ec61255f46ff"

/dev
ls -al
brw-rw---- 1 root disk 179, 256 Nov 22 05:19 mmcblk0boot0
brw-rw---- 1 root disk 179, 512 Nov 22 05:19 mmcblk0boot1
brw-rw---- 1 root disk 179, 1 Nov 22 05:19 mmcblk0p1
brw-rw---- 1 root disk 179, 2 Nov 22 05:19 mmcblk0p2
brw-rw---- 1 root disk 179, 3 Nov 22 05:19 mmcblk0p3

----

I could reinstall no problem. However, I have already tried with the same debian live usb I made multiple times. I select use the entire hard drive while installing, but it seems to ignore the boot0 (I'm guessing that is the leftover from mint). I also selected to have grub put in the front of the mbr when it prompted me since debian is the only OS on this laptop.
I have thought about booting another live session of something else like boot and nuke or something. Any suggestions? Or possibly using terminal from live session to wipe the drive but I don't know the root password for debian live session.

maximus1978
Posts: 93
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

#38 Post by maximus1978 »

Please run the installer and post the screenshots of the following screens.

I have attached some screenshots of what screens I am looking for.

https://imagebin.ca/v/3iAzxoRZPUNr
https://imagebin.ca/v/3iB0KIBXApuB

In this screenshot. It should be totally free. The entire drive should be available for Debian 9 installer to partition the whole drive.
Just verify you are not selecting "Use available space".

We want to use Guided Partitioning.

"Guided - user entire disk"

https://imagebin.ca/v/3iB0SPTr24t5

This is the screen.

https://imagebin.ca/v/3iB2AZ2LnDBZ

Just verifying :)

Please post what you find.

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

Re: Debian 9 grub boots to command line but works

#39 Post by justinmk85 »

maximus1978 wrote:Please run the installer and post the screenshots of the following screens.

I have attached some screenshots of what screens I am looking for.

https://imagebin.ca/v/3iAzxoRZPUNr
https://imagebin.ca/v/3iB0KIBXApuB

In this screenshot. It should be totally free. The entire drive should be available for Debian 9 installer to partition the whole drive.
Just verify you are not selecting "Use available space".

We want to use Guided Partitioning.

"Guided - user entire disk"

https://imagebin.ca/v/3iB0SPTr24t5

This is the screen.

https://imagebin.ca/v/3iB2AZ2LnDBZ

Just verifying :)

Please post what you find.
My screens look a little different. Here they are... https://imgur.com/gallery/n24Gs

I selected some different options to see what was available here...https://imgur.com/gallery/Zzt2s

I remember when I installed it before I selected guided use entire disk. Then selected finish changes instead of selecting the drive and clearing it

maximus1978
Posts: 93
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works

#40 Post by maximus1978 »

The 1 MB of free space in the partitioning. Does the installer put that there or are you selecting it manually.

Have you tried deleting all existing partitions and have just the free space and then have the installer automatically partition.

I just tried this in qemu and the 1MB free space is not there.

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

Re: Debian 9 grub boots to command line but works

#41 Post by justinmk85 »

I figured it out finally :) I wasn't able to use the debian installer to clear the disk because it has to have a root file system specified it wouldn't just clear it.
After doing some more research I found a way in terminal to clear the entire disk and the mbr (installer wouldn't do that). I finally got root access using debian live session root terminal and used this:

Code: Select all

dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1
Ran debian installer after that and installed. After reboot the issue was fixed.

Thanks for all the help everyone!

maximus1978
Posts: 93
Joined: 2015-03-19 12:49

Re: Debian 9 grub boots to command line but works SOLVED

#42 Post by maximus1978 »

Very cool.

So the first sector had some code there that Debian installer was not able to delete.
So that is why there were 2 partitions for efi.

Great Job.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Debian 9 grub boots to command line but works

#43 Post by Head_on_a_Stick »

Just for the record:
justinmk85 wrote:After doing some more research I found a way in terminal to clear the entire disk and the mbr (installer wouldn't do that). I finally got root access using debian live session root terminal and used this:

Code: Select all

dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1
That command will not clear a GUID partition table ("GPT disk") because of the backup tables elsewhere on the disk.

To clear disks with a GUID partition table, install the gdisk package and run:

Code: Select all

# sgdisk --zap-all /dev/sdX
deadbang

Post Reply