Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 2000 13:57:55 -0500 (CDT)
From:      Mike Meyer <mwm@mired.org>
To:        David Madore <david.madore@ens.fr>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Setting the root filesystem permanently
Message-ID:  <14715.16435.803624.292393@guru.mired.org>
In-Reply-To: <bulk.58967.20000722211322@hub.freebsd.org>
References:  <bulk.58967.20000722211322@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> From: David Madore <david.madore@ens.fr>
> 
> 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 <ST31277A> [2482/16/63] at ata0-master using BIOSPIO
> 
> Manual root filesystem specification:
>   <fstype>:<device>  Mount <device> using filesystem <fstype>
>                        eg. ufs:/dev/da0s1a
>   ?                  List valid disk boot devices
>   <empty line>       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.

	<mike


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14715.16435.803624.292393>