Fdisk

From MineOS
Jump to: navigation, search


Contents

Partitioning hard drives with fdisk

There are many hard drive partition softwares, such as fdisk, gparted, etc. fdisk is the most feature-filled and precise, though it is considerably less intuitive than gparted. However, as it comes standard with CRUX Linux, fdisk will be used. Note, while these steps were done on a 4GB virtual disk, the steps are equally as applicable to real IDE/SATA/SCSI drives of variable sizes.

While at the BASH prompt, start fdisk.

  1. type fdisk -l <enter> to list all the identified physical hard drives
  2. type # fdisk /dev/sda <enter> to adjust the MBR of the hd

/dev/sda refers to the SATA HD (port 0), which is the default for a Virtualbox installation. Additional SATA hard drives (port 1...) use sdb and so on. If using an IDE hd, it may be /dev/hda for Primary Master, hdb for Primary Slave, hdc for Secondary Master, etc.

Create the primary partition

  1. type p <enter> to view the hard disk's master boot record.
  2. type n <enter> to create the first primary partition.
    1. type p <enter> to create a primary partition.
    2. type 1 <enter> to create the first partition.
    3. press <enter> to use default first sector.
    4. type +3G <enter> to size the partition as you like.
  3. type a <enter> to set the 'partition bootable' flag.
    1. type 1 <enter> to choose the partition you just created.
Create the first primary partition

Note, a minimum size of +1500M is required for MineOS CRUX.

Create the second primary partition for swap space

  1. type p <enter> to view the hard disk's master boot record.
  2. type n <enter> to create the second primary partition.
    1. type p <enter> to create a primary partition.
    2. type 2 <enter> to create the second partition.
    3. press <enter> to use default first sector.
    4. press <enter> to use default last sector.

Note, the default 'last' sector means fdisk will use all the remaining (unused) hard disk space. If this is not preferred, you may enter in your own value, such as +1G for 1GB swap space.

2.1-2.4 Create the second primary partition

Commit fdisk changes permanently

  1. type w <enter> to write partitions to the MBR.
  2. fdisk should return:
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.