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

 

 

 

Unable to create bootable external backup drive

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
zerker
Posts: 3
Joined: 2019-12-17 23:10
Location: Canada

Unable to create bootable external backup drive

#1 Post by zerker »

Hello folks. I'm a fairly long-time Linux user trying to do something new... and having problems (as often is the case). I thought to myself "wouldn't it be great if I could directly boot from my backup external hard drive?".

In short, I've installed GRUB via --removable into this drive, and while the BIOS sees it as a boot option,

1) It is listed as a generic "UEFI OS"
2) Attempting to boot prints the message

Code: Select all

System BootOrder not found. Initializing defaults.

Reset System
then reboots less than a second later.

I've done some research looking for this message, but everything I can find seems to be for initial OS install rather than configurable a removable boot setup. As such, solutions like manually trusting the grub binary or tweaking additional BIOS settins don't seem applicable to my setup. I'm already happily booting off UEFI for my main OS, and have no trouble booting other UEFI removable USB drives (e.g. installers or an Arch live drive I set up a while ago)

The backup is basically a mirror of my main Debian system (presently Testing) using rsync -aHv and excluding several folders (like dev, sys, etc). Boot and boot/efi are both present, with EFI allocated its own partition with boot and esp flags set.

I'm sure there are some other hurdles I'm going to need to debug later with my overall setup, but right now it simply appears that GRUB isn't starting at all. From my understanding, this is based primarily on the bootloader files in the 'EFI/BOOT' folder of the EFI System Partition. As such, I'm not terribly concerned with the grub menu itself at this point.

The contents of /EFI/BOOT on the EFI SP are as follows (via tree and md5sum:

Code: Select all

.
└── EFI
    └── BOOT
        ├── BOOTX64.CSV
        ├── BOOTX64.EFI
        ├── fbx64.efi
        ├── grub.cfg
        ├── grubx64.efi
        └── mmx64.efi
        
4a778f6779402a4d938c94491137f4eb  BOOTX64.CSV
8273287f52ffff4624121d2926ef9df4  BOOTX64.EFI
1dfc893d8b8c9a3279511b3758da245f  fbx64.efi
7113f425a3194decccd8c7c36e738772  grub.cfg
fbd76f6673dd999b7cc77a132c031caf  grubx64.efi
a3037a61d4e77f38f4d3be694ca2350e  mmx64.efi
Contents of BOOTX64.CSV

Code: Select all

shimx64.efi,debian,,This is the boot entry for debian
And grub.cfg

Code: Select all

search.fs_uuid 93fea868-fa32-4d26-ab2a-c27ce8d56283 root hd3,gpt2 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
It's a little odd that the CSV file is citing shimx64.efi when that exact file isn't actually installed. I tried changing it to bootx64.efi to no effect.

I tried two methods of installing GRUB onto this drive:

Method 1: Install from my regular desktop
I performed the following sequence to install the bootloader:

Code: Select all

# mount /dev/sdc2 /mnt
# mount /dev/sdc1 /mnt/boot/efi
# grub-install --boot-directory=/mnt/boot \
    --efi-directory=/mnt/boot/efi \
    --removable --no-nvram --uefi-secure-boot \
    /dev/sdc
I wasn't sure whether the no-nvram was needed; I used it to ensure my backup disk isn't dependent on any information stored on this specific machine. However, the --removable option might assume this anyways. I tried it without this option with no difference.

Method 2: Install from a chroot environment
For this method, I performed the following sequence (mkdirs for folders excluded by the backup).

Code: Select all

# mount /dev/sdc2 /mnt
# mount /dev/sdc1 /mnt/boot/efi
# cd /mnt
# mkdir proc sys dev tmp /var/tmp
# mount -t sysfs sys sys
# mount -t proc proc proc
# mount /dev dev -o bind
# chroot .
# grub-install --removable --no-nvram --uefi-secure-boot /dev/sdc
So... am I doing something wrong? Any suggestions? Should I just raise a bug report?

Reference info follows:
My machine is using an Asus Prime Z270 A Motherboard, with BIOS Ver 0906
Exxternal drive is a pretty standard WD "My Passport" USB Hard drive.

lsblk and blkid outputs for this drive below:

Code: Select all

sdc               8:32   0   1.8T  0 disk  
├─sdc1            8:33   0   100M  0 part  
├─sdc2            8:34   0   1.8T  0 part  
└─sdc3            8:35   0   401M  0 part  

/dev/sdc1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="4F25-9108" TYPE="vfat" 
    PARTLABEL="OMICRONEFI" PARTUUID="41cde82f-105f-4677-b80f-0cefb9f619ab"
/dev/sdc2: LABEL="Omicron" UUID="93fea868-fa32-4d26-ab2a-c27ce8d56283" TYPE="ext4" 
    PARTLABEL="Omicron" PARTUUID="b8a63b5c-01c1-4754-b2a9-912d58f9efae"
/dev/sdc3: UUID="f8de5ce9-d8ff-4c18-875e-6605a277b723" TYPE="crypto_LUKS" 
    PARTUUID="83dd3b82-e1ea-40a9-8e15-1a1241b9f55c"
Grub packages:

Code: Select all

grub-common/testing,unstable,now 2.04-4 amd64 [installed]
grub-efi-amd64-bin/testing,unstable,now 2.04-4 amd64 [installed,automatic]
grub-efi-amd64-signed/testing,unstable,now 1+2.04+4 amd64 [installed,automatic]
grub-efi-amd64/testing,unstable,now 2.04-4 amd64 [installed]
grub-theme-starfield/testing,unstable,now 2.04-4 amd64 [installed]
grub2-common/testing,unstable,now 2.04-4 amd64 [installed,automatic]

Post Reply