Boot fails at "Trying to mount root"

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

Hi

I've tried to upgrade my FreeBSD 7.4 to 8.2 according to:

http://www.freebsd.org/releases/8.2R/announce.html

using freebsd-update:
Code:
# freebsd-update upgrade -r 8.2-RELEASE
and it was crashing with "core dump".

Now I cannot start and get this message:
Code:
Trying to mount root from ufs dev ad0s1a
added: not found
The system is just "read only".

If I try fsck -f, I get the error
Code:
fsck_ufs for /dev/ad0s1a in /sbin:/usr/sbin:  no such file or directory
How to rescue it?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,793
Messages: 33,081

Are you dropped to single user mode or are you stuck in the bootloader?
 

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

ada0s1a? Not enough information to know the commands available at the prompt there, nor your current mounted filesystems if any at the error messages. Maybe posting more context (the post before this one also does not have enough information.) At any rate, it should be easy, but not simple (multiple steps and posts here...)
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

After restart, my freeBSD goes to the single user mode automatically and I get these messages on the screen:
 

Attachments

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

Might be easy to fix, but with commands such as:
Code:
mount -t ufs -o rw /dev/ad0s1a # 
fsck_ffs -y /dev/ad0s1a   # etc (the other stuff in [FILE]/etc/fstab[/FILE]
edit /etc/fstab   # modify it maybe after fsck_ffs for any corrected devices
Of course there's other stuff I've forgotten or do not know enough to suggest simply from memory... such as the terse "not found" might refer to ad0s1a now existing with another name in /dev, maybe change to it and look around...
 

wblock@

Beastie Himself
Developer

Reaction score: 3,677
Messages: 13,851

Do the fsck before mounting anything r/w:
# fsck -y -t ufs
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

fsck or /sbin/fsck doesn't work!

Code:
fsck_ufs for /dev/ad0s1a in /sbin:/usr/sbin:  no such file or directory
 

Attachments

wblock@

Beastie Himself
Developer

Reaction score: 3,677
Messages: 13,851

# /rescue/fsck -y -t ufs

If that doesn't work, boot from an mfsBSD CD and run it from there.
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

wblock@ said:
# /rescue/fsck -y -t ufs

If that doesn't work, boot from an mfsBSD CD and run it from there.
Thanks but which command should I run from mfsbsd boot CD, if I run /rescue/fsck -y -t ufs nothing happens.
Should I mount first?
 

wblock@

Beastie Himself
Developer

Reaction score: 3,677
Messages: 13,851

Do not mount any of the filesystems. -t ufs tells fsck(8) to look at /etc/fstab and check all the UFS filesystems listed there. But the mfsBSD CD doesn't have entries for your disk, so refer to the filesystems by device:
Code:
# fsck -y /dev/ad0s1a
# fsck -y /dev/ad0s1d
# fsck -y /dev/ad0s1e
# fsck -y /dev/ad0s1f
 
  • Thanks
Reactions: ccc
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

Thanks, but cannot find /dev/ad0s1a and don't know how to identify the file system.
 

Attachments

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

Code:
 fsck_ffs -y /dev/ad0s1a
I found that that command would work on a thumbdrive [1] where fsck gives the same error as your linked file above. Unsure about the ada0s1a OR ada1s1a OR ad0s1a etc, additionally sometimes
Code:
 #cd /dev
#ls
before the fsck_ffs sometimes worked better (if I recall).

...
[1] In that regard, I've taped it to one of the thumbdrives for reference.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,677
Messages: 13,851

ccc said:
Thx, but cannot find /dev/ad0s1a and don't know howto identify the file system.
Please show the output of
# ls /dev/ad*
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

Thx, it works now using fsck_ffs instead of fsck command:
Code:
mfsbsd# ls /dev/ad*
/dev/ad0	/dev/ad0s1a	/dev/ad0s1d	/dev/ad0s1f
/dev/ad0s1	/dev/ad0s1b	/dev/ad0s1e
mfsbsd# [color="Red"][B]fsck -y /dev/ad0s1a
fsck: Could not determine filesystem type[/B][/color]
mfsbsd# [B]fsck_ffs -y /dev/ad0s1a
** /dev/ad0s1a
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3818 files, 135068 used, 2342011 free (811 frags, 292650 blocks, 0.0% fragmentation)

***** FILE SYSTEM IS CLEAN *****[/B]
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

I've successfully cleaned all drives:

/dev/ad0s1a
/dev/ad0s1d
/dev/ad0s1e
/dev/ad0s1f

but my FreeBSD won't boot and still goes by itself into single user mode.
Any idea howto solve this problem?
 

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

More details about the boot--default menu? Deselect firewire in BIOS? No USB attached?
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

jb_fvwm2 said:
More details about the boot--default menu? Deselect firewire in BIOS? No USB attached?
Boot menu looks normal, default, standard. No firewire and no USB attached. Is there any repair option in the setup CD?
 

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

Usually it shows a reason if it (without the CD, just the install) goes to single-user. Errors shown that way? (For instance, I have to boot v9 with default rather than what used to be choice #2 , acpi disabled).
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

jb_fvwm2 said:
Usually it shows a reason if it (without the cd, just the install) goes to single-user. Errors shown that way? (For instance, I have to boot v9 with default rather than what used to be choice #2 , acpi disabled).
To boot with "acpi disabled" didn't help.
BTW I get these error messages after restart:
 

Attachments

OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

BTW knows anyone why the "boot" command doesn't work in single user mode?
 

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,718

You are already booted, though not in the way you'd expect. If you can fsck_ffs every filesystem, you may be able to load your normal shell #csh #or... maybe after a mount -va ... From your attached image above, what about running fsck_ffs on the likely instances in /dev ?
 
OP
C

ccc

Aspiring Daemon

Reaction score: 12
Messages: 621

jb_fvwm2 said:
You are already booted, though not in the way you'd expect. If you can fsck_ffs every filesystem, you may be able to load your normal shell #csh #or... maybe after a mount -va ... From your attached image above, what about running fsck_ffs on the likely instances in /dev ?
I've done what you suggested, but still goes into single user mode.
 

wblock@

Beastie Himself
Developer

Reaction score: 3,677
Messages: 13,851

The errors say that it can't find swapon(8), which should be in /sbin. So somehow /etc/fstab is wrong, or possibly there's more than one drive and the wrong one is being mounted, or this is not a standard FreeBSD system. Or the disk just picked this time to grow some bad sectors.
 
Top