What is fdisk?

fdisk is a command line partition manager available for a lot of platforms.

Usage

general

 fdisk -l        Lists the partition table
 fdisk /dev/sda  Starts the menu guieded partition for  /dev/sda  (S-ATA Disk)

Fdisk also supportes a kind of menu guided patition creation. Refer to the man pages. The most important commands are

 "p" prints the patition table
 "n" creates a new partition, your asked to enter further stuff afterwards"
 "d" deletes partition
 "w" writes new partition table

in the Netboot process

After the Node has creared a ram disk, it is possible to get files via tftp. Time to format the harddrive.

We added
  cd /mnt/ram
  ftp -hostIP- -c get /cfg/format
  cat /mnt/ram/format | fdisk /dev/sda
  rm format
  cd /
to /usr/share/initrd-tools/linuxrc . This changes dir to the ramdisk, gets the format file via tftp, handels the format file over to fdisk, to format the harddisk. Then cleanes up.

file listing

The format File (as of friday, may 25th 2007) , "//" are comments and not part of the File!

  d    // deletes the 4th primary partition
  4    // 4th
  d    // deletes the 3rd primary partition
  3
  d    // deletes the 2nd primary partition
  2
  d    // deletes the 1st primary partition, the last remaining
  
  n    // Crates a new primary partition (the 1st) Size: ~2000MB Swap
  p
  1    // 1st
  1    // startin at cylinder 1
  243  // end cylinder
  p    // prints the partition table
  t    // Changes the partition type to '82' (Linux Swap)
  82
  
  n    // Creates a new primary partition (2nd) Size: 28 MB /boot
  p
  2
       // First free cylinder on harddrive
  247  // end cylinder
  p
  
  n    // Create a new primary partition (the 3rd) Size: rest LVM
  p
  3
       // first free cylinder
       // last free cylinder
  t    // Change type
  3    // third primary Partition
  8e   // Linux LVM
  p
  w    // writes the Table

The configuration is 2Gb Swap, 30MB /boot, rest LVM, visit lvm for further indormation.

DocumentationForm edit

Title How to use fdisk
Description This page explains the usage of fdisk.
Tags fdisk
Category Admin
This topic: ATLAS > WebHome > GeneralDocumentation > Fdisk
Topic revision: 10 Feb 2012, ArthurVarkentin
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback