Skip to content

Instantly share code, notes, and snippets.

@sergeykish
Created November 8, 2010 17:04
Show Gist options
  • Select an option

  • Save sergeykish/667945 to your computer and use it in GitHub Desktop.

Select an option

Save sergeykish/667945 to your computer and use it in GitHub Desktop.
Disk geometry in Plan9 and Linux
% cat /dev/sdC0/ctl
inquiry QEMU HARDDISK
config 0040 capabilities 0B00 dma 00550020 dmactl 00550020 rwm 16 rwmctl 16 lba48always off
geometry 125045424 512 16386 16 83
part data 0 125045424
part plan9 1024 4196352
part linux 4196352 25168896
part linux1 25168896 125044736
part 9fat 1024 205824
part nvram 205824 205825
part fossil 205825 3398246
part swap 3398246 4196352
% disk/fdisk /dev/sdC0/data
cylinder = 524288
empty 0 1 (1 cylinders, 512.00 KB)
* p1 1 4098 (4097 cylinders, 2.00 GB) PLAN9
p2 4098 24579 (20481 cylinders, 10.00 GB) LINUX
>>>
$ sudo fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 64.0 GB, 64023257088 bytes
32 heads, 32 sectors/track, 122114 cylinders, total 125045424 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: 0xbd2685fc
Device Boot Start End Blocks Id System
/dev/sda1 * 1024 4196351 2097664 39 Plan 9
/dev/sda2 4196352 25168895 10486272 83 Linux
/dev/sda3 25168896 125044735 49937920 83 Linux
Command (m for help):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment