USB boot conflict

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

utamav

New Member
Apr 4, 2018
7
0
1
34
I have a Dell T30 server that I am using to run Open Media Vault. To preserve the SATA connections, I decided to install the OS on a USB. I am also using 2 external HDD for data storage.

The BIOS on the server does not let me select which USB to boot from. When all 3 are connected, it picks the device to boot from in random order. I spoke to Dell support and according to them, as long as the other drives don't have any boot files, the BIOS will not select them. I check this theory by trying to boot with another EXT4 formatted USB drive and the boot USB drive. After multiple boots, it always picked the boot USB drive. The test USB drive didn't have any files on it.

So I am struggling to figure out what in the data drive is it that the BIOS thinks is a boot file and gets confused. Any tips on how I can troubleshoot this would be highly appreciated.
 

chinesestunna

Active Member
Jan 23, 2015
621
194
43
56
Did the data drives at any point have an OS installed to them? Are these external drives or internal drive moved to internal enclosures?

You may have already tried this but change the USB ports of the drives so the actual "boot" drive gets detected first?
 

utamav

New Member
Apr 4, 2018
7
0
1
34
Did the data drives at any point have an OS installed to them? Are these external drives or internal drive moved to internal enclosures?

You may have already tried this but change the USB ports of the drives so the actual "boot" drive gets detected first?
No the data drives were never used for OS. They are both WD External drives. I think because it gets randomly selected when all 3 drives are connected, the order does not matter. I'll try it nevertheless.
 

chinesestunna

Active Member
Jan 23, 2015
621
194
43
56
So when you say random is it random on every boot or random per configuration, and is the detection order same every boot (I've not seen a board where is this random).
Example:
If the drives were detected as USB1: Storage1, USB2: Boot, USB3: Storage2, will the system randomly boot one of those on EVERY restart? In so 1 of 3 times it will actually boot correctly?
If that is not the case, but with the above config the system will always boot USB3, then you should be able to mess with port order and see if the detection order will match boot order?
 

utamav

New Member
Apr 4, 2018
7
0
1
34
So when you say random is it random on every boot or random per configuration, and is the detection order same every boot (I've not seen a board where is this random).
Yes, I am pretty sure it's random on every boot but I'll check again one more time just to be sure. My very last option is to wipe the drives completely. The drives were never used for OS but were connected to an ASUS router previously and I noticed some weird files in the root directory. Those files are now deleted.
 

chinesestunna

Active Member
Jan 23, 2015
621
194
43
56
I think a concern though is still the system will pick a random USB device to boot from first and from what you are describing does not attempt other USB devices on boot fail.
Most boards I've worked with either has an option to specify boot order of a boot drive type, so if I say boot USB HDD first, it also allows me to set which USB HDD device to try first. As the Dell is random, I'm curious why if the 2 storage drives don't have OS files, it doesn't keep moving to the boot USB. What error does it give when this fails?
 

pricklypunter

Well-Known Member
Nov 10, 2015
1,709
517
113
Canada
I'm thinking that at boot time, depending on which USB interface is up and available, is the one that the bios is seeing and trying to boot from. It has to load up the USB interface/drivers etc, it then has to load up whatever bridge/ interface is being used to connect to the disk, then the disk has to be enumerated and etc. It's very unlikely that those events will be in any way predictable. The USB stick should, in theory be the first to come up, but there's definitely no guarantee that will be the case from the bios's viewpoint. Find a way to introduce a boot delay to allow all disks to come up and stabilise/ be seen, then I think the one with the boot files will always be chosen :)
 

utamav

New Member
Apr 4, 2018
7
0
1
34
Yay for weekends! I Finally got time to do some testing. All tests were performed with only 1 other drive connected apart from the OS drive.

Control drive (4GB-EXT4-Flash drive)
-1- OS boots
-2- OS boots
-3- OS boots

1st data drive (4TB-EXT4-External drive)
-1- OS boots
-2- OS boots
-3- OS boots

2nd data drive (4TB-EXT4-External drive)
-1- OS does not boot
-2- OS does not boot
-3- OS does not boot

Swapped the drive ports to see if order makes a difference. Still OS did not boot. Which makes me think it's something on the 2nd data drive that is messing up the system.

I see a difference in the fdisk output, even though both are formatted as EXT4.

Boot conflicting drive:
Disk /dev/sdc: 3.7 TiB, 4000786153472 bytes, 7814035456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier:

Device Start End Sectors Size Type
/dev/sdc1 2048 7814033407 7814031360 3.7T Microsoft basic data​

Non boot conflicting drive:
Disk /dev/sdd: 3.7 TiB, 4000752599040 bytes, 976746240 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier:

Device Boot Start End Sectors Size Id Type
/dev/sdd1 256 976746239 976745984 3.7T 83 Linux​
 

chinesestunna

Active Member
Jan 23, 2015
621
194
43
56
Great! We're getting somewhere :) The only thing I can see is the BIOS seems to want to boot GPT before MBR - I believe Flash drives by default is formatted with MBR. I would change the disk layout of the conflicting drive from GPT to MBR
 

utamav

New Member
Apr 4, 2018
7
0
1
34
When I try to change the drive from GPT to MBR, I've run into issues. I'm using GParted on a live disk. I seems I can't use MBR on a drive bigger than 2TB. But's it's confusing since I already have a 4TB drive with MBR.
 

utamav

New Member
Apr 4, 2018
7
0
1
34
It turns out, I am stuck. My older 4TB (one that does not cause boot conflict) came with advanced partition which supports MBR for over 2TB. The newer 4TB (one that causes boot conflict), can't support MBR over 2TB.

All in all, I am not sure if this is going to work with my current setup. I might have to just shuck out the drive from the external enclosure and put in in the chassis. Even with that there is a chance that the shucked out drive might need some tweaking for it to work with the normal power connector.