Thank you for providing a lot of good background on the boot processes for MBR/msdos and UEFI/GPT. I’m sure some of that will come in handy helping me to resolve his current mess. I used to know some of that stuff fairly well 10-20 years ago, but those neurons have unfortunately long decayed. Looks like I need a refresher.
In my descriptions here, I did get some things blurred in trying to help this guy out with info co-mingled between his MBR/msdos hard drive, his live booting a distro from a USB stick on his affected system with UEFI/GPT, and then researching on my systems UEFI/GPT.
The system of his with the problem is an MS-DOS (yes, genuine, original, true MS-DOS) with MBR that he had configured to dual boot Linux on (with grub). He attempted to install another Linux distro on it to replace the distro he had, ended up in the weeds, and tried to dig himself out mangling his system. From 2000 miles away, I’m trying to figure out what state he’s got it all in dumping info from lsblk ...
and sudo parted ...
from the Linux live boot USB stick and see if it’s fixable.
I had been hoping he could get all the information I needed with the right options to lsblk
and found PARTFLAGS
. When testing the option on my UEFI/GPT systems, it didn’t do as I thought it should (which you have since corrected my understanding!).
However, it turns out that when run on an MBR/msdos disk, PARTFLAGS
actually works. (I messed up in my post yesterday using the wrong option swapping PARTFLAGS
for PARTTYPE
.) Here’s showing it works when rerunning it with using PARTFLAGS
:
NAME PARTFLAGS PARTTYPE PARTTYPENAME
sdb
└─sdb1 0x80 0xc W95 FAT32 (LBA)
The 0x80
shows that that partition 1 is bootable, as expected.
Before asking for help, he was trying to get back and undo the Linux install he stopped in the middle of and just get back to a single-boot MS-DOS system with fdisk /mbr
and start over. I think the a boot flag on the partially installed and now abandoned Linux partitions is what got him stuck.
I’m trying to get him to leave the MS-DOS installed hard drive alone and just put another physical drive in the system to install Linux on.
To give the curious the background, he has some ancient equipment and the software for it is in MS-DOS, never released for MS Windows. The MS-DOS application has hard real-time requirements for the equipment it controls, so it has to run native. The machine is located in an outbuilding with no networking. After gathering the data he needs for a given run, he reboots into Linux, mounts the MS-DOS partition, processes and then copies the data to a USB stick (remember, no USB support in MS-DOS!), and then sneakernets the stick back to his main building.