Article overview

Help article

How do I create a partition in OpenBSD?

This FAQ explains how to create additional partitions for OpenBSD. Some experience with OpenBSD is required to succesfully add a partitions. Specific knowledge of file editing is required to configure the VPS to automatically boot the partition.Note: If not mentioned, a command is always followed by an enter. First you will have to create a partition:

  1. First make sure that you are logged in as root, if you are not then use this command "su -". Start disklabel with the command 'disklabel -E wd0' wd0 stands for your harddisk.
  2. Start with entering new boundaries by pressing 'b'. Press enter when you run into Starting Sector and subsequently submit '*'. With this last command the boundaries will be set to cover your entire disk.
  3. We have cleared space for the new partition. Submit, 'a' to create the partition.
  4. A driveletter will be proposed. You can either accept the proposal by pressing enter ot choose a driveletter that is still free. Either way, remember this letter as you will need it later on. For this FAQ we will use 'x'.
  5. You will now run into three default settings. You will have to accept all three propositions by pressing enter three times in a row.
  6. To finalize the all the changes you made in the previous steps, press 'w'. Close disklabel with 'q'.
  7. Now its time to create a new filesystem on your partition. Use the following command 'newfs wd0X'. Replace X with the driveletter you chose in step 4.
  8. Subsequently the filesystem has to be placed in a map. This map first needs to be created. Use command 'mkdir /transip' to createw a map. You can replace transip with any name you would like.
  9. Next you need to mount the new filesystem to the existing filesystem. Use this command 'mount /dev/wd0x /transip'. Replace transip with the mapname you chose in step 8.
  10. Place the new filesystem in '/etc/fstab' to make sure that the partition is autmatically booted after a reboot. If do not do this, you will need to execute the command from step 9 every time your VPS is rebooted.

Do you have a good idea?

Give us your idea! If it's popular we'll add it to the wishlist!

Has this article been helpful?

Create an account or log in to leave a rating.

Share this article

Comments

Create an account or log in to be able to leave a comment.

Are you stuck?

Ask one of our specialists to assist you

Contact us