Next | Prev | Up | Top | Contents | Index

Creating Custom Partition Layouts

The following procedure describes how to repartition a disk so that it has a custom partition layout. As an example, this procedure repartitions a 380 MB SCSI drive to increase the size of the root partition.

  1. At the fx main menu, choose the repartition command:
---- please choose one (? for help. .. to quit this menu)----
[exi]t              [d]ebug/             [l]abel/
[b]adblock/         [exe]rcise/          [r]epartition/
fx> repartition
----- partitions-----
part  type       cyls             blocks          Megabytes   (base+size)
  0: efs        7 + 80         2835 + 32400         1 + 16
  1: rawdata   87 + 202       35235 + 81810        17 + 40
  6: efs      289 + 1269     117045 + 513945       57 + 251
  7: efs        7 + 1551       2835 + 628155        1 + 307
  8: volhdr     0 + 7             0 + 2835          0 + 1
 10: entire     0 + 1550          0 + 630990        0 + 308

capacity is 631017 blocks

----- please choose one (? for help, .. to quit this menu)-----
[ro]otdrive        [u]srrootdrive     [o]ptiondrive      [re]size

You see the partition layout for the disk that you specified when fx was started, followed by the repartition menu. Look at the size column for partitions 0, 1, and 6. In this example, you have 32400 + 81810 + 513945 = 628155 blocks to use. Look at the start block numbers, and notice that partition 7 overlaps 0, 1, and 6. Partition 0 is the Root filesystem, and is mounted on the system's root directory (/). Partition 1 is your system's swap space. Partition 6 is the Usr filesystem, and it is mounted on the /usr directory. In this example, you will take space from the Usr filesystem and expand the Root filesystem.

  1. Choose the resize option to change the size of partitions on the disk and answer y to the warning message:
fx/repartition> resize

Warning: you will need to re-install all software and restore user data
from backups after changing the partition layout.  Changing partitions
will cause all data on the drive to be lost.  Be sure you have the drive
backed up if it contains any user data.  Continue? y

After changing the partition, the other partitions will
be adjusted around it to fit the change.  The result will be
displayed and you will be asked whether it is OK, before the
change is committed to disk.  Only the standard partitions may
be changed with this function.  Type ? at prompts for a list
of possible choices

  1. The prompt after the warning message offers the swap space partition as the default partition to change, but in this example designate the root partition to be resized, so enter root at the prompt:
fx/repartition/resize: partition to change = (swap) root
current:  type efs       base:     7 cyls,    2835 blks,    1 Mb
              len:    80 cyls,   32400 blks,  16 Mb

  1. The next prompt asks for the partitioning method (partition size units) with megabytes as the default. Other options are to use percentages of total disk space, numbers of disk blocks, or numbers of disk cylinders. Megabytes and percentages are the easiest methods to use to partition your disk. Press <Enter> to use megabytes as the method of repartitioning:
fx/repartition/resize: partitioning method = (megabytes (2^20 bytes)) <Enter>

  1. The next prompt asks for the size of the root partition in megabytes. The default is the current size of the partition. For this example, increase the size to 20 MB:
fx/repartition/resize: size in megabytes (max 307) = (16) 20
----- partitions-----
part  type       cyls             blocks          Megabytes   (base+size)
  0: efs        7 + 101        2835 + 40960         1 + 20
  1: rawdata  108 + 180       43795 + 73250        21 + 36
  6: efs      289 + 1269     117045 + 513945       57 + 251
  8: volhdr     0 + 7             0 + 2835          0 + 1
 10: entire     0 + 1558          0 + 630990        0 + 308

The new partition map is displayed. Note that the 4 megabytes that you added to your root partition were taken from the swap partition. Ultimately, you want those megabytes to come from the usr partition, but for the moment, accept the new partition layout.

  1. To accept the new partition layout, enter yes at the prompt:
Use the new partition layout? (no) yes

The new partition table is printed again, along with the total disk capacity. Then you are returned to the repartition menu.

  1. Select resize again to transfer space from the usr partition to the swap area:
fx/repartition> resize

You see the same warning message again.

  1. At the partition to change prompt, press <Enter> to change the size of the swap partition:
fx/repartition/resize: partition to change = (swap) <Enter>
current:  type raw       base:   108 cyls,   43795 blks,   21 Mb
                          len:   180 cyls,   73250 blks,   36 Mb

  1. Press <Enter> again to use megabytes as the method of repartition:
fx/repartition/resize: partitioning method = (megabytes (2^20 bytes)) <Enter>

  1. The next prompt requests the new size of the swap partition. Since you added 4 megabytes to expand the Root filesystem from 16 to 20 megabytes, enter 40 and press <Enter> at this prompt to expand the swap space to its original size. (If your system is chronically short of swap space, you can take this opportunity to add some space by entering a higher number.)
fx/repartition/resize: size in megabytes (max 307) = (36) 40
----- partitions-----
part  type       cyls             blocks          Megabytes   (base+size)
  0: efs        7 + 101        2835 + 40960         1 + 20
  1: rawdata  108 + 202       43795 + 81920        21 + 40
  6: efs      310 + 1247     125715 + 505275       61 + 247
  8: volhdr     0 + 7             0 + 2835          0 + 1
 10: entire     0 + 1558          0 + 630990        0 + 308

You see the new partition table. Note that the partition table now reflects that 4 megabytes have been taken from partition 6 (usr) and placed in the swap partition.

  1. At the prompt, enter yes to accept the new partition layout:
Use the new partition layout? (no) yes

The new partition table and the repartition submenu are displayed again.

  1. Enter .. at the prompt to move back to the fx main menu:
fx/repartition> ..

----- please choose one (? for help, .. to quit this menu)-----
[exi]t               [d]ebug/             [l]abel/
[b]adblock/          [exe]rcise/          [r]epartition/
fx> 

Next | Prev | Up | Top | Contents | Index