Install of Buster to flash drive breaks HDD UEFI boot

Help with issues regarding installation of Debian
Post Reply
Message
Author
Kevin1
Posts: 29
Joined: 2014-12-23 22:34

Install of Buster to flash drive breaks HDD UEFI boot

#1 Post by Kevin1 »

My Toshiba Satellite C870D laptop is running Debian Jessie 8.11 and kernel 3.16.0-11-amd64 via UEFI boot with Secure Boot disabled.

lsblk shows:

Code: Select all

NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                       8:0    0 465.8G  0 disk  
├─sda1                    8:1    0   512M  0 part  /boot/efi
├─sda2                    8:2    0   244M  0 part  /boot
└─sda3                    8:3    0   465G  0 part  
  └─sda3_crypt          254:0    0   465G  0 crypt 
    ├─Laptop--vg-root   254:1    0 461.1G  0 lvm   /
    └─Laptop--vg-swap_1 254:2    0   3.9G  0 lvm   [SWAP]

To check out Buster before upgrading I booted 'firmware-10.7.0-amd64-netinst.iso' on a CD and installed to a 'SanDisk Extreme Go 64GB' USB flash drive.

To partition, I selected 'Guided - use entire disk' and 'all files in one partition'.

After installation I attempted to boot the USB drive, but the screen displayed: 'Checking media' followed by 'No bootable device -- please restart system'. The same occurred when attempting to boot Jessie on the HDD.

Using the rEFInd boot manager on a flash drive I can boot into both Jessie on the HDD and Buster on the USB drive.

I have repaired the HDD boot by following the instructions at https://wiki.debian.org/GrubEFIReinstall, but do not know how to also fix the USB drive boot.

#efibootmgr shows:

BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,2003,2001,2002
Boot0000* EFI Network 0 for IPv6 (4C-72-B9-E1-09-C1)
Boot0001* EFI Network 0 for IPv4 (4C-72-B9-E1-09-C1)
Boot0003* debian
Boot0007* Windows Boot Manager
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network

Strangely, I can boot from CDs, DVDs and from Puppy Linux Live on a USB flash drive, despite the HDD being first in the boot order, but I cannot boot from the Buster flash drive.

If I attempt to change the above boot order via '#efibootmgr -o .....', the change does not persist through a reboot.

I realise that I could permanently install the rEFInd boot manager, but would prefer to get things working properly without a 3rd party fix.

I would appreciate advice on how to achieve this, plus an indication of what might be going wrong during the install process.

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Install of Buster to flash drive breaks HDD UEFI boot

#2 Post by Head_on_a_Stick »

Please read the Frequently Asked Questions thread in the HowTo section of the forums.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

p.H
Posts: 1969
Joined: 2017-09-17 07:12
Been thanked: 9 times

Re: Install of Buster to flash drive breaks HDD UEFI boot

#3 Post by p.H »

Installing multiple Debian instances with UEFI boot is troublesome : all installations use the same EFI boot entry label "debian", so the latest installation ovewrites the existing EFI boot entry with its own. Also, creating an EFI boot entry for a removable device is not a good idea, but the Debian installer provides no option to either not create any or to create one with a different label. The only option it provides in expert mode is to install a copy of the GRUB boot loader in the "removable device path" of the EFI system partition. This location does not require an EFI boot entry and should be used as a fallback boot loader if existing EFI boot entries fail.

To install GRUB as the fallback boot loader, there are two methods :

copy /boot/efi/EFI/debian/grubx64.efi as /boot/efi/EFI/boot/bootx64.efi (if secure boot is disabled and GRUB is already installed)
or

Code: Select all

grub-install --no-nvram --force-extra-removable
if GRUB has not been installed yet, provided that the proper EFI system partition is mounted on /boot/efi.

Kevin1
Posts: 29
Joined: 2014-12-23 22:34

Re: Install of Buster to flash drive breaks HDD UEFI boot

#4 Post by Kevin1 »

Thanks very much for the replies.

Being very much a novice in UEFI matters, after reading '[FAQ] New system won't boot' and finding that things in my system were not exactly as described, I was still unsure how to add booting from the external USB drive.

As GRUB was already installed I tried
copy /boot/efi/EFI/debian/grubx64.efi as /boot/efi/EFI/boot/bootx64.efi
but this had no effect.

Trusting the rEFInd boot manager as, running on a flash drive, it has saved me on several occasions, I decided to risk installing it as permanent boot manager.

It allows me to boot Jessie from the HDD and Buster from the flash drive.

Surprisingly (to me) Two different 'Live' systems on flash drives boot directly, somehow bypassing rEFInd, as does the Buster installation CD.

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Install of Buster to flash drive breaks HDD UEFI boot

#5 Post by Head_on_a_Stick »

Kevin1 wrote:As GRUB was already installed I tried
copy /boot/efi/EFI/debian/grubx64.efi as /boot/efi/EFI/boot/bootx64.efi
but this had no effect.
For which system did you run those commands?
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

Kevin1
Posts: 29
Joined: 2014-12-23 22:34

Re: Install of Buster to flash drive breaks HDD UEFI boot

#6 Post by Kevin1 »

I found some time to play around with this again. With rEFInd removed, The HDD booted directly, but Buster on the USB drive would not.
I booted into Buster via rEFInd on a USB drive then again tried ...
copy /boot/efi/EFI/debian/grubx64.efi as /boot/efi/EFI/boot/bootx64.efi
... and it worked.
All I can think is that I must have been in the Jessie HDD system when I tried before. Doh!
Thanks again for the advice.

Post Reply