Hitchhiker's Guide to Openbsd


Disklabel tricks and tips


Download 1.27 Mb.
Pdf ko'rish
bet209/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   205   206   207   208   209   210   211   212   ...   258
Bog'liq
obsd-faq49

Disklabel tricks and tips

Get help: In the command-driven mode, hitting "?" will produce a list of available commands. "M" will 
show the man page for disklabel(8). 

Reset to default: In some cases, you may wish to completely restart from scratch and delete all existing 
disklabel information. The "D" command will reset the label back to default, as if there had never been a 
disklabel on the drive. 

Duplicating a disklabel: In some cases, you may wish to duplicate the partitioning from one disk to 
another, but not precisely (for example, you wish to have the same partitions, but on different sizes of 
drives). Use the '-e' (full-screen editor) mode of disklabel(8) to capture the partitions of the "model" drive, 
paste it into the new drive, remove the model's 'c' partition, save, and you have copied the disk layout to 
the other drive without altering its basic parameters. 

(sparc/sparc64) Don't put swap at the very beginning of your disk. While Solaris often puts swap at the 
very beginning of a disk, OpenBSD requires the boot partition to be at the beginning of the disk. 

(fdisk platforms) Leave first track free: On platforms using fdisk(8), you should leave the first logical 
track unused, both in disklabel(8) and in fdisk(8). On "modern" computers (i.e., almost everything that will 
run OpenBSD), the exact amount doesn't really matter, though for performance reasons on the newest 
disks, having partitions aligned at 4k boundaries is good, for this reason, OpenBSD now defaults to 
starting the first partition at block 64 instead of 63. 

Devices without a disklabel: If a device does not currently have an OpenBSD disklabel on it but has 
another file system (for example, a disk with a pre-existing FAT32 file system), the OpenBSD kernel will 
"create" one in memory, and that can form the basis of a formal OpenBSD disklabel to be stored on disk. 
However, if a disklabel is created and saved to disk, and a non-OpenBSD file system is added later, the 
disklabel will not be automatically updated. You must do this yourself if you wish OpenBSD to be able to 
access this file system. More on this 
below


"q" vs. "x": For historical reasons, while in the command-driven editor mode, "q" saves changes and 
exits the program, and "x" exits without saving. This is the opposite of what many people are now used to 
in other environments. disklabel(8) does warn before saving the changes, though it will "x" quickly and 
quietly. 


Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   205   206   207   208   209   210   211   212   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling