Skip to content

Instantly share code, notes, and snippets.

Created March 10, 2009 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/76769 to your computer and use it in GitHub Desktop.
Save anonymous/76769 to your computer and use it in GitHub Desktop.
lab-nfsroot:~# sfdisk /dev/sda
Checking that no-one is using this disk right now ...
OK
Disk /dev/sda: 783 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 509 510- 4096543+ b W95 FAT32
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Input in the following format; absent fields get a default value.
<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>
Usually you only need to specify <start> and <size> (and perhaps <type>).
/dev/sda1 :;
/dev/sda1 0+ 782 783- 6289447 83 Linux
/dev/sda2 :,,l
trailing junk after number
/dev/sda2 :,,L
/dev/sda2 0 - 0 0 83 Linux
partition ends on cylinder 1023, beyond the end of the disk
/dev/sda3 :;
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 :;
/dev/sda4 0 - 0 0 0 Empty
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 782 783- 6289447 83 Linux
/dev/sda2 0 - 0 0 83 Linux
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Warning: partition 2 has size 0 but is not marked Empty
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
end of partition 2 has impossible value for cylinders: 1023 (should be in 0-782)
I don't like this - probably you should answer No
Do you want to write this to disk? [ynq] n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment