parted considers type code 0 to be unused
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
parted (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Reported by Alan by email:
INITIAL SITUATION:
ubuntu@ubuntu:~$ sudo fdisk -lu
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1dd83334
Device Boot Start End Blocks Id System
/dev/sda1 * 44 44 0 0 Empty
/dev/sda2 63 80324 40131 de Dell Utility
/dev/sda3 81920 30801919 15360000 7 HPFS/NTFS/exFAT
/dev/sda4 * 30801920 1890608551 929903316 7 HPFS/NTFS/exFAT
OBSERVED PROBLEM:
parted can't remove the 'boot' flag from sda1. (this prevents Windows from booting)
$parted /dev/sda set 1 boot off
Error: Partition doesn't exist.
WORKAROUND:
fdisk can do the trick.
$sudo fdisk /dev/sda
then press 'a', choose the partition (press '1'), press 'w'.
This is because as far as parted is concerned, that partition does not exist as type code 0 means the slot is unused. The kernel and util-linux's fdisk seem to accept the entry with this type code, though it is unclear why.