Prev | Next |
Setting up disks in MicroBSD is a little bit confusing for some of you. First the hard disk is defined using fdisk, then that partition is subdivided into MicroBSD partitions using disklabel.
The next step will be to choose the disk and setting the partitions on it:
At any prompt except password prompts you can run a shell command by typing '!foo', or escape to a shell by typing '!'. The installation program needs to know which disk to consider the root disk. Note the unit number may be different than the unit number you used in the boot program (especially on a PC with multiple disk controllers). Available disks are: wd0 Which disk is the root disk? [wd0] >Enter< Do you want to use the *entire* disk for MicroBSD? [no] yes
This is the section in the install where you choose which disk you want as your "root" disk. Your root disk will be where the / filesystem and swap will be. wd0 specifies an IDE disk; if your disks are SCSI you will most likely see sd0. There will be an entry for each disk that MicroBSD finds, which is normally every disk in your system. If your disks are not showing up here as you expect, you have improperly configured or unsupported hardware.
In this example, we have chosen to allocate the entire disk to MicroBSD. This will result in a simple partition table being written out to disk -- one partition, the size of the entire hard disk, set to the MicroBSD partition type, and flagged as the bootable partition. This will be a common option for most production uses of MicroBSD, however, there are some systems this should not be done on. Many Compaq systems, some Dell and other systems use a "maintenance" partition, which should be kept intact. If your system has any other partitions of any type you do not wish to erase, do not select "yes" to the above question.
If you choose not to allocate the entire disk to MicroBSD, you will be placed in the MicroBSD disk partition editor, fdisk.
Fdisk is a program to help with the maintenance of your partitions. This program is used at install time to set up your MicroBSD partition (this partition can contain several labels, each with filesystems/swap/etc.). It can divide space on your drives and set one active. This program will usually be used in Single User Mode ( boot -s ). Fdisk also sets the MBR on your various hard disks.
For installation purposes, most times you'll only need ONE MicroBSD partition, and then using disklabel to put a swap and a filesystem on it.To view the partition table using fdisk, use:
# fdisk wd0
Which will give un output similar to this:
Disk: wd0 geometry: 623/255/63 [10008495 Sectors] Offset: 0 Signature: 0xAA55 Starting Ending LBA Info: #: id C H S - C H S [ start: size ] ------------------------------------------------------------------------ 0: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused 2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused *3: A6 0 1 1 - 622 254 63 [ 63: 10008432 ] MicroBSD
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 MicroBSD 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 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>
It is perfectly safe in fdisk to go in and explore, just make sure to answer N to saving the changes and *DON'T* use the write command.
Here is an overview of the commands you can use when you choose the -e flag.
The next step is to use disklabel to slice up the MicroBSD partition. More details on using disklabel use the man pages. MicroBSD does NOT support any sort of journaling filesystems like Ext3, ReiserFS, IBM's JFS or SGI's XFS. Instead we use Soft Updates. The filesystem for MicroBSD is FFS.
Inside the BIOS 'A6' ('MicroBSD') partition you just created, there resides an MicroBSD partition table which defines how this BIOS partition is to be split up. This table declares the offsets and sizes of your / partition, your swap space, and any other partitions you might create. (NOTE: The MicroBSD disk label offsets are absolute, ie. relative to the start of the disk... NOT relative to the start of the BIOS 'A6' partition). If this disk is shared with other operating systems, those operating systems should have a BIOS partition entry that spans the space they occupy completely. For safety, also make sure all MicroBSD file systems are within the offset and size specified in the 'A6' BIOS partition table. (By default, the disklabel editor will try to enforce this). If you are unsure of how to use multiple partitions properly (ie. separating /, /usr, /tmp, /var, /usr/local, and other things) just split the space into a root and swap partition for now. # using MBR partition 3: type A6 off 63 (0x3f) size 12643092 (0xc0eb14) Treating sectors 63-12658776 as the MicroBSD portion of the disk. You can use the 'b' command to change this. Initial label editor (enter '?' for help at any prompt) > ? Available commands: p [unit] - print label. M - show entire MicroBSD man page for disklabel. e - edit drive parameters. a [part] - add new partition. b - set OpenBSD disk boundaries. c [part] - change partition size. d [part] - delete partition. D - set label to default. g [d|b] - Use [d]isk or [b]ios geometry. m [part] - modify existing partition. n [part] - set the mount point for a partition. r - recalculate free space. u - undo last change. s [path] - save label to file. w - write label to disk. q - quit and save changes. x - exit without saving changes. X - toggle expert mode. z - zero out partition table. ? [cmnd] - this message or command specific help. Numeric parameters may use suffixes to indicate units: 'b' for bytes, 'c' for cylinders, 'k' for kilobytes, 'm' for megabytes, 'g' for gigabytes or no suffix for sectors (usually 512 bytes). Non-sector units will be rounded to the nearest cylinder. Entering '?' at most prompts will give you (simple) context sensitive help. > p device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: Maxtor 86480D6 bytes/sector: 512 sectors/track: 63 tracks/cylinder: 15 sectors/cylinder: 945 cylinders: 13395 total sectors: 12658776 free sectors: 12658713 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 12643092 63 unused 0 0 c: 12658776 0 unused 0 0 > d a > a a offset: [63] >Enter< size: [12658713] 80m Rounding to nearest cylinder: 163422 FS type: [4.2BSD] >Enter< mount point: [none] / > a b offset: [163485] >Enter< size: [12495291] 300m Rounding to nearest cylinder: 614250 FS type: [swap] >Enter< > a d offset: [777735] >Enter< size: [11881041] 80m Rounding to nearest cylinder: 163485 FS type: [4.2BSD] >Enter< mount point: [none] /tmp > a e offset: [941220] >Enter< size: [11717556] 80m Rounding to nearest cylinder: 163485 FS type: [4.2BSD] >Enter< mount point: [none] /var > a g offset: [1104705] >Enter< size: [11554071] 2g Rounding to nearest cylinder: 4193910 FS type: [4.2BSD] >Enter< mount point: [none] /usr > a h offset: [5298615] >Enter< size: [7360161] >Enter< FS type: [4.2BSD] >Enter< mount point: [none] /home > p device: /dev/rwd0c type: ESDI disk: ESDI/IDE disk label: Maxtor 86480D6 bytes/sector: 512 sectors/track: 63 tracks/cylinder: 15 sectors/cylinder: 945 cylinders: 13395 total sectors: 12658776 free sectors: 0 rpm: 3600 16 partitions: # size offset fstype [fsize bsize cpg] a: 163422 63 4.2BSD 1024 8192 16 # / b: 614250 163485 swap c: 12658776 0 unused 0 0 d: 163485 777735 4.2BSD 1024 8192 16 # /tmp e: 163485 941220 4.2BSD 1024 8192 16 # /var g: 4193910 1104705 4.2BSD 1024 8192 16 # /usr h: 7360161 5298615 4.2BSD 1024 8192 16 # /home > w > q No label changes.
Now comes the final setup of your mount points. If you configured the mount points through disklabel, this step consists of just verifying your selections, otherwise, you can specify them now.
You will now have the opportunity to enter filesystem information for wd0. You will be prompted for the mount point (full path, including the prepending '/' character) for each MicroBSD partition on wd0. Enter "none" to skip a partition or "done" when you are finished. The following partitions will be used for the root filesystem and swap: wd0a / wd0b swap Mount point for wd0d (size=81742k) [/tmp, RET, none, or done]? >Enter< Mount point for wd0e (size=81742k) [/var, RET, none, or done]? >Enter< Mount point for wd0g (size=2096955k) [/usr, RET, none, or done]? >Enter< Mount point for wd0h (size=3680080k) [/home, RET, none, or done]? >Enter< Mount point for wd0d (size=81742k) [/tmp, RET, none, or done]? done Now you can select another disk to initialize. (Do not re-select a disk you have already entered information for). Available disks are: wd0 Which one? [done] >Enter< You have configured the following devices and mount points: wd0a / wd0h /home wd0d /tmp wd0g /usr wd0e /var ============================================================ The next step will overwrite any existing data on: wd0a wd0h wd0d wd0g wd0e Are you really sure that you're ready to proceed? [n] y Creating filesystems... Warning: 63 sector(s) in last cylinder unallocated /dev/rwd0a: 163422 sectors in 173 cylinders of 15 tracks, 63 sectors 79.8MB in 11 cyl groups (16 c/g, 7.38MB/g, 1792 i/g) Warning: 445 sector(s) in last cylinder unallocated /dev/rwd0h: 7360160 sectors in 7789 cylinders of 15 tracks, 63 sectors 3593.8MB in 487 cyl groups (16 c/g, 7.38MB/g, 1792 i/g) Warning: 1 sector(s) in last cylinder unallocated /dev/rwd0d: 163484 sectors in 173 cylinders of 15 tracks, 63 sectors 79.8MB in 11 cyl groups (16 c/g, 7.38MB/g, 1792 i/g) /dev/rwd0g: 4193910 sectors in 4438 cylinders of 15 tracks, 63 sectors 2047.8MB in 278 cyl groups (16 c/g, 7.38MB/g, 1792 i/g) Warning: 1 sector(s) in last cylinder unallocated /dev/rwd0e: 163484 sectors in 173 cylinders of 15 tracks, 63 sectors 79.8MB in 11 cyl groups (16 c/g, 7.38MB/g, 1792 i/g)
You may wonder why the installer again asks for mount points. This is because you can not mount (say) /usr/src before you have mounted /usr. The "Mount point" dialog is to give you flexibility for the order that file systems are mounted in /etc/fstab.
Notice the "Are you really sure that you are ready to proceed?" question defaults to no, so you will have to deliberately tell it to proceed and format your partitions. If you chose no, you would simply be dropped into a shell and could start the install again by typing install, or just by rebooting again with your bootdisk. At this point it will format all filesystems for you. This could take some time depending on the size of your disk.
Prev | Home | Next |
Starting the Installation | Configuring your Network |
This, and other documents, can be downloaded from MicroBSD.
For questions about MicroBSD, read the documentation before contacting
<MicroBSD Support>.
Copyright © 1995-2003 by The FreeBSD Documentation Project, OpenBSD FAQ Copyright © 1998-2003 OpenBSD, Modified for MicroBSD