Linux Disk Management: Difference between revisions
Jump to navigation
Jump to search
(New page: == References == * See also page on NTFS and Samba == Partitions == Some CLI software: * '''fdisk''' * '''sfdisk''' * '''parted''' Some examples: <source lang="bash"> ...) |
No edit summary |
||
Line 11: | Line 11: | ||
<source lang="bash"> |
<source lang="bash"> |
||
$ sudo fdisk -l /dev/sda |
$ sudo fdisk -l /dev/sda |
||
$ sudo fdisk -l -u /dev/sda # Use sector as unit |
|||
$ sudo parted -l /dev/sda # Don't forget the sudo |
$ sudo parted -l /dev/sda # Don't forget the sudo |
||
$ sudo parted /dev/sda print |
$ sudo parted /dev/sda print |
Revision as of 00:30, 9 September 2009
References
Partitions
Some CLI software:
- fdisk
- sfdisk
- parted
Some examples:
$ sudo fdisk -l /dev/sda
$ sudo fdisk -l -u /dev/sda # Use sector as unit
$ sudo parted -l /dev/sda # Don't forget the sudo
$ sudo parted /dev/sda print
$ sudo parted /dev/sda unit cyl print # Print partition table using cylinder as unit
$ sudo parted /dev/sda unit s print # Print partition table using sector as unit (more accurate)
$ sudo sfdisk -l -uS /dev/sda # Idem
$ sudo sfdisk -d /dev/sda >sda-sfidk.dump # Dump partition in a format that can be understood by sfdisk
$ sudo sfdisk /dev/sda <sda-sfdisk.dump
$ sudo dd if=/dev/sda of=sda.mbr bs=512 count=1 # Save the MBR