Bootloader problems with DietPi x86 external drive

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.1.1 and older 8.2.x?

  • Distro version | x86 PC BIOS legacy
    HP i3, Dell i5 E7450 laptop

  • SDD 512GB Kingston, HDD 930TB Hitachi, unpowered USB3 enclosure.

  1. So I have been booting DietPi from SSD/HDD on above PCs that run Windows 10 default on internal drive, with BIOS priority set to external HDD/SDD and find frequent boot problems.

Usually powering up works fine with DietPi booting correctly. But rebooting via CLI results in Windows coming up instead most of the times.

Upon reading DietPi forum, it looks like I need a powered solution which I am proceeding to do…

  1. Lately I ran DietPi-update to go from v8.2.x to 9.1.1 on the Dell laptop, and upon reboot it went into Windows boot.

Now powering up also results in Windows boot.

  1. Now the problem is that the bootloader crashed, with error like: "attempts to access disk failed…grub-rescue >’

So I tried Rescuezilla ( Clonezilla GUI) which I have used for cloning and backing up DietPi custom images.

I tried running the grub install using Sec 5.2 instructions:

But I keep getting mixed messages about ‘efi directory not found’ or ‘not efi partition?’

Tried mkdir /efi and running various Linux commands from Rescuezilla terminal to figure out efi vs legacy boot type, and mounting and locating boot mounts etc.

But even though my DietPi install was legacy BIOS, the command shows it is efi boot.

However when I run the grub install for efi or for BIOS, I keep getting both error messages above.
Looks like boot recognition is mixed up.

I realized just now that, unlike for SBCs like RPI, x86 DietPi installs are a single ext4 partition.

So maybe the SBC fixes in DietPi forum don’t apply ?

  1. What are possible solutions, hopefully via Rescuezilla, without data loss?

A. I do recognize that boot delay issues in #1 and #2 are likely related to external SSD /HDD powering, and am going to find a powered USB3 enclosure.

B. But #3 is a crash issue…

Will it help to create separate boot and data partitions on x86 installs, and what is a convenient way ( gparted on Rescuezilla?), hopefully without data loss ?

Is there a DietPi or other tool that can then install bootloader + boot files on this separate partition? Or some tool that can fix boot in the original single ext4 partition?

C. Will it help if I only use the DietPi HDD/SSD drive for boot the x86 PC, and not use a Windows disk as well for dual boot?