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

 

 

 

GRUB bootloader fails to install on harddrive!

Ask for help with issues regarding the Installations of the Debian O/S.
Message
Author
bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

GRUB bootloader fails to install on harddrive!

#1 Post by bepiyi6777 »

I have an old Surface Pro 3 that I have been trying to install debian buster net-install on, but to no prevail. Everything goes smoothly until I reach the part were the GRUB is being installed. I have tried to partion my disc differently according to some research, as well as turning of secure boot etc. Nothing have worked so far. Wondering if anyone has any tips on possible solutions.

Chrisdb
Posts: 279
Joined: 2018-04-10 07:16

Re: GRUB bootloader fails to install on harddrive!

#2 Post by Chrisdb »

I have an old Surface Pro 3 that I have been trying to install debian buster net-install on, but to no prevail.
http://forums.debian.net/viewtopic.php?f=20&t=116724

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

Re: GRUB bootloader fails to install on harddrive!

#3 Post by p.H »

Look for the exact error message in the installer logs. You can read the latest messages in the log console tty4, or the full log in /var/log/syslog in a shell console tty2 or tty3.
Press Ctrl+Alt+FN to switch to tty N.

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#4 Post by bepiyi6777 »

Hi, I have attached some media files and information of how I go through the installion, and when the error occurs. Hopefully it is helpful to determinating what I am doing wrong.

1. I download the net install .iso and flash it to a USB drive by using Rufus (see attached image).

2. I copy the needed firmware (wi-fi drivers) to the USB. (see attached image)

3. I boot into the USB drive and proceed with installation as normal (Language, location, locale, load extra firmware, connect to wi-fi, hostname, domain name, root password, full name of user, username, user password)

4. Until I reach the step were I need to partion the disks. Here I have tried different methods, but for this example I chose 'guided partioning, use entire disk'. (see attached images)

It then goes on and starts installing the base system. No issues yet. After it is done I am promted to configure the package manager and choose a mirror.

I then have to decide which software I would like to install, I chose none (I have tried with 'standard system utilities', I still get GRUB error). (see attached image)

Finally when starting to install the GRUB boot loader I get the following message. (see attached image)

NOTE: All images are available to download on the following link: https://www.swisstransfer.com/d/5eab1d0 ... 5d26eda8a7

Thank you for your time!

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

Re: GRUB bootloader fails to install on harddrive!

#5 Post by Head_on_a_Stick »

You've ignored p.H's post, we need to know the errors from TTY4.

EDIT: and I think you need to use "DD" mode [sic] in Rufus, try that.
deadbang

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#6 Post by bepiyi6777 »

Head_on_a_Stick wrote:You've ignored p.H's post, we need to know the errors from TTY4.

EDIT: and I think you need to use "DD" mode [sic] in Rufus, try that.
Okay thank you, I will give "DD" mode a try. I am not sure how to find the log. The shortcut key did not seem to work.


EDIT: I tried formatting using 'DD' but this leaves me with no place to put the additional firmware (the wi-fi drivers) which is neccessary for me to continue with the net install (do not have an ethernet port).

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

Re: GRUB bootloader fails to install on harddrive!

#7 Post by Head_on_a_Stick »

bepiyi6777 wrote:I tried formatting using 'DD' but this leaves me with no place to put the additional firmware (the wi-fi drivers) which is neccessary for me to continue with the net install
Use one of the unofficial ISO images that already contain the non-free firmware.
deadbang

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#8 Post by bepiyi6777 »

Head_on_a_Stick wrote:
bepiyi6777 wrote:I tried formatting using 'DD' but this leaves me with no place to put the additional firmware (the wi-fi drivers) which is neccessary for me to continue with the net install
Use one of the unofficial ISO images that already contain the non-free firmware.
That was my first thought as well, and I tried it, but it could not seem to find the firmware while installing.

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

Re: GRUB bootloader fails to install on harddrive!

#9 Post by Head_on_a_Stick »

Did you use "DD" mode [sic] when transferring the non-free ISO image?

Not tried it myself but I think you can supply the firmware on a separate device: https://www.debian.org/releases/buster/ ... 04.en.html
deadbang

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#10 Post by bepiyi6777 »

Head_on_a_Stick wrote:Did you use "DD" mode [sic] when transferring the non-free ISO image?

Not tried it myself but I think you can supply the firmware on a separate device: https://www.debian.org/releases/buster/ ... 04.en.html
Unfortunately I do not have any other available ports. Maybe I could partion the USB but I am not sure how that is done.

BTW I do not know if it matters, but the Surface came with Windows 8 (later upgraded to windows 10) and I then installed Deepin Desktop Enviroment and after that Raspbian. The harddrive has been formatted since and there are currently no OS installed.

EDIT: Yes, used "DD" mode for the non-free ISO.

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

Re: GRUB bootloader fails to install on harddrive!

#11 Post by p.H »

It would be surprising that the installation process went that far if the ISO image was written the wrong way on the USB stick.

PS : still waiting for the detailed error message in the installer log.

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#12 Post by bepiyi6777 »

p.H wrote:It would be surprising that the installation process went that far if the ISO image was written the wrong way on the USB stick.

PS : still waiting for the detailed error message in the installer log.
I believe there is something wrong with were the GRUB bootloader is being installed, as if it is trying to install it on the wrong drive. I don't think the ISO image is necessarily written in the wrong way. That is why I tried different ways of partioning the disk. At one point (can't remember the exact configuration of the partioned disk) it asked me what kernel version I wanted to choose, but in the end I got the same error. I did not quite understand how I am supposed to get the installer error logs. I tried using the shortcut but it did not seem to work.

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

Re: GRUB bootloader fails to install on harddrive!

#13 Post by p.H »

What do you mean by "shortcut" ? The keystrokes Ctrl+Alt+F2, F3 or F4 ?
If they do not work (they should), try the normal (text, non-graphical) install in the installer boot menu. Or select expert install and in the main menu you can select "run a shell" and examine /var/log/syslog.

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#14 Post by bepiyi6777 »

p.H wrote:What do you mean by "shortcut" ? The keystrokes Ctrl+Alt+F2, F3 or F4 ?
If they do not work (they should), try the normal (text, non-graphical) install in the installer boot menu. Or select expert install and in the main menu you can select "run a shell" and examine /var/log/syslog.
I now realized that you meant F4 keys etc, and not the Fn key. Unfortunately my keyboard lacks F4 keys etc.

I ran the normal install (again, as usually) and this time after the GRUB bootloader failed I went into the installer menu and chose 'Execute a shell'. I then typed the following '/var/log/syslog'. The return was a message that said 'Permission denied'. I tried using 'sudo' but got a message saying that it is an unknown command.

Before I entered the shell this message popped up (see image).

https://www.swisstransfer.com/d/4099ae6 ... 37a6f077a5
Last edited by bepiyi6777 on 2020-03-05 18:25, edited 1 time in total.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: GRUB bootloader fails to install on harddrive!

#15 Post by Deb-fan »

Being able to find/google a specific error is always good stuff. Getting the feeling it's just something simple and/or silly being overlooked. Doesn't sound like you're-OP all that familiar with partitioning, though am not downloading mb's of files to see something like the layout on someone's hard drive. You're going for uefi/gpt install ? You don't have CSM thing enabled in system uefi or bios, you do have an Esp/EFI partition as the first partition on target drive and it's formatted fat32 ? Really would've helped giving folks a simple image of partitioning layout though.

Can always re-install grub after completing an install cause gnu/nix is awesome-sauce. Couple of best methods, a cool tiny util called supergrubdisk2 thing can detect and boot from disk tons of OS's in situations like bootloader issues and the big daddy, chroot from live session which can help fix all manner of borkage. Can easily install or repair bootloader problems with basic know-how and pokeage. :P Both are worth knowing about any way it goes. Still get the feeling it's something simple, lines of communication getting crossed here, leading to confusion etc.
Most powerful FREE tech-support tool on the planet * HERE. *

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#16 Post by bepiyi6777 »

Deb-fan wrote:Being able to find/google a specific error is always good stuff. Getting the feeling it's just something simple and/or silly being overlooked. Doesn't sound like you're-OP all that familiar with partitioning, though am not downloading mb's of files to see something like the layout on someone's hard drive. You're going for uefi/gpt install ? You don't have CSM thing enabled in system uefi or bios, you do have an Esp/EFI partition as the first partition on target drive and it's formatted fat32 ? Really would've helped giving folks a simple image of partitioning layout though.

Can always re-install grub after completing an install cause gnu/nix is awesome-sauce. Couple of best methods, a cool tiny util called supergrubdisk2 thing can detect and boot from disk tons of OS's in situations like bootloader issues and the big daddy, chroot from live session which can help fix all manner of borkage. Can easily install or repair bootloader problems with basic know-how and pokeage. :P Both are worth knowing about any way it goes. Still get the feeling it's something simple, lines of communication getting crossed here, leading to confusion etc.
Yes, I do agree with the fact that is is possible a simple and rather specific issue for my instance, that could be easily solved by someone knowledgable if they were give 10 minutes on my computer. You can download the file 'disk_2' to see how the guided partioning partioned my harddrive (its around 4.5MB). Yes, I am going for an UEFI install, and I went through the very few existent settings in my BIOS and couldnt seem to find anything 'familiar' that probably needs to be changed. As it is not my main computer, and the need for fix is not that vital, I havent spent too much time on it. Although I have tried different solutions (including one were I tried to install GRUB after using a live session), but I never went super deep into something. I thought I could ask around online, and if that does not work I might try to find some knowledgable friend or family that could help me out.

I do apprecaite everyone trying to help me, and I apoligize for my lack of communication regarding my issue. :p

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: GRUB bootloader fails to install on harddrive!

#17 Post by Deb-fan »

^ Wasn't really intended as any chastisement but yeah people are not going to go through a lot of clicking/downloading to look over simple stuff to try to help someone. Have seen folks complaining about this or that make/model systems lack of controls in firmware, if you google "install Linux (your PC model)" and get tons of links by people having problems, then yep ... May have a known problem child on your hands, doesn't sound like it cause you can apparently easily disable secureboot on it. Who knows though. Don't think oem's, Mobo makers do it so much maliciously, just for expedience, system's meant to ship out w windows, so focus on it. Time is money, have always stayed with brands known to be better gnu/nix friendly ... so haven't encountered such yet but whatever. Am sure it'll be sorted with enough poking, <end all-over-place dorkness.> :)
Most powerful FREE tech-support tool on the planet * HERE. *

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

Re: GRUB bootloader fails to install on harddrive!

#18 Post by p.H »

Guys, you are way too verbose. TL;DR.

Sticking to the topic,
bepiyi6777 wrote:I then typed the following '/var/log/syslog'. The return was a message that said 'Permission denied'
/var/log/syslog is a data text file, not an executable nor a command. you must type a command to print the contents file.

Examples :

Code: Select all

cat /var/log/syslog # print the whole file (long)
more /var/log/syslog # prints the whole file and stop after each page (press space to continue)
tail -n 50 /var/log/syslog # print the last 50 lines of the file
Scroll the console up with Shift+PageUp and down with Shift+PageDown.
The "less" command would be more convenient, but I am afraid that it is not available in the installer shell.

bepiyi6777
Posts: 10
Joined: 2020-03-03 21:57

Re: GRUB bootloader fails to install on harddrive!

#19 Post by bepiyi6777 »

p.H wrote:Guys, you are way too verbose. TL;DR.

Sticking to the topic,
bepiyi6777 wrote:I then typed the following '/var/log/syslog'. The return was a message that said 'Permission denied'
/var/log/syslog is a data text file, not an executable nor a command. you must type a command to print the contents file.

Examples :

Code: Select all

cat /var/log/syslog # print the whole file (long)
more /var/log/syslog # prints the whole file and stop after each page (press space to continue)
tail -n 50 /var/log/syslog # print the last 50 lines of the file
Scroll the console up with Shift+PageUp and down with Shift+PageDown.
The "less" command would be more convenient, but I am afraid that it is not available in the installer shell.
From what I was able to tell there is a line that says "Configuring 'grub-installer' failed with error code 1". I could however not scroll, either because there was no more lines to be seen or that it did not work with my keyboard.

EDIT: Found some more information regarding the error (see photo), I can however still not scroll.

https://www.swisstransfer.com/d/0b9e2a5 ... 9394005016

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

Re: GRUB bootloader fails to install on harddrive!

#20 Post by p.H »

Code: Select all

grub-install: error: failed to register the EFI boot entry: Input/output error
I expected something like this. GRUB failed to create the boot entry in the EFI variables.
I do not know what causes it (UEFI firmware bug ?) nor how to fix it, but there may be a workaround : boot with the removable device path.
In the installer main menu, set the question priority to "low" and install GRUB again. The installer should ask whether to install a copy of GRUB in the removable device path. Accept.
Or : in the shell, copy the contents of /target/boot/efi/EFI/debian into /target/boot/efi/EFI/boot and rename /target/boot/efi/EFI/boot/grubx64.efi or shimx64.efi as bootx64.efi. In the installer main menu, continue without installing a boot loader.

Post Reply