About my problem

Matthew Seaman m.seaman at infracaninophile.co.uk
Wed May 21 02:32:01 PDT 2003


On Wed, May 21, 2003 at 01:42:13AM -0500, Chris Pressey wrote:

> Today I found myself in a similar position to Mr. Teilhard, and tried
> following this advice...
> 
> I installed FreeBSD 4.8RC2 on one computer on an IDE hard drive which
> was hooked up as the primary slave (ad1) and later moved that hard drive
> to another computer, hooking it up as the secondary slave (ad3) there.
> 
> When booting from that drive on the second computer, I got the same
> failure message "cannot mount root from ad1s1a".  I tried specifying
> "ufs:/dev/ad3s1a" but it would only return error code 6 (iirc).

If you know in advance that you're going to be moving the drive to a
different device, then you'll save yourself a lot of trouble simply by
editing the /etc/fstab to match the new location *before* you shutdown
the system and move the drive from the original.  Shutting down the
system with a non-matching fstab is a lot easier than booting it up.
 
> So, I tried following what I thought would be the logical variation on
> Mr. Seaman's advice.  I interrupted the boot process and typed:
> 
>   set root_disk_unit=3
>   boot -s
> 
> To no avail.  Still tried to mount root from ad1s1a.  Same error.
> 
> Googling for 'root_disk_unit' I got the impression that it might not
> really be necessary under 4.x and that 'set rootdev=disk2s1a' might be
> in order.  (The boot sequence informed me that the drive I was trying to
> boot off of was indeed seen as disk2 by the BIOS.)  I tried it, and
> several combinations of both rootdev and root_disk_unit, with no luck.

Hmmm... The early boot process is a not very familiar country to me, I
admit.  However, if the system will come up to the state where you can
get into the loader, and it has a working kernel on the same partition
as all of the loader files, then you should be able to boot into
single user mode.
 
> (btw, the kernel was GENERIC with the only change being that lnc0 was
> commented out (for some reason probing that NIC caused the boot sequence
> to go haywire, and I didn't really need it in this case))
> 
> Eventually I gave up, unplugged the primary slave (a CDROM,) plugged
> the hard drive in as the primary slave, booted off of it, used ee to
> change all occurances of ad1xxx to ad3xxx in /etc/fstab, shut down the
> machine, moved the hard drive back to the secondary slave, put the CDROM
> back in, and, of course, it booted up just peachy.

If you have the option of doing something like that, then that's
definitely the way to go...
 
> But I may have to do something very much like this again in the near
> future and I might not have the luxury of monkeying with the other
> devices next time.  So I'd like to know if I've misinterpreted Mr.
> Seaman's instructions, or if there is some subtle magic implied in them
> that I'm not picking up on, or what, because they simply didn't seem to
> work for me.

Clearly what I wrote was wrong or incomplete, for which I apologise.
Unfortunately I'm not in a position to investigate further so I can't
provide any better advice right now.  However, I think that if you
care to experiment the next step would be simply to 'boot -s' from the
loader without trying to reset any of the loader variables.  Once
you've booted to single user, then you've got all of the tools on the
root partition available which should be sufficient to get the root
partition remounted read-write and edit the /etc/fstab file.

Alternatively you can boot in 'fixit' mode from the installation
media, which essentially provides you with an alternate kernel and
root partition from whence you can mount the affected drive and edit
files as necessary.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20030521/5d2e95cf/attachment.bin


More information about the freebsd-questions mailing list