From owner-freebsd-questions Sun Jul 23 11:58:39 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (zoom0-003.telepath.com [216.14.0.3]) by hub.freebsd.org (Postfix) with SMTP id 9678437B6C8 for ; Sun, 23 Jul 2000 11:58:33 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 25999 invoked by uid 100); 23 Jul 2000 18:57:55 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14715.16435.803624.292393@guru.mired.org> Date: Sun, 23 Jul 2000 13:57:55 -0500 (CDT) To: David Madore Cc: questions@FreeBSD.ORG Subject: Re: Setting the root filesystem permanently In-Reply-To: References: X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: David Madore > > Hi. > > I just installed 4.0-RELEASE on an i486 (33MHz, 16MB RAM, 1GB disk) > system (in case that matters, I installed by copying the distribution > CD on a Linux box on the local network and using that as an FTP > server). > > Something seems to have gone awry in the the determination of the root > filesystem, because when the kernel boots, it uses "wd0s1a" as root > filesystem, whereas the fstab specifies "/dev/ad0s1a"; so the init > scripts can't remount root read-write, and, well, they sort of panic > (they give me a root shell). > > I can solve this by passing the -a argument to the kernel: > > [dmesg excerpt] > ad0: 1221MB [2482/16/63] at ata0-master using BIOSPIO > > Manual root filesystem specification: > : Mount using filesystem > eg. ufs:/dev/da0s1a > ? List valid disk boot devices > Abort manual input > > mountroot> ufs:/dev/ad0s1a > > But it seems I have to to that interactively. Only this is not > acceptable for me, because this box must be able to reboot without > human interaction (ultimately, it should have no screen) beyond > perhaps pressing a reset button from time to time. > > So, how do I specify the root device once and for all? Well, the *easy* fix is to change /etc/fstab to say "wd0s1a", and make sure the device exists in /dev. Next would be to set the root device in loader.rc (I think - I haven't done a thorough check of the loader code; try "man loader" for more information). Finally, the best way would be configure a custom kernel, and set the root device name for that kernel. Read /usr/src/sys/i386/conf/GENERIC and LINT for more information about that. You'll probably want to do one - or both - of the later two to get to your ultimate state in any case. > Incidentally, why this change from wd* to ad*? The wd(4) man page > exists, but man 4 ad returns nothing. They are different drivers. wd is a device driver for Wester Digital IDE controllers. ad is a disk driver for devices attached to ATA controllers. The ata controller provides support for a lot of things that either weren't there or required different drivers if you used wd. It also takes advantage of more drive capabilities automatically, rather than requiring setting flags in the kernel. If you've got UDMA drives (and you should - especially for a server), you'll want to build a custom kernel to enable DMA. If the GENERIC and LINT configuration don't mention it (blasted 4.0 CDs don't have source on them), it's options ATA_ENABLE_ATAPI_DMA in the kernel config. If you still want to use the wd drivers, check wd(4) for the flags to set.