Re: fdisk request for functionality (or info)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 03, 2017 at 11:57:06AM -0500, Bruce Dubbs wrote:
> I have been having a problem with fdisk on old computers.
> 
> What I am doing is installing Debian, but dropping to the command line and
> creating a GPT manually because Debian seems to want to always create a
> msdos partition table.
> 
> After creating the GPT and partitioning, the install proceeds normally, but
> upon reboot the old bios tells me "No bootable disk".
> 
> I can fix this by going into rescue mode and setting the pmbr_boot flag
> using parted.
> 
> My question is whether this can be done in fdisk.  If not, can it be added?
> 
> I did try going into expert mode and selecting "toggle the legacy BIOS
> bootable flag", but does not seem to work.  I did not see any change to the
> boot sector when using 'd: print the raw data of the first sector from the
> device'.

The tricky thing is that fdisks by default see GPT partition, so you
have to force the tools to ignore GPT and use PMBR. There is more
ways:

1) you can force fdisk to see only MBR and ignore GPT

     fdisk --type dos <device>

   than you can use fdisk as usually for MBR.

2) start fdisk as usually
    - go to expert mode ('r')
    - see help ('m')
    - switch to nested label ('M')
    - go to main menu ('r')
    - toggle boot flag ('a')
    - write ('w')

 3) use sfdisk:

      sfdisk --label-nested dos --activate /dev/sda 1

   to set boot flag on the first partition.


 IMHO 3) is your friend if you have sfdisk :-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux