Changing boot disk bus connections/settings?

Richard Smith rdls at jezebel.demon.co.uk
Sat Jan 29 10:09:11 GMT 2000


David Marsh wrote:
> 
> First off, I had to suss out the newer boot manager, which doesn't appear
> to be as helpful as the old one (which displayed the boot options in depth
> before booting). A bit of trial and error revealed that I had to type:
>    set root_disk_unit=2   in order to get FreeBSD to find the 'new' location
> of the root partition (wd2s2a) (since the disk names change when they are
> connected to a different IDE bus), otherwise it was booting its way through
> the kernel (?) and then failing to find the root partition where it
> expected it.
> 
> Is there anywhere that I can have the 'set root_disk_unit=2' stored
> permanently?
> 
> I'm not entirely sure what actually happens during the boot process.
> Obviously the kernel is being booted after the boot manager chooses a
> partition to boot from - but how come the boot manager can find the kernel,
> yet the kernel can't find the root partition once it boots itself up
> (without the use of the variable above)? Is the location of the
> root partition something that is compiled into the kernel? (I haven't made a
> new kernel - I'm still running with the 'factory version' (shame on me)).
> Will I have to make a new kernel to allow my non-standard boot process to
> work properly, or is it possible to 'permanently configure' the boot manager
> with the above variable somehow?

It's possible that you also need to change the `config' line in your
kernel configuration file... From LINT:
____________________________________________________________________________
#
# This directive defines a number of things:
#  - The compiled kernel is to be called `kernel'
#  - The root filesystem might be on partition wd0a
#  - Crash dumps will be written to wd0b, if possible.  Specifying the
#    dump device here is not recommended.  Use dumpon(8).
#
config          kernel  root on wd0 dumps on wd0
____________________________________________________________________________

Normally the default allows for booting from IDE or SCSI, but I suspect
that your's is a special case.

 
> The second issue was that upon loading the kernel, and starting up, the
> system then found that the hard disks had moved (surprise!). Yep,
> /etc/fstab still had the old disk partition names in it, of course.
> Easy to fix, I thought. But no. Because the boot process hadn't completed
> properly, / was mounted read-only, and I couldn't edit the file. The only

mount -u -w /

when you _do_ have a working fstab, `mount -a' is quite useful too.

> way I could find to get around this was to copy the 'fixit' floppy from the
> CDs, boot with the boot floppies and then crank up the 'emergency
> holographic shell' (ROTFL!) from the fixit floppy, and mount the root

I've often wondered about that one, and just realised where it comes
from :-)

> partition from there. That seems a rather long-winded way to go about
> it (especially since, if I read things correctly, you're supposed to have
> to make a fixit floppy specific to your kernel configuration). Anyway, this
> seems to have worked, otherwise I wouldn't be typing this message :-)  Did
> I go about doing this the right way, or is there an easier way to access the
> filesystem in a writable state under such circumstances?
> 
> (And a final idle-curiousity question: what files are actually on the root
> partition, and which are on /usr? How can you tell where one stops and the
> other starts? Since everything is placed under "/", I'm not sure how I can
> tell what actually really lives where..)

`mount' will show you which file systems are attached to what, but watch
out for those symbolic links :-)

The default configuration has /, /usr and /var, so any other root
directory is actually on the 30-50M root partition. Except for things
like /compat, /home, and /sys which are symbolic links to directories on
/usr.

HTH,
Richard.





More information about the Ukfreebsd mailing list