Hitchhiker's Guide to Openbsd
partition. The disklabel defines how OpenBSD splits up the MBR partition
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
partition. The disklabel defines how OpenBSD splits up the MBR partition into OpenBSD partitions in which filesystems and swap space are created. You must provide each filesystem's mountpoint in this program. The offsets used in the disklabel are ABSOLUTE, i.e. relative to the start of the disk, NOT the start of the OpenBSD MBR partition. Label editor (enter '?' for help at any prompt) > p OpenBSD area: 10490445-80293248; size: 69802803; free: 69802803 # size offset fstype [fsize bsize cpg] c: 80293248 0 unused i: 10490382 63 NTFS > Note there are already two partitions here -- the "c" partition which is always there and created for you, but disklabel(8) has also noticed the existing NTFS partition and assigned it a disklabel partition so it could potentially be accessed by OpenBSD (note, at this time, NTFS support is experimental and requires a custom kernel but FAT/FAT32 support is quite good). We will now create our partitions. We will start with the "a" partition, our root partition: > a a offset: [10490445] Enter size: [69802803] 100m Rounding to cylinder: 208845 FS type: [4.2BSD] Enter mount point: [none] / > Note that disklabel defaulted to the first available OpenBSD sector on the disk, which is what we want. It also defaulted to a size of all available space, which is NOT what we want. Here we overrode it with our preferred size, which can be specified in sectors, "M" or "G". You will usually want to use the default FS type of "4.2BSD" for a FFS (Fast File System) or FFS2 partition, though other types you may find useful include "swap" and "RAID". Finally is the mount point. Our "a" partition is the root partition, by definition. Now, we do swap, which is our 'b' partition (again, this is a requirement -- 'b' on your boot disk is swap): http://www.openbsd.org/faq/faq4.html (25 of 43)9/4/2011 10:01:58 AM 4 - OpenBSD 4.9 Installation Guide > a b offset: [10699290] Enter size: [69593958] 1g Rounding to cylinder: 2104515 FS type: [swap] Enter > Again, disklabel correctly calculated our starting sector, and presented us with a suggested size of "entire remaining space", which we again overrode with our desired size. Since this is the 'b' partition, disklabel assumed it was to be used for swap, and when we confirmed that, it didn't bother to ask us a mount point. We are now ready to create the rest of the partitions. > a d offset: [12803805] Enter size: [67489443] 2g Rounding to cylinder: 4209030 FS type: [4.2BSD] Enter mount point: [none] /usr > a e offset: [17012835] Enter size: [63280413] 100m Rounding to cylinder: 208845 FS type: [4.2BSD] Enter mount point: [none] /tmp > a f offset: [17221680] Enter size: [63071568] 2g Rounding to cylinder: 4209030 FS type: [4.2BSD] Enter mount point: [none] /usr/local > a g offset: [21430710] Enter size: [58862538] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter mount point: [none] /usr/X11R6 > a h offset: [23535225] Enter size: [56758023] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter mount point: [none] /home > a j offset: [25639740] Enter size: [54653508] 1g Rounding to cylinder: 2104515 FS type: [4.2BSD] Enter http://www.openbsd.org/faq/faq4.html (26 of 43)9/4/2011 10:01:58 AM 4 - OpenBSD 4.9 Installation Guide mount point: [none] /var > a k offset: [27744255] Enter size: [52548993] Enter FS type: [4.2BSD] Enter mount point: [none] /var/www > Note that on the /var/www partition ("k"), we just took the default to use all remaining available disk space. With modern monstrously huge drives, this is usually a bad idea. If you know you will never use it, don't allocate it, and save it for some future use. Now, let's look at our results, using the "p" and "p m" commands: > p OpenBSD area: 10490445-80293248; size: 69802803; free: 0 # size offset fstype [fsize bsize cpg] a: 208845 10490445 4.2BSD 2048 16384 1 # / b: 2104515 10699290 swap c: 80293248 0 unused d: 4209030 12803805 4.2BSD 2048 16384 1 # /usr e: 208845 17012835 4.2BSD 2048 16384 1 # /tmp f: 4209030 17221680 4.2BSD 2048 16384 1 # /usr/local g: 2104515 21430710 4.2BSD 2048 16384 1 # /usr/X11R6 h: 2104515 23535225 4.2BSD 2048 16384 1 # /home i: 10490382 63 NTFS j: 2104515 25639740 4.2BSD 2048 16384 1 # /var k: 52548993 27744255 4.2BSD 2048 16384 1 # /var/www > p m OpenBSD area: 10490445-80293248; size: 34083.4M; free: 0.0M # size offset fstype [fsize bsize cpg] a: 102.0M 10490445 4.2BSD 2048 16384 1 # / b: 1027.6M 10699290 swap c: 39205.7M 0 unused d: 2055.2M 12803805 4.2BSD 2048 16384 1 # /usr e: 102.0M 17012835 4.2BSD 2048 16384 1 # /tmp f: 2055.2M 17221680 4.2BSD 2048 16384 1 # /usr/local g: 1027.6M 21430710 4.2BSD 2048 16384 1 # /usr/X11R6 h: 1027.6M 23535225 4.2BSD 2048 16384 1 # /home i: 5122.3M 63 NTFS j: 1027.6M 25639740 4.2BSD 2048 16384 1 # /var k: 25658.7M 27744255 4.2BSD 2048 16384 1 # /var/www > Like with fdisk, you don't want your OpenBSD disklabel partitions to overlap (other than the 'c' partition, which overlaps everything, of course). http://www.openbsd.org/faq/faq4.html (27 of 43)9/4/2011 10:01:58 AM 4 - OpenBSD 4.9 Installation Guide Write your changes and quit disklabel: > w > q No label changes. newfs: reduced number of fragments per cylinder group from 13048 to 12992 to enlarge last cylinder group /dev/rwd0a: 102.0MB in 208844 sectors of 512 bytes 5 cylinder groups of 25.38MB, 1624 blocks, 3328 inodes each /dev/rwd0h: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each newfs: reduced number of fragments per cylinder group from 13048 to 12992 to enlarge last cylinder group /dev/rwd0e: 102.0MB in 208844 sectors of 512 bytes 5 cylinder groups of 25.38MB, 1624 blocks, 3328 inodes each /dev/rwd0d: 2055.2MB in 4209028 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0g: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0f: 2055.2MB in 4209028 sectors of 512 bytes 11 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0j: 1027.6MB in 2104512 sectors of 512 bytes 6 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/rwd0k: 25658.7MB in 52548992 sectors of 512 bytes 127 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each /dev/wd0a on /mnt type ffs (rw, asynchronous, local) /dev/wd0h on /mnt/home type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0e on /mnt/tmp type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0d on /mnt/usr type ffs (rw, asynchronous, local, nodev) /dev/wd0g on /mnt/usr/X11R6 type ffs (rw, asynchronous, local, nodev) /dev/wd0f on /mnt/usr/local type ffs (rw, asynchronous, local, nodev) /dev/wd0j on /mnt/var type ffs (rw, asynchronous, local, nodev, nosuid) /dev/wd0k on /mnt/var/www type ffs (rw, asynchronous, local, nodev, nosuid) Let's install the sets! ... (Back to where we may have been) Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling