Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 1999 21:13:56 +0100
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        Joao Pedras <jpedras@mail.telepac.pt>
Cc:        freebsd-stable@FreeBSD.ORG, seggers@semyam.dinoco.de
Subject:   Re: Filesystem mount failed 
Message-ID:  <199901242013.VAA06666@semyam.dinoco.de>
In-Reply-To: Your message of "Sun, 24 Jan 1999 18:55:54 GMT." <XFMail.990124185554.jpedras@mail.telepac.pt> 

next in thread | previous in thread | raw e-mail | index | archive | help
> When I rebooted the system stopped with " /dev/da0s1a on /: Specified device
> does no match mounted device
> Filesystem mount failed, startup aborted"

> slice. Well it worked. Had to change /etc/fstab to mount /dev/da0a on / so bo
ot
> process could go smoothly, without manual intervention.
> 
> Is this a proper procedure ? Is it ok to /dev/da0a on / ?

Some months ago it was changed to require the full name with slices
even in 2.2-stable (earlier 2.2-stable used the shorter compatibility
slices) so I think it is not OK.

> What happenned ? Why doesn't it mount with the old /dev/da0s1a ?
> Anything wrong with today's src ?

I think the boot loader is giving the kernel wrong information about
the root device and the kernel thinks that da0s1a is not the root.
Using an older loader (source from sometime Thursday or Friday) made
it work again with the new kernel.  

In sys/boot/i386/libi386/biosdisk.c this seems to be the culprit:

----------------------------------------------------------------------
int
bd_getdev(struct i386_devdesc *dev)
{
[...]
    int				unitofs = 0, i, unit;

    biosdev = bd_unit2bios(dev->d_kind.biosdisk.unit);
[...]
    /* XXX a better kludge to set the root disk unit number */
    if ((nip = getenv("root_disk_unit")) != NULL) {
	i = strtol(nip, &cp, 0);
	/* check for parse error */
	if ((cp != nip) && (*cp == 0))
	    unit = i;
    } else {
	(biosdev & 0x7f) - unitofs;					/* allow for #wd compenstation in da case */
    }

    rootdev = MAKEBOOTDEV(major,
			  (dev->d_kind.biosdisk.slice + 1) >> 4, 	/* XXX slices may be wrong here */
			  (dev->d_kind.biosdisk.slice + 1) & 0xf, 
			  unit,
			  dev->d_kind.biosdisk.partition);
[...]
}
----------------------------------------------------------------------

Especially note the if!  If root_disk_unit is not set the variable
unit is unitialized which probably causes this problem.  As workaround
I'd try setting root_disk_unit in /boot/boot.config to zero or backing
out the commit which introduced these changes.  I can't test it myself
now as the system is executing it's daily tasks.  :-(

Stefan.
-- 
Stefan Eggers                 Lu4 yao2 zhi1 ma3 li4,
Max-Slevogt-Str. 1            ri4 jiu3 jian4 ren2 xin1.
51109 Koeln
Federal Republic of Germany

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



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