You are not logged in.

#1 2017-09-01 04:14:46

horo
Member
Registered: 2016-03-13
Posts: 78

[SOLVED] update-grub fails at install

I installed bl about 3 months ago, but had to switch distros do to wlan driver issues. I'm ready to re-install bl, but I am now getting an error when update-grub tries to run during the installation. This is the same machine with the same live-usb from 3 months prior, so i don't know what could have changed.
I downloaded the latest version from the main site, double checked it's sha256sum and dd it to another usb
same issue
I get a message during install to run vmlinux and target root=/dev/sda but i don't know enough about the grub bash shell to do that.

Last edited by Head_on_a_Stick (2017-09-02 12:17:02)

Offline

#2 2017-09-01 06:29:51

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

horo wrote:

I am now getting an error when update-grub tries to run during the installation.

Are we allowed to know the content of this mysterious error message or is this to be a guessing game?

Can we please see the full output of this command:

sudo parted --list

https://packages.debian.org/jessie/parted

Offline

#3 2017-09-01 14:25:27

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

user@debian:~$ sudo parted --list
Model: ATA ST500LT012-1DG14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  538MB  537MB   fat32                 boot, esp
 2      538MB   496GB  496GB   ext4
 3      496GB   500GB  3722MB  linux-swap(v1)


Warning: The driver descriptor says the physical block size is 2048 bytes, but
Linux says it is 512 bytes.
Ignore/Cancel? n                                                          
parted: invalid token: n
Ignore/Cancel? ignore
Model: TOSHIBA TransMemory (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags: 

Number  Start  End    Size   File system  Name   Flags
 1      2048B  6143B  4096B               Apple
 2      153MB  154MB  721kB               EFI


user@debian:~$ 

The error for 'update-grub' doesn't give much info other than "grub failed to update. This is a fatal error" and that the OS will not be able to boot until it's corrected. I'm then given the options to retry that portion of the install or continue and use the vmlinux command to manually boot the OS.

Offline

#4 2017-09-01 14:36:22

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] update-grub fails at install

See https://wiki.archlinux.org/index.php/Grub for "GUID Partition Table (GPT) specific instructions".


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2017-09-01 21:01:03

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

^ Arch packages the UEFI and non-UEFI versions of GRUB together but Debian splits them and does away with the (very confusing) target={x86_64-efi,i386-pc} option so that guide doesn't apply to us.

horo wrote:

with the same live-usb from 3 months prior

Try again with a fresh ISO image, I can't remember when we added UEFI support but your GPT drive will now need this — it must have been formatted with an msdos partition table last time but now that it is GPT it will need either a BIOS boot partition (to boot in Legacy mode, this is not advised) or to install in UEFI mode (which will require a current ISO image).

Offline

#6 2017-09-02 00:45:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,606
Website

Re: [SOLVED] update-grub fails at install

Head_on_a_Stick wrote:

when we added UEFI support

With the "Deuterium" point upgrade, 2017-04-29.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#7 2017-09-02 01:12:28

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

already tried a new ISO. same error message. I checked sha256sum prior to creating the live usb and it matched.

Offline

#8 2017-09-02 01:29:58

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

Make sure that UEFI mode is enabled and CSM or "Legacy" mode is disabled in your firmware ("BIOS") options when the ISO image is booted.

You can check if the installer is booted in UEFI mode by switching to a console with <Ctrl>+<Alt>+F3 and checking if /sys/firmware/efi/ exists.

The output of

sudo efibootmgr -v

from the "live" session may be useful; we can also check the contents of the EFI system partition:

sudo mount /dev/sda1 /mnt
find /mnt

Please be sure to use code tags for the output as it may be lengthy.

Offline

#9 2017-09-02 01:47:21

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

last i checked the bios was set to legacy to get around windows 8 being garbage. I'll reboot and double check that

user@debian:~$ sudo efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 2001,0001,0000,2002,2004
Boot0000* Notebook Hard Drive - ST500LT012-1DG142	BIOS(2,500,4e6f7465626f6f6b2048617264204472697665202d2053543530304c543031322d31444731343200)................-.R.......R.A.R..................................Xl.........A.......................
Boot0001* USB Hard Drive - TOSHIBA TransMemory	BIOS(7,500,5553422048617264204472697665202d20544f5348494241205472616e734d656d6f727900)............................................................................A...........................
Boot0002* USB Hard Drive (UEFI) - TOSHIBA TransMemory (TOSHIBA TransMemory)	ACPI(a0341d0,0)PCI(12,0)USB(0,0)USB(0,0)HD(1,492f4,580,16704065)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC

user@debian:~$ sudo mount /dev/sda1 /mnt
user@debian:~$ find /mnt
/mnt
/mnt/EFI
/mnt/EFI/bunsenlabs
/mnt/EFI/bunsenlabs/grubx64.efi

EDIT- Yup, in legacy mode. Switching back to UEFI prevents the USB from booting

Last edited by horo (2017-09-02 01:55:18)

Offline

#10 2017-09-02 01:56:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

horo wrote:

last i checked the bios was set to legacy

That would explain the error.

We can try a hack fix (my speciality), from the "live" session:

sudo -i
mount /dev/sda1 /mnt
mkdir -p /mnt/EFI/BOOT
cp /mnt/EFI/bunsenlabs/grubx64.efi /mnt/EFI/BOOT/BOOTX64.EFI
reboot

Your motherboard should then load (EFI)GRUB automatically once Legacy mode is disabled.

Alternatively, re-run the installer in UEFI mode to generate an NVRAM entry to boot $ESP/EFI/bunsenlabs/grubx64.efi

Offline

#11 2017-09-02 01:58:02

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

horo wrote:

Switching back to UEFI prevents the USB from booting

That should not happen.

Please post the exact command(s) used to transfer the ISO image to the USB stick.

My "hack fix" should work anyway.

Offline

#12 2017-09-02 02:14:34

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

i transfered the iso to the usb with


sudo dd if=/path/to/iso of=/dev/sdb bs=4M ; sync

which is how i normally make the usb

the UEFI boot order is USB CD/DVD, USB Diskette, Internal HD, network adapter

For the hack fix, should i install the OS and ignore the update-grub error and let it install in full?
I think my last attempt I aborted install.

edit-
Will the hack fix work with an encrypted hard drive?

Last edited by horo (2017-09-02 02:54:30)

Offline

#13 2017-09-02 03:47:54

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

More info!

I tried to install the OS again, going with the simplest guided partition setup, then performed the hack fix.

I rebooted and changed the bios settings back to EFI then opened up boot options with the live usb still plugged in
I had the fallowing options-

OS manager bunsenlabs
USB thumb drive (EFI)
open EFI file

i tried each, with the efi file option leading me to the BOOTX64.EFI file from the hack fix.

All returned the error 'image can not be Authenticated'.

I then set bios to legacy mode and checked my boot options again. I now had the addition of USB thumb drive and internal hard drive.
Selecting USB got me the bunselab live usb selection screen but with chunkier graphics. selecting USB (EFI) got me the normal bunsenlab live selection screen.
Anything else just dumped me into grub shell


EDIT- SUCCESS!

i booted into the older looking bunsenlab live selection screen and installed from there. I guessed it would be the splash screen i would get on non EFI hardware and it installed GRUB without issue. I'm now up and running on a fesh install!

The EFI authintication appear to be  firmware issue on my side?? Not sure but no longer an issue so don't care. Thank you for your help, see you in another thread about me being incompetent at linux

Last edited by horo (2017-09-02 04:18:57)

Offline

#14 2017-09-02 06:04:52

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: [SOLVED] update-grub fails at install

Sounds like a secure boot problem to me. There are two aspects to efi, one being efi and the other being secure boot.

Offline

#15 2017-09-02 12:16:16

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

horo wrote:

I rebooted and changed the bios settings back to EFI then opened up boot options with the live usb still plugged in
I had the fallowing options-

OS manager bunsenlabs
USB thumb drive (EFI)
open EFI file

i tried each, with the efi file option leading me to the BOOTX64.EFI file from the hack fix.

All returned the error 'image can not be Authenticated'.

tknomanzr wrote:

Sounds like a secure boot problem to me.

^ This.

Had you disabled Secure Boot then your system would have booted, I think.

However:

i booted into the older looking bunsenlab live selection screen and installed from there. I guessed it would be the splash screen i would get on non EFI hardware and it installed GRUB without issue. I'm now up and running on a fesh install!

Sounds like a non-UEFI installation worked, confirm by running this command from the installed system:

[ -d /sys/firmware/efi ] && echo UEFI || echo Legacy

It would be interesting to see your partition layout now if you don't mind posting the output of `sudo parted --list` again.

Offline

#16 2017-09-02 19:43:27

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

Head_on_a_Stick wrote:

My "hack fix"

Disclaimer: the method is not actually mine, I stole it from Rod Smith's excellent site  ]:D

Original source:

http://www.rodsbooks.com/efi-bootloader … ive-naming

Offline

#17 2017-09-03 16:21:28

horo
Member
Registered: 2016-03-13
Posts: 78

Re: [SOLVED] update-grub fails at install

Don't minds posting final results at all-

lboo@crunchbox:~$ sudo parted --list
[sudo] password for lboo: 
Model: ATA ST500LT012-1DG14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  10.0GB  9999MB  primary   ext4            boot
 2      10.0GB  500GB   490GB   extended
 5      10.0GB  17.4GB  7445MB  logical   linux-swap(v1)
 6      17.4GB  500GB   483GB   logical   ext4

lboo@crunchbox:~$ [ -d /sys/firmware/efi ] && echo UEFI || echo Legacy
Legacy
lboo@crunchbox:~$

So far everything seems to be going smoothly on the new install and the back-ported kernal upgrade appears to have improved  wlan performance

Offline

#18 2017-09-04 06:19:03

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

OK, thanks, that confirms that you now have a non-UEFI system and an msdos partition table, as suspected.

The system should work fine as it is but UEFI does offer more flexibility for multiboot systems, IMO.

The only remaining question is why the UEFI installation did not work — our Deuterium images are supposed to support that (and do, in my experience)  hmm

Offline

#19 2017-09-04 16:52:36

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: [SOLVED] update-grub fails at install

I am fairly sure there are bios's out there that do not properly implement disabling secure boot according to Microsoft's specifications. With them, if UEFI is on, then so is secure boot and there is no way to disable secure boot eithout also disabling UEFI. This is not acoording to Microsoft's desgn specification.  The op might not have noticed the switch to turn it off as well. I am unsure where Debian stands in relation to secure boot. I do know, back when I was messing with it, setting up self-signed keys was a real pain.

Offline

#20 2017-09-05 06:23:22

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,084
Website

Re: [SOLVED] update-grub fails at install

tknomanzr wrote:

where Debian stands in relation to secure boot

It is still in development but may be introduced during the stretch release:

https://lists.debian.org/debian-devel-a … 00013.html

Offline

Board footer

Powered by FluxBB