Grid Guides

Explore How System On Grid Can Work For You

How to Create a Partition on NetBSD


Introduction

When you add a volume or resize in NetBSD, it doesn't update automatically so you need to create a partition on your own and this guide will show you how.

Prerequisites

  • NetBSD Orbit

  • Either secondary attached volume or the orbit must be resized to a larger size

Viewing Filesystem Details (Optional)

  1. You can view the attached volume by running.

    dmesg |grep sector
    NetBSD DMesg
  2. To view the filesystem details we can run the following.

    disklabel ld0
    NetBSD Disklabel

Creating a new partition

  1. You can view the attached volume by running the following. You need to run this command whether you resize the volume or or attach a volume so you can see the sector size.

    dmesg |grep sector
    NetBSD DMesg

    You need to keep track of the number of sectors because we will be using that to create the new file system.

  2. Now we create the filesystem on the new slice.

    newfs -O2 -F -s 83886080 /dev/rld0d
    NetBSD Filesystem
  3. Lastly we mount the new created slice and create a new home directory.

    mount /dev/ld0d /mnt

    We can confirm everything works by running.

    df -kh
    NetBSD Mount