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

 

 

 

[solved] Boot-able drive doesn't show as boot-able in fdisk

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

[solved] Boot-able drive doesn't show as boot-able in fdisk

#1 Post by ticojohn »

I have three drives in my desktop. Two are SSD's and one is a HDD. All three are boot-able, verified by selecting each as the first boot option in the BIOS. What is strange is that when I do fdisk-l the HDD (sdc) is not marked as a boot drive.

Code: Select all

root@debian:~# fdisk -l
Disk /dev/sdb: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x01fc6ade

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1  *         2048 466862079 466860032 222.6G 83 Linux
/dev/sdb2       466864126 468860927   1996802   975M  5 Extended
/dev/sdb5       466864128 468860927   1996800   975M 82 Linux swap / Solaris


Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: ST3500410SV     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdbf0e6e8

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdc1            2048 961118207 961116160 458.3G 83 Linux
/dev/sdc2       961120254 976771071  15650818   7.5G  5 Extended
/dev/sdc5       961120256 976771071  15650816   7.5G 82 Linux swap / Solaris


Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk model: Samsung SSD 850 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x80f5754e

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 472743935 472741888 225.4G 83 Linux
/dev/sda2       472745982 488396799  15650818   7.5G  5 Extended
/dev/sda5       472745984 488396799  15650816   7.5G 82 Linux swap / Solaris

Just to be sure I didn't err, I re-installed grub on the HDD. It still is not marked as a boot drive,and yet it boots. What is going on?

By the way, all three drives are legacy boot.

UPDATE: After doing a lot of reading, and not necessarily understanding everything I read, it appears that on modern systems the boot flag may not be required. Doesn't answer why two drives have the boot flag and one doesn't but it does explain why the boot flag may not be necessary. It may be that my motherboard, which can handle a mix of UEFI and Legacy drives, doesn't care about the drive not having a boot flag.
Last edited by ticojohn on 2021-05-08 23:24, edited 1 time in total.
I am not irrational, I'm just quantum probabilistic.

vmclark
Posts: 186
Joined: 2008-07-30 15:16
Has thanked: 1 time

Re: Boot-able drive doesn't show as bootable in fdisk

#2 Post by vmclark »

efibootmgr will tell you who controls the boot order.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: Boot-able drive doesn't show as bootable in fdisk

#3 Post by ticojohn »

vmclark wrote:efibootmgr will tell you who controls the boot order.
I know the boot order. The whole thing is about a boot-able drive that doesn't have a boot flag set, yet still boots. I've found the solution at several different websites. Linux necessarily need the boot flag.

However, because I like things to be consistent I went ahead and used Gparted to set a boot flag on the HDD. Everything still works fine and now all the boot-able drives show a boot flag.

Thanks.
I am not irrational, I'm just quantum probabilistic.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [solved] Boot-able drive doesn't show as boot-able in fd

#4 Post by p.H »

Drives do not have a boot flag. Partitions have.
A compliant BIOS should not care about the partition boot flag. Only the boot loader stored in the MBR may (DOS/Windows boot sector does, GRUB boot sector does not).
Unfortunately, some non-compliant BIOS do require that a partition has the boot flag set.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: [solved] Boot-able drive doesn't show as boot-able in fd

#5 Post by ticojohn »

p.H wrote:Drives do not have a boot flag. Partitions have.
A compliant BIOS should not care about the partition boot flag. Only the boot loader stored in the MBR may (DOS/Windows boot sector does, GRUB boot sector does not).
Unfortunately, some non-compliant BIOS do require that a partition has the boot flag set.
Yep. I was using incorrect nomenclature when I said drive instead of partition. And all you say is absolutely correct. I wasn't having problems booting just freaked out that all my other boot-able partitions had the boot flag set and and one did not. I can get kind of anal when things aren't consistent. :roll:

Thanks for the feedback.
I am not irrational, I'm just quantum probabilistic.

Post Reply