lkml.org 
[lkml]   [1999]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (un)corrupted ext2 partitions
On Thu, Jan 14, 1999 at 01:47:11PM +0100, Guest section DW wrote:
> I missed the start of this discussion and don't know
> what you are talking about. But yes, logical partitions
> do not usually start at a cylinder boundary, so if you
> mess around with partitions you have to make sure that
> everything is OK on the sector level.
>
> You can see sector details using the "cfdisk -Ps /dev/hda" command.
> It will tell you the offset in the extended partition where the
> logical partition starts.

# /sbin/cfdisk -Ps /dev/hda
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flags
-- ------- -------- --------- ------ --------- ---------------------- ---------
1 Primary 0 257039 63 257040 DOS FAT16 (big) (06) None (00)
2 Primary 257040 4466069 0 4209030 Linux (83) None (00)
3 Primary 4466070 8675099 0 4209030 BSD/386 (A5) None (00)
4 Primary 8675100 16498754 0 7823655 Extended (05) None (00)
5 Logical 8675100 8932139 63 257040 Linux Swap (82) None (00)
6 Logical 8932140 9189179 63 257040 Linux Swap (82) None (00)
7 Logical 9189180 10490444 63 1301265 Linux (83) None (00)
8 Logical 10490445 14699474 63 4209030 Linux (83) None (00)
9 Logical 14699475 16498754 63 1799280 Linux (83) None (00)

>
> On the other hand, if I am not mistaken Ted was talking about
> something else, namely the fact that logical partitions do not
> have an absolute address, but a relative address w.r.t. to previous
> logical partition. Thus, if you delete the previous one by hand
> you are asking for trouble.
>
> The command "cfdisk -Pt /dev/hda" will show such details.
>
> Andries

# /sbin/cfdisk -Pt /dev/hda
---Starting--- ----Ending---- Start Number of
# Flags Head Sect Cyl ID Head Sect Cyl Sector Sectors
-- ----- ---- ---- ---- ---- ---- ---- ---- -------- ---------
1 0x00 1 1 0 0x06 254 63 15 63 256977
2 0x00 0 1 16 0x83 254 63 277 257040 4209030
3 0x00 0 1 278 0xA5 254 63 539 4466070 4209030
4 0x00 0 1 540 0x05 254 63 1023 8675100 7823655
5 0x00 1 1 540 0x82 254 63 555 63 256977
6 0x00 1 1 556 0x82 254 63 571 63 256977
7 0x00 1 1 572 0x83 254 63 652 63 1301202
8 0x00 1 1 653 0x83 254 63 914 63 4208967
9 0x00 1 1 915 0x83 254 63 1023 63 1799217

From both the commands, I see that it can't be so bad unless I change a logical
partition to primary and still expect it to work, because all logical
partitions start at sector offset 63 (or head 1), regardless of how many
logical partitions are before them. So even though I specified my partition
table entries in cylinders, the new ones would also have started at the same
sector offset, hence should have remained valid even at the sector level.

-- arvind

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.189 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site