User Tools

Site Tools


openbsd_disk_formatting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
openbsd_disk_formatting [2025/11/20 08:10] xmpubopenbsd_disk_formatting [2025/11/20 08:16] (current) xmpub
Line 3: Line 3:
 This is how you can format a disk on [[OpenBSD]]: This is how you can format a disk on [[OpenBSD]]:
   *Use ''sysctl hw.disknames'' or ''dmesg | grep sd'' to find the names of attached disks.   *Use ''sysctl hw.disknames'' or ''dmesg | grep sd'' to find the names of attached disks.
-  *Once you know its name you can edit it with ''fdisk -sdX'' where X is the name of the connected disk (MAKE **SURE** YOU HAVE IT RIGHT!)+  *Then, run ''disklabel -sdX'' where X is the name of the connected disk you want to edit (MAKE **SURE** YOU HAVE IT RIGHT!) 
 +  *Enter ''z'' to delete the existing partition table. Then type ''a'' to add a partition. Afterwards ''w'' and then ''q'' to save and quit.  
 +  *After this is done you will be left with a partition called sdXa. (a is the root partition in the bsd disklabel scheme) Run ''newfs sdXa'' to format it.
 ===== See also ===== ===== See also =====
 https://www.openbsd.org/faq/faq14.html https://www.openbsd.org/faq/faq14.html
openbsd_disk_formatting.1763626205.txt.gz · Last modified: by xmpub