root mount failed

Sergei789

New Member


Messages: 4

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
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 6,926
Messages: 28,850

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
 
OP
OP
S

Sergei789

New Member


Messages: 4

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.
 
OP
OP
S

Sergei789

New Member


Messages: 4

Tried to label usb stick with the following command:

tunefs -L nasroot /dev/da0s1a

it returned:

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

Sergei789

New Member


Messages: 4

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...
 

jb_fvwm2

Daemon

Reaction score: 180
Messages: 1,692

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...
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Reaction score: 3,631
Messages: 13,850

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
 
Top