root mount failed

Hi there.
I have installed FreeBSD 8.2 amd 64 from DVD to a USB stick, which I cut into 3 "classical" slices /, /usr, /var. Since 4GB DDR is used on my system (Gigabyte D525TUD/Atom525) I refused to use swap.

The problem is - the system refuses to boot. I got the device listing on a screen with bright font (which means, as I read, the pre-booting process, before the kernel is loaded) and then system halts after lone:

Code:
da0: 3864MB etc

I press Enter and

Code:
panic Root mount failed, startup aborted
Cannot dump. Device not defined or unavailable

Next, system waits fo 15 seconds and goes rebooting.

This time when FreeBSD logo shows, I chose (6) - shell - and receive "OK" invitation. I enter "boot -as" (don't know the meaning, read on this forum when searching to solve my problem) and device listing is shown again. It freezes at the same exact line
Code:
da0: 3864MB ...
but this time when I press ENTER next line I see says:

Code:
Tryin to mount root from ufs:/dev/da0s1a
Enter fuul pathname of shell or ENTER for /bin/sh:

I press Enter, see invitation # and enter "exit"

And system boots OK!

As I've read on this forum and in the handbook the problem may lay in BIOS drive numbering, but it doesn't seem to be my case, as BIOS shows my usb stick as DRIVE0 with the slices and two sata drives as disk1 and disk2.

I tried to change /boot/defaults/loader.conf but the only way to make it work is to set such variables as
Code:
rootdev="disk0s1a"
and
Code:
currdev="disk0sa1"

If I change disk number the system refuses to load at all. I guess I don't have the disk numbering error and can't get help from other threads titled "root mount error".

Thanks in advance for your help
 
Sergei789 said:
As i've read on this forum and in the handbook the problem may lay in BIOS drive numbering, but it doesn't seem to be my case, as BIOS shows my usb stick as DRIVE0 with the slices and two sata drives as disk1 and disk2
In this case it probably has nothing to do with the BIOS numbering but with the way USB devices are numbered. A USB stick can end up as da0, da1, da2, etc. depending on what else is plugged in.

To circumvent this you should use labels instead of device names.

See http://www.wonkity.com/~wblock/docs/html/labels.html
 
Well, now only the system usb stick is plugged in, but I used usb dvd-rom to install FreeBSD, may that cause the problem?

Thanks for the url.
 
Tried to label usb stick with the following command:

tunefs -L nasroot /dev/da0s1a

it returned:

Code:
tunefs: /dev/da0s1a: failed to write superblock
 
SirDice said:
A USB stick can end up as da0, da1, da2, etc. depending on what else is plugged in.

But after succesful boot and at the device listing it always shows "da0" as the only usb/scsi device. though, system refuses to mount root...
 
Only a slight chance, but if you search the forums and the web for
Code:
 mountroot (AND freebsd) loader
etc, the "mountroot" keyword may turn up a solution someone found (using other keywords progressively, like halt OR halts...
 
Sergei789 said:
Tried to label usb stick with the following command:

tunefs -L nasroot /dev/da0s1a

it returned:

Code:
tunefs: /dev/da0s1a: failed to write superblock

When changing the label, the filesystem must either be mounted read-only or not mounted at all.

USB discovery is slow on some systems, and setting a longer timeout in /boot/loader.conf can help:
Code:
kern.cam.boot_delay=10000
 
Back
Top