Mountroot does not see my slices anymore

Hi all,

One of my servers was shut down improperly because of an unexpected power cut.

Now everytime I try to restart it, the system greets me with a mountroot prompt:

Code:
Trying to mount root from ufs:/dev/da0s1a
ROOT MOUNT ERROR:
If you have invalid mount options, reboot and first try the following from the loader prompt:

	set vfs.root.mountfrom.options=rw

and then remove invalid mount options from fstab.

Loader variables:
vfs.root.mountfrom=ufs:/dev/da0s1a
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
  <fstype>:<device> Mount <device> using filesystem <fstype>
                      eg. ufs:/dev/da0S1a
                      eg. cd9660:/dev/acd0
                      This is equivalent to: mount -t cd9660 /dev/acd0 /
  ?                 List valid disk boot devices
  <empty line>      Abort manual input

mountroot> ?
List of GEOM managed disk devices:
  da0a da0 acd0 fd0

mountroot> ufs:/dev/da0s1a
Trying to mount root from ufs:/dev/da0s1a
ROOT MOUNT ERROR
[...]
mountroot>

I perfectly remember that the root slice was /dev/da0s1a when I installed the system a few month ago, so it didn't move.

Booting from a FreeBSD Live CD (frenzie), the disk is visible, can be inspected and mounted.

Code:
ls /dev/da0*
/dev/da0	/dev/da0s1a	/dev/da0s1c	/dev/da0s2c
/dev/da0s1	/dev/da0s1b	/dev/da0s2

disklabel /dev/da0s1
#/dev/da0s1:
8 partitions:
#        size	 offset	fstype	[fsize	bsize	bps/cpg]
  a: 23066599	8388608	4.2BSD	0	0	0
  b:  8388608	      0	  swap	
  c: 31455207	      0	unused	0	0


mount /dev/da0s1a /mnt/da0s1a.ufs
ls /mnt/da0s1a.ufs
.cshrc		boot	etc	mnt	sys
.profile	cdrom	home	proc	tmp
.snap		compat	lib	rescue	usr
COPYRIGHT	dev	libexec	root	var
bin		dist	media	sbin

cat /mnt/da0s1a.ufs/etc/fstab
/dev/da0s1b	none	swap	sw	0	0
/dev/da0s1a	/	ufs	rw	1	1
/dev/acd0	/cdrom	cd9660	ro,auto	0	0
linproc		/compat/linux/proc	linprocfs	rw	0	0

fsck -y /dev/da0S1a
** /dev/da0S1a
** Las Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check References Counts
** Phase 5 - Check Cyl groups
296958 files, 2008628 used, 3574460 free (71628 frags, 437854 blocks, 1.2% fragmentation)

I tried disabling or enabling AHCI by adding ahci_load="YES/NO" to /boot/loader.conf, and it didn't change anything (I don't think this server (a sunfire v20z) does actually have ahci at all).

What can I do?

Thanks for any help.
 
I'm wondering if the devices got upgraded (along with a kernel upgrade) to da0as1, and mounting that may work, then modifying each da0 to da0a in fstab. (Maybe you upgraded 8.0 to 8.2 or something and it transpired... ) Not booted into another machine where I could check more thoroughly before posting the conjecture.
 
Mountroot does not detect anything like da0as1.
The only things it sees are: da0a da0 acd0 fd0.

I tried to input
Code:
ufs:/dev/da0as1a
but it didn't work.
 
ZeWaren said:
Mountroot does not detect anything like da0as1.
The only things it sees are: da0a da0 acd0 fd0.

I tried to input
Code:
ufs:/dev/da0as1a
but it didn't work.

So, why did you still not try da0a?
 
I also tried it and got the same response:
Code:
mountroot> ufs:/dev/da0a
ROOT MOUNT ERROR
 
jb_fvwm2 said:
Code:
# guessing again...
[mount] da0S1a
da0aS1a
da0s1
da0S1   # note uppercase...
# ... from the first post

I tried every combination using da, 0, 1, s, S, a and c and nothing worked.

I booted a FreeBSD 8.2 livefs using the CD I used to install the server and I got the same problem (slices were undetected).

So:
-Using a Frenzy live CD, which is a FreeBSD 6.3, the partitions/slices are correctly detected and can be mounted/edited.
-Using a FreeBSD 8.2 livefs CD, the partitions/slices aren't detected (the fdisk part of sysinstall sees the disk as empty).

What should I try next?
 
Try labelling the root partition and changing fstab to reflect?

On an unmounted filesystem
# tunefs -L <label> /dev/da0s1a
 
I tried that.

On frenzy:
Code:
frenzy:# glabel label rootfs /dev/da0s1a
frenzy:# glabel status
                     Name   Status Components
iso9660/frenzy-1.1-std-en   N/A    acd0t01
            iso9660/CDROM   N/A    md1.uzip
             label/rootfs   N/A    da0s1a
             
frenzy:# ls /dev/label
rootfs
frenzy:# mount /dev/label/rootfs /mnt/da0s1a.ufs
frenzy:# ls /mnt/da0s1a.ufs
.cshrc		boot	etc	mnt	sys
.profile	cdrom	home	proc	tmp
.snap		compat	lib	rescue	usr
COPYRIGHT	dev	libexec	root	var
bin		dist	media	sbin

The label is created and can be used even after a reboot.

On 8.2 livefs:
Code:
#glabel status
                  Name   Status Components
iso9660/FreeBSD_LiveFS   N/A    acd0

#ls /dev/label
No such file or directory

The label is not detected.
I also tried using tunefs -L, got a label named /dev/ufs/rootfs and the results were the same.
 
Well, I might bump into the similar problem. My box failed to "mountroot" and hanged there yesterday, while everything was fine before yesterday. I cannot type anything after the "mountroot" prompt. I've not changed any bit on /etc/fstab.:(
 
Back
Top