Grow the system partition

From securityrouter.org, an OpenBSD-based firewall
Revision as of 14:11, 29 March 2018 by Anders (talk | contribs)
Jump to: navigation, search

Depending on which disk image the system was installed from, the system partiton can be of difference size. For example, the standard disk images of version 6.1 and earlier had 445 MB system partitions. The system partition of version 6.2 is 840 MB. For some tasks, such as installing packages or running syspatch, you might have to grow the system partition.

  1. Connect to the console (serial, video or virtual)
  2. Reboot (possibly by disconnecting the power)
  3. When you see Press 'f' for update and recovery firmware, do so (press 'F')
  4. At the prompt, run shell
  5. If you want to change the keyboard layout, run kbd XX (where "XX" is the keyboard layout, such as "sv" for Swedish)
  6. At the shell prompt, run:
    • echo "d f\nw\nq" | disklabel -E babebabebabebabe
    • echo "b\n\n*\nw\nq" | disklabel -E babebabebabebabe
    • echo "m e\n\n*\n\nw\nq" | disklabel -E babebabebabebabe
    • cp /mnt3/sbin/growfs /tmp
    • umount /mnt3
    • /tmp/growfs babebabebabebabe.e
    • fsck babebabebabebabe.e
    • reboot