Re: partition table information



On Thu, 13 Mar 2008 00:24:20 -0700, neeraj nama wrote:

hi

I am working with linux kernel 2.6.12, i want to read partition table
information for 250 G.B.
harddisk.

I am using 48-bit LBA addressing and i am able to read primary partition
information but not able to read extended(information for logical
partition) partition information, i found starting sector no of extended
partition, when i read from that starting sector i found all zeros 16
bytes information,please tell me how do i read,thanks.

Do you mean /sbin/fdisk -l /dev/hdx (or sdx, if a SATA), where x is the
appropriate drive? This will list the partition table. You'll probably
have to be root to get it to work. Depends on how your system is set up.

Here's what it outputs on my little system:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1220 9799618+ 83 Linux
/dev/sda2 1221 6100 39198600 83 Linux
/dev/sda3 6101 6163 506047+ 82 Linux swap/Solaris
/dev/sda4 6164 19457 106784055 85 Linux extended
/dev/sda5 6164 19457 106784023+ 83 Linux


Type man fdisk in a terminal for details on using fdisk.


Stef
.



Relevant Pages

  • fdisk problem
    ... the slice with fdisk but not write the settings. ... Figures below won't work with BIOS for partitions not in cyl 1 ... BIOS sector numbering starts with sector 1 ... The data for partition 1 is: ...
    (freebsd-questions)
  • Problem with fdisk -i
    ... I have a problem with fdisk -i on one of my FreeBSD server: ... Figures below won't work with BIOS for partitions not in cyl 1 ... BIOS sector numbering starts with sector 1 ... The data for partition 1 is: ...
    (freebsd-questions)
  • disklabel and fdisk cant write to disk. Interactive versions?
    ... When I run fdisk and dislabel from /stand/sysinstall, ... This happens on all four scsi drives on this system, ... BIOS sector numbering starts with sector 1 ... The data for partition 1 is: ...
    (comp.unix.bsd.freebsd.misc)
  • Re: FreeBSD 6.2 on a Compact Flash?
    ... I check what fdisk have to say: ... BIOS sector numbering starts with sector 1 ... The data for partition 1 is: ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Unable to modify sysid with Fdisk
    ... parameters to be used for BIOS calculations are: ... *fdisk: ... BIOS sector numbering starts with sector 1 ... The data for partition 1 is: ...
    (freebsd-questions)