Hitchhiker's Guide to Openbsd


Download 1.27 Mb.
Pdf ko'rish
bet204/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   200   201   202   203   204   205   206   207   ...   258
Bog'liq
obsd-faq49

Partitioning
Due to historical reasons, the term "partition" is regularly used for two different things in OpenBSD and this leads 
to some confusion. 
The two types of "partitions" are: 

"disklabel partitions" created with 
disklabel(8)
 (often called "filesystem partitions"). 

"fdisk partitions" created with 
fdisk(8)
(often called "partition table partitions" or "Master Boot Record 
(MBR) partitions"). 
All OpenBSD platforms use disklabel(8) as the primary way to manage OpenBSD filesystem partitions, but only 
some platforms also require using fdisk(8) to manage Partition Table partitions. On the platforms that use fdisk 
partitions, one fdisk partition is used to hold all of the OpenBSD file systems, this partition is then sliced up into 
disklabel partitions. These disklabel partitions are labeled "a" through "p". A few of these are "special": 

a -- On the boot disk, the 'a' partition is your root partition. 

b -- On the boot disk, the 'b' partition is automatically used as a swap partition. 

c -- On all disks, the 'c' partition is the entire disk, from the first sector to the last. (Hint: if you wish to 
totally clear a drive, you write zeros to the 'c' partition of the drive. More commonly, the 'c' partition is 
used by utilities like 'fdisk' to install boot loaders, partition tables, etc.) 
Partition identification
An OpenBSD filesystem is identified by the disk it is on, plus the file system partition on that disk. So, file 
http://www.openbsd.org/faq/faq14.html (2 of 34)9/4/2011 10:02:25 AM


14 - Disk Setup
systems may be identified by identifiers like "sd0a" (the "a" partition of the first "sd" device), "wd2h" (the "h" 
partition of the third "wd" device), or "sd1c" (the entire second sd device). The device files would be 
/dev/
sd0a
for the block device
/dev/rsd0a
would be the device file for the "raw" (character) device. 
Some utilities will let you use the "shortcut" name of a partition (i.e., "sd0d") or a drive (i.e., "wd1") instead of the 
actual device name ("
/dev/sd0d
" or "
/dev/wd1c
", respectively). 
Note again that if you put data on 
wd2d
, then later remove 
wd1
from the system and reboot, your data is now on 
wd1d
, as your old 
wd2
is now 
wd1
. However, a drive's identification won't change after boot, so if a USB drive 
is unplugged or fails, it won't change the identification of other drives until reboot. 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   200   201   202   203   204   205   206   207   ...   258




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