Hitchhiker's Guide to Openbsd


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

14.2 - Using fdisk(8)
Be sure to check the 
fdisk(8)
 man page. 
fdisk(8) is used on some platforms (i386, amd64, macppc, zaurus and armish) to create a partition recognized by 
the system boot ROM, into which the OpenBSD disklabel partitions can be placed. Other platforms do not need 
or use fdisk(8). fdisk(8) can also be used for manipulations of the Master Boot Record (MBR), which can impact 
all operating systems on a computer. Unlike the fdisk-like programs on some other operating systems, OpenBSD's 
fdisk assumes you know what you want to do, and for the most part, it will let you do what you need to do, 
making it a powerful tool to have on hand. It will also let you do things you shouldn't or didn't intend to do, so it 
must be used with care. 
Normally, only one OpenBSD fdisk partition will be placed on a disk. That partition will be subdivided by 
disklabel
 into OpenBSD filesystem partitions. 
To just view your partition table using fdisk, use: 
fdisk sd0
Which will give an output similar to this: 
Disk: sd0 geometry: 553/255/63 [8883945 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
------------------------------------------------------------------------
*0: A6 3 0 1 - 552 254 63 [ 48195: 8835750 ] 
OpenBSD
1: 12 0 1 1 - 2 254 63 [ 63: 48132 ] 
Compaq Diag.
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] 
unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] 
http://www.openbsd.org/faq/faq14.html (3 of 34)9/4/2011 10:02:25 AM


14 - Disk Setup
unused
In this example we are viewing the fdisk output of the first SCSI drive. We can see the OpenBSD partition (id 
A6) and its size. The * tells us that the OpenBSD partition is the bootable partition. 
In the previous example we just viewed our information. What if we want to edit our partition table? Well, to do 
so we must use the -e flag. This will bring up a command line prompt to interact with fdisk. 
fdisk -e wd0
Enter 'help' for information
fdisk: 1> help
help Command help list
manual Show entire OpenBSD man page for fdisk
reinit Re-initialize loaded MBR (to defaults)
setpid Set the identifier of a given table entry
disk Edit current drive stats
edit Edit given table entry
flag Flag given table entry as bootable
update Update machine code in loaded MBR
select Select extended partition table entry MBR
swap Swap two partition entries
print Print loaded MBR partition table
write Write loaded MBR to disk
exit Exit edit of current MBR, without saving 
changes
quit Quit edit of current MBR, saving current 
changes
abort Abort program without saving current 
changes
fdisk: 1> 
Here is an overview of the commands you can use when you choose the -e flag. 


Download 1.27 Mb.

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




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