Other fdisk Options


fdisk has many other options, some of which are not particularly useful while installing. Here are some of the fdisk options you might find useful at this time. For a complete list of possibilities, see fdisk(8).

Starting Over

If you find that you've completely ruined the MBR partition table and you just want to start over, the "reinit" command removes all the MBR partitions that currently exist. It then creates a single OpenBSD partition that spans the whole drive, as partition ID 3. This will, of course, obliterate any other operating system on your hard drive.

Disable a Partition

If you have an MBR partition configured and you don't want to use it, you need to either change it to a valid configuration or disable it. In many cases, disabling the partition is the easiest thing to do. You'll frequently encounter this when you're reinstalling every operating system on a computer. For example, when installing various combinations of OpenBSD and Windows late one night when the caffeine had just run out, I found myself with the following ludicrous MBR partition table.

  #: id  C  H S -  C  H S [   start:   size  ] ------------------------------------------------------------------------  0: 0C 1 0 0 1 - 776 239 63 [      0:  11748240  ] Win95 FAT32L  1: A6 777 0 1 - 1813 239 63 [  11748240:  15679440  ] OpenBSD  2: 0C 1814 0 1 - 3 2590 239 63 [ 27427680:  11748240  ] Win95 FAT32L *3: A6 2 0 1 1 - 4 2590 239 63 [     63:  39175857 ] OpenBSD 

Look closely at the 1 start cylinder for MBR partition 0, and compare that to the 2 start partition for MBR partition 3. They're identical. Similarly, the 3 ending cylinder for MBR partition ID 2 and 4 MBR partition ID 3 are identical. Partition 3 contains partitions 1 and 3 — and, if you look closely, partition 1 as well. In this case, there's no room for partition 3, and it would be best to just disable it so it doesn't interfere with anything. Edit the partition, and set the partition ID to 0 to disable it.

 fdisk:*1> edit 3      Starting    Ending    LBA Info:  #: id  C  H S -  C  H S [    start:   size  ] ------------------------------------------------------------------------ *3: A6  0  1 1 - 2590 239 63 [     63:  39175857 ] OpenBSD Partition id ('0' to disable) [0 - FF]: [A6] (? for help) 0 Partition 3 is disabled. fdisk:*1> 

If you go back and look at the partition table, all the entries within partition 3 are now set to 0.




Absolute Openbsd(c) Unix for the Practical Paranoid
Absolute OpenBSD: Unix for the Practical Paranoid
ISBN: 1886411999
EAN: 2147483647
Year: 2005
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net