From owner-freebsd-hackers Mon Sep 18 02:13:10 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id CAA09546 for hackers-outgoing; Mon, 18 Sep 1995 02:13:10 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id CAA09530 for ; Mon, 18 Sep 1995 02:12:57 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id TAA16027; Mon, 18 Sep 1995 19:12:52 +1000 Date: Mon, 18 Sep 1995 19:12:52 +1000 From: Bruce Evans Message-Id: <199509180912.TAA16027@godzilla.zeta.org.au> To: hackers@freebsd.org, jehamby@lightside.com Subject: Re: Adding/deleting partitions should be Linux-like Sender: owner-hackers@freebsd.org Precedence: bulk >In order to make room for 2.1.0-STABLE source on my hard drive, I got rid >of a 400 meg DOS partition and tried to add it as /usr/src to FreeBSD. I >had nothing but trouble, since fdisk and disklabel are RIDICULOUSLY >difficult to use. No matter how much I RTFM, I just could not figure out >how to change partition 1 from MSDOS to FreeBSD, fdisk -u /dev/rwd0 # for IDE drive 0 # Hit return to accept the default for everything except: # - answer `y' to the question about changing the partition # (slice) you want to change. # - supply a new value of 165 for the `sysid' of that slice. # - answer `y' to the question about the entry being correct. # - answer `y' to the question about writing the new changes. This step can be skipped if you are in a hurry and don't need to boot from the slice. You just have to worry about other OS's thinking that they own it. >nor would newfs work >properly without a description of the partition size. It seemed that >everything revolved around writing an /etc/disktab which I did NOT want >to do. In comparison, Linux's mkfs command automagically sizes the >partition and creates the filesystem. Yes, Linux's mkfs gets the size of the partition from the DOS partition table, while BSD's newfs gets the size of the partition from the label. newfs would work better if there was a dummy label for each slice. Currently, only the whole disk slice has a dummy label. It's done this way to reduce the chance of newfs'ing non-BSD slices. To avoid changing /etc/disktab, I sometimes use: disklabel -r -w sd1s2 floppy5 # bogusly label my sd1s2 as a floppy disklabel /dev/rsd1 >/tmp/foo # remember hints about sd1's geometry disklabel -e sd1s2 # edit label to what it should be >I know, I know, the Berkeley FFS >wants to know the cylinder/head/sector geometry in order to optimize the >layout, Not in FreeBSD. The default is to use a big fictitous geometry ... >but with the geometry translations of IDE (and SCSI?) drives, >trying to do this properly is probably futile. ... since a big fictitious geometry is no worse than a small fictitious geometry supplied by drives, and better than a wrong fictitions geometry supplied by confused installers. >Anyway, I ended up booting my FreeBSD boot disk to run sysinstall and >create the filesystem. After a couple of failures, I managed to create This is said to be easier using Wizard mode. >and mkfs a FreeBSD partition with a single /usr/src slice, but then >FreeBSD wouldn't boot! I realized that the FreeBSD boot loader assumes >partition one (my new /usr/src) is the root partition, so it couldn't find >the kernel. Back to square one. I finally ended up using my trusty LINUX Adding a new FreeBSD slice before the one with the bootstrap would give you a different compatibility slice that you can't boot from. This can be worked around by rearranging the DOS partitions or simply by not changing the sysid of the new FreeBSD slice - change it Linux or No-nix (better not leave it as DOS). Bruce