Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 May 2003 10:31:51 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Chris Pressey <cpressey@catseye.mb.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: About my problem
Message-ID:  <20030521093151.GA94445@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20030521014213.7600e2f1.cpressey@catseye.mb.ca>
References:  <1052896702.3300.17.camel@arlette.love.dad> <20030514093825.GB64005@happy-idiot-talk.infracaninophile.co.uk> <20030521014213.7600e2f1.cpressey@catseye.mb.ca>

next in thread | previous in thread | raw e-mail | index | archive | help

--Qxx1br4bt0+wmkIi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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...
>=20
> 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.
>=20
> 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.
=20
> So, I tried following what I thought would be the logical variation on
> Mr. Seaman's advice.  I interrupted the boot process and typed:
>=20
>   set root_disk_unit=3D3
>   boot -s
>=20
> To no avail.  Still tried to mount root from ad1s1a.  Same error.
>=20
> Googling for 'root_disk_unit' I got the impression that it might not
> really be necessary under 4.x and that 'set rootdev=3Ddisk2s1a' 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.
=20
> (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))
>=20
> 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...
=20
> 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

--=20
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

--Qxx1br4bt0+wmkIi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE+y0eHdtESqEQa7a0RAo2gAJ0c79J4N2emxojjbC6g+U1IC7WInQCfaxi6
e1T6VEhp0kiB9os+oPVZk3A=
=e3Bm
-----END PGP SIGNATURE-----

--Qxx1br4bt0+wmkIi--



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