From owner-freebsd-hackers Sat Jul 20 11:39:12 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA04087 for hackers-outgoing; Sat, 20 Jul 1996 11:39:12 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA04060 for ; Sat, 20 Jul 1996 11:39:02 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id UAA27019; Sat, 20 Jul 1996 20:38:57 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id UAA01257; Sat, 20 Jul 1996 20:38:57 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id TAA04947; Sat, 20 Jul 1996 19:01:02 +0200 (MET DST) From: J Wunsch Message-Id: <199607201701.TAA04947@uriah.heep.sax.de> Subject: Re: installation fails To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Sat, 20 Jul 1996 19:01:02 +0200 (MET DST) Cc: Andries.Brouwer@cwi.nl Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <9607201402.AA16759=aeb@zeus-184.cwi.nl> from "Andries.Brouwer@cwi.nl" at "Jul 20, 96 04:02:13 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Andries.Brouwer@cwi.nl wrote: > 4:sd(1,a)/kernel > > (The `4' means `5th BIOS disk'.) > > Yesterday I decided that that couldnt work, but now that you > say it explicitly, I tried, and it doesnt work. > (Yields an infinite string of > Error C:0 H:0 S:0 > error messages.) > > My BIOS only knows about disks 0 and 1, so anything booted > directly must come from there, or from floppy. Of course, if your BIOS does only know about disks 0 and 1, you cannot boot off a different disk. (You didn't write this before, and for recent BIOSes it's no longer that unusual that they provide a mapping for more than two drives.) > So, my Linux kernels live on disk 1 and get a boot parameter > to tell them which partition on which disk is to be mounted > as root directory. > > I am searching for the way to communicate to a FreeBSD kernel > what device contains the root file system. There are basically two opportunities. You can configure a custom kernel, and tell it config kernel root on sd1 But then, the bootstrap defaults to override this statement, and reassign the root device to the boot device (which usually makes sense). You have to boot with the -r option in order to avoid this (from boot(8)): -r do not establish the root directory of the file system hierarchy on the device where the boot file is being loaded from The second version is to create a `generic' kernel (alas, the GENERIC kernel is not a `generic' one), and use the -a option to the boot loader, meaning ``askroot''. A generic kernel is characterized by just only config kernel swap generic as its configuration statement. This is only rarely used by now, but should probably be used for GENERIC, too. (I'm moving the discussion to -hackers for that purpose.) Both options are not very satisfactory to you. The existing bootstrap didn't maintain any state information across reboots. One can see this as a good behaviour, since it doesn't clobber the disk if it never writes. :) In your case, it were desirable however to maintain state. Julian Elischer has been working on an alternate scheme recently, but i don't have the slightest idea about its status. > Being an absolute beginner with FreeBSD (although with 20+ > years of Unix experience) I also experience a lack of > information. For example: what is the naming scheme for > disks and partitions and slices? Partitions stand in the Unix tradition, and have trailing letters assigned, from `a' through `h'. Partition `c' is magic in that it always covers the entire slice or disk, even if no label is (yet) available. This is required to put the initial label on a disk. Partition `a' is conventionally used for a bootable partition, and partition `b' is conventionally used for swap/paging space. Slices have not been available in classic Unices, but had to be introduced since the PeeCee did already use another partitioning scheme, the fdisk table. There are four pre-defined slices 1 through 4, mapping to the four slots of the primary fdisk table (regardless of whether they contain something useful or not). Additional slices, numbered >= 5 are being assigned for so-called ``extended partitions''. Slice numbers precede the partition letter, together with the letter `s'. Slice 0 is magic in that it is not mentioned in the device name (thus no `s0') but always covers the first (by fdisk table slot number, not by disk position) FreeBSD slice. It is also available if there is no valid fdisk table, covering the entire disk then. (``Dangerously dedicated'' disk, roughly comparable to the classic Unix setup.) There are four major disk controller names (not mentioning CD-ROMs), fd for floppy disk, sd for SCSI disk, od for MO disk, and wd for WD1003/WD1007 or compatible disks. Each of them is followed by a unit number. Thus sd0s2a partition `a' (presumably bootable) of second slice on third SCSI disk, slice has a BSD label sd0b partition `b' (presumably swap) of the compatibility slice of first SCSI disk, disk or slice has a BSD label wd0 entire ``compatibility'' slice of first IDE disk wd0c the same as above, but expressed as the magic `c' partition (no BSD label required) wd1s4 fourth slice on second IDE disk, slice need not have a BSD label (i.e., can be a MS-Dog slice) All of them are available in their /dev/XXX buffered incarnation, suitable for mounting file systems, or /dev/rXXX unbuffered, suitable for handling the raw disks as for backups etc. (Maybe somebod should compile an entry for the handbook.) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)