Current-Users archive

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

fdisk and alignment



I was using fdisk to setup a USB key on NetBSD-10 and noticed its
still defaulting to 63 sector offset, including when "1m" is entered:

I can understand wanting to align to real cylinders on ancient fixed
track-per cylinder disks, but it makes no sense on even modern
spinning rust, let alone solid state drives

Are there any cases where partitions still need to be aligned to heads
* sectors/track?

Would anyone object to fdisk defaulting to an alignment which is at
least a multiple of 4K, and having a new flag (-C) to select cylinder
alignment?

Does anyone know offhand what alignment Linux/FreeBSD/OpenBSD pick for
MBR formatting?

(Sample of current behaviour)

% fdisk -u sd0
[...]
Partitions aligned to 16065 sector boundaries, offset 63

[...setting first partition to have offset of 1m - fails...]
Which partition do you want to change?: [none] 0
The data for partition 0 is:
<UNUSED>
sysid: [0..255 default: 169]
start: [0..4122cyl default: 63, 0cyl, 0MB] 1m
size: [0..4122cyl default: 66215873, 4122cyl, 32332MB]
bootmenu: [] (space to clear)

Partition table:
0: NetBSD (sysid 169)
    start 63, size 66215873 (32332 MB, Cyls 0-4121/191/38)
        PBR is not bootable: All bytes are identical (0x00)

[...setting first partition to have offset of 2048 sectors (1m) - works...]
Which partition do you want to change?: [none] 0
The data for partition 0 is:
NetBSD (sysid 169)
    start 63, size 66215873 (32332 MB, Cyls 0-4121/191/38)
        PBR is not bootable: All bytes are identical (0x00)
sysid: [0..255 default: 169]
start: [0..4122cyl default: 63, 0cyl, 0MB] 2048
size: [0..4122cyl default: 66213888, 4122cyl, 32331MB]
bootmenu: [] (space to clear)

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 66213888 (32331 MB, Cyls 0/32/33-4121/191/38)
        PBR is not bootable: All bytes are identical (0x00)


Home | Main Index | Thread Index | Old Index