[NTLUG:Discuss] cfdisk and bootable partition flag
Robert Pearson
e2eiod at gmail.com
Wed Jan 11 17:35:50 CST 2006
On 1/11/06, ntlug at levelofdetail.com <ntlug at levelofdetail.com> wrote:
> Thanks, Patrick. Yes, that helps. I should have mentioned it is a
> standard install with Grub.
>
> I have another machine with Ubuntu on it. It also uses Grub, standard
> install, booting one OS only. The boot partition is indicated by both
> fdisk and cfdisk. On this machine I can't find grub.conf anywhere - not
> in /etc or /boot. There is a /boot/grub directory but no conf file in
> it.
I use GRUB to boot my two disk, dual boot, one OS per disk system.
"/dev/sda" is a SATA disk with SuSE 9.3 loaded.
"/dev/hda" is an IDE disk with Windows 2000 loaded.
In addition I have external USB drives of 120, and 20GB.
There are two USB "jump" drives of 256MB and 1GB.
When I run "fdisk -l", as root, any partition marked bootable
is assigned an asterisk "(*)" by fdisk. Here is what I get---
=======================================================
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 9438 75810703+ 83 Linux
/dev/sda2 9439 9728 2329425 82 Linux swap / Solaris
Disk /dev/hda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 798 6409903+ 7 HPFS/NTFS
/dev/hda2 799 2428 13092975 f W95 Ext'd (LBA)
/dev/hda5 799 1086 2313328+ 7 HPFS/NTFS
/dev/hda6 1087 2428 10779583+ 7 HPFS/NTFS
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 4079 32764536 c W95 FAT32 (LBA)
/dev/sdb2 4080 8158 32764567+ c W95 FAT32 (LBA)
/dev/sdb3 8159 12237 32764567+ c W95 FAT32 (LBA)
/dev/sdb4 12238 14592 18916537+ c W95 FAT32 (LBA)
Disk /dev/sdc: 1047 MB, 1047265280 bytes
64 heads, 32 sectors/track, 998 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 998 1021935+ 6 FAT16
Partition 1 has different physical/logical endings:
phys=(996, 63, 32) logical=(997, 63, 31)
Disk /dev/sdd: 257 MB, 257949696 bytes
255 heads, 63 sectors/track, 31 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 31 248976 b W95 FAT32
Disk /dev/sde: 20.0 GB, 20003881472 bytes
255 heads, 63 sectors/track, 2432 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 2 2431 19518975 f W95 Ext'd (LBA)
/dev/sde5 2 2431 19518943+ c W95 FAT32 (LBA)
=======================================================
When I run your command of "cfdisk -P /dev/sda" I get---
Usage:
Print version:
cfdisk -v
Print partition table:
cfdisk -P {r|s|t} [options] device
Interactive use:
cfdisk [options] device
Options:
-a: Use arrow instead of highlighting;
-z: Start with a zero partition table, instead of reading the pt from disk;
-c C -h H -s S: Override the kernel's idea of the number of cylinders,
the number of heads and the number of sectors/track.
Copyright (C) 1994-2002 Kevin E. Martin & aeb
=========================================================
and the same error message for "/dev/hda".
=========================================================
When I run "cfdisk -P s /dev/hda", as root, I get---
Partition Table for /dev/hda
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 12819869 63 12819870 HPFS/NTFS (07) Boot
2 Primary 12819870 39005819 0 26185950 W95 Ext'd (LBA) (0F) None
5 Logical 12819870 17446589 63 4626720 HPFS/NTFS (07) None
6 Logical 17446590 39005819 63 21559230 HPFS/NTFS (07) None
Pri/Log 39005820 156312449 0 117306630 Free Space None
and for "dev/sda"---
Partition Table for /dev/sda
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 151621469 63 151621470 Linux (83) Boot
2 Primary 151621470 156280319 0 4658850 Linux swap / So (82) None
Pri/Log 156280320 156296384 0 16065 Free Space None
and "cfdisk -P t /dev/sda" gives---
Partition Table for /dev/sda
---Starting--- ----Ending---- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
1 0x80 1 1 0 0x83 254 63 1023 63 151621407
2 0x00 254 63 1023 0x82 254 63 1023 151621470 4658850
3 0x00 0 0 0 0x00 0 0 0 0 0
4 0x00 0 0 0 0x00 0 0 0 0 0
and "cfdisk -P t /dev/hda" gives---
Partition Table for /dev/hda
---Starting--- ----Ending---- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- ----------- -----------
1 0x80 1 1 0 0x07 254 63 797 63 12819807
2 0x00 0 1 798 0x0F 254 63 1023 12819870 26185950
3 0x00 0 0 0 0x00 0 0 0 0 0
4 0x00 0 0 0 0x00 0 0 0 0 0
5 0x00 1 1 798 0x07 254 63 1023 63 4626657
6 0x00 254 63 1023 0x07 254 63 1023 63 21559167
I assume the "0x80" under flags indicates a bootable partition.
More information about the Discuss
mailing list