# mount / failed after upgrade



## hirohitosan (Dec 9, 2009)

Hi there. I tried to upgrade from 7.1 to 8.0
first I update ports and after I did

```
# freebsd-update -r 8.0-RELEASE upgrade
```
everything was OK, after that I:

```
# freebsd-update install
```
 and was OK everything, no issues
After REBOOT the system doesn't start:

```
Mounting root filesystem rw failed
startup aborted
ERROR: ABORTING BOOT (sending SIGTERM t parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
```
after that I tried 
	
	



```
# fsck -y /
** /dev/ad4s1a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1771 files, 131968 used, 121847 free (399 frags, 15181 blocks, 0.2% fragmentation)
mount reload of '/' failed: invalid argument
```
there is a way to start up my system?
thanks


----------



## jb_fvwm2 (Dec 9, 2009)

Search the forums for (search "as posts")
...
geom_bsd
...
and at least one of the posts may have a few commands 
one can use at the loader prompt. (Maybe)
"Escape to loader prompt" 
...
Maybe not the only way though.


----------



## hirohitosan (Dec 9, 2009)

I still have no idea how to recover my system.

Maybe the single option will be to start a fresh new install.


----------



## SirDice (Dec 9, 2009)

First, boot to single user mode then:

```
fsck -y
mount -u /
mount -a -t ufs
swapon -a
```

If any of the mount commands fail have a look at your /etc/fstab.


----------



## hirohitosan (Dec 10, 2009)

well I boot in single user mode

```
# fsck -y
# mount -u /
mount: /dev/ad4s1a on /: specified device does not match mounted device
# mount -a -t ufs
mount: /dev/ad4s1a on /: specified device does not match mounted device
```
my /etc/fstab looks like:

```
/dev/ad4s1b      none   swap
/dev/ad4s1a      /      ufs       rw    1 1
/dev/ad4s1e      /tmp   ufs       rw    2 2
/dev/ad4s1f      /usr   ufs       rw    2 2
/dev/ad4s1d      /var   ufs       rw    2 2
/dev/acd0        /cdrom
```

any suggestions?


----------



## SirDice (Dec 10, 2009)

Hmm.. That error doesn't look too good. If you boot to single user mode what does `# mount` output?


----------



## hirohitosan (Dec 10, 2009)

```
# mount
/dev/ad4s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local multilabel)
```

that's the output of mount command


----------



## SirDice (Dec 10, 2009)

Now that's odd. The message above states the entry in fstab for / doesn't match the drive that's mounted. But it is.

Try to remove that line in fstab and recreate it, using tab as a delimiter.


----------



## hirohitosan (Dec 10, 2009)

SirDice said:
			
		

> Try to remove that line in fstab and recreate it, using tab as a delimiter.


I tried but I cannot modify fstab for the filesystem is mounted read only. I noticed a message:
	
	



```
GEOM: ad4s1: geometry does not match label (255h, 63s != 16h, 63s)
```
could it be something useful?


----------



## aragon (Dec 10, 2009)

Perhaps this?


```
mount -u -w /dev/ad4s1a
```


----------



## hirohitosan (Dec 10, 2009)

aragon said:
			
		

> Perhaps this?
> 
> 
> ```
> ...


same message 
	
	



```
mount: /dev/ad4s1a on /: specified device does not match mounted device
```


----------



## aragon (Dec 10, 2009)

Please paste:


```
ls /dev/ad4*
```


----------



## hirohitosan (Dec 10, 2009)

```
# ls -al /dev/ad4*
crw-r---- 1 root operator 0, 83 Dec. 10 12:18 /dev/ad4
crw-r---- 1 root operator 0, 84 Dec. 10 12:18 /dev/ad4s1
crw-r---- 1 root operator 0, 85 Dec. 10 12:18 /dev/ad4s1a
crw-r---- 1 root operator 0, 86 Dec. 10 12:18 /dev/ad4s1b
crw-r---- 1 root operator 0, 87 Dec. 10 12:18 /dev/ad4s1d
crw-r---- 1 root operator 0, 88 Dec. 10 12:18 /dev/ad4s1e
crw-r---- 1 root operator 0, 89 Dec. 10 12:18 /dev/ad4s1f
```


----------



## SirDice (Dec 10, 2009)

When booting do you also get dropped into the mountroot> prompt? Or does it boot the kernel and then complain about /etc/fstab?


----------



## aragon (Dec 10, 2009)

Also please paste:


```
fdisk /dev/ad4
bsdlabel /dev/ad4s1
```


----------



## jb_fvwm2 (Dec 10, 2009)

Very! slim chance: (apologies)

```
# escape to loader prompt
load /boot/kernel/geom_mbr.ko
load /boot/kernel/geom_label.ko
load /boot/kernel/geom_bsd.ko
boot
```
It fixed other 7x 8x problems but this one
seems dissimilar.


----------



## hirohitosan (Dec 10, 2009)

SirDice said:
			
		

> When booting do you also get dropped into the mountroot> prompt? Or does it boot the kernel and then complain about /etc/fstab?



like I said before everything starts normal but when it comes to mount the file system:

```
Mounting root filesystem rw failed
startup aborted
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
```
and the same prompt like in "single user" apear


----------



## hirohitosan (Dec 11, 2009)

```
parameters extracted from in-core disklabel are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 312576642 (152625 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
<UNUSED>
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>

# bsdlabel /dev/ad4s1

8 partitions :
#       size   offset   fstype  [fsize   bsize   bps/cpg]
a:   1048576       63   4.2BSD    2048   16384         8
b:   4119728  1048639     swap
c: 312576642       63   unused       0       0   #"raw" part, don't edit
d:   4155392  5168367   4.2BSD    2048   16384     28528
e:   1048576  9323759   4.2BSD    2048   16384         8
f: 302204370 10372335   4.2BSD    2048   16384     28528

partition c: partition extends past end of unit

bsdlabel: partition c doesn't start at 0!
basdlabel An incorect partition c may cause problems for standard system utilities

partition f partition extends past end of unit
```


----------



## hirohitosan (Dec 11, 2009)

well I have no idea. Maybe the last sollution is to wipe out the whole disk and start a fresh new install


----------



## aragon (Dec 11, 2009)

Your disklabel certainly looks odd to me.


```
#       size   offset   fstype  [fsize   bsize   bps/cpg]
a:   1048576       63   4.2BSD    2048   16384         8
```
Partition "a" usually has an offset of 16 or 0.  Your offset seems strange.  I've never before seen such a low bytes/cpg value either.


```
#       size   offset   fstype  [fsize   bsize   bps/cpg]
c: 312576642       63   unused       0       0   #"raw" part, don't edit
```
This is equally bizarre.  Partition "c" represents the entire device and so should have an offset of 0.  The 63 offset is what is causing the error message.

If you start editing the label, back your data up first.  Then try edit partition "c" and give it an offset of zero.  If that doesn't help, give partition "a" an offset of 16.  You'll probably have to reboot between each edit to test it.

If you can't resolve it like this you'll probably have to rebuild your disk from scratch.


----------



## mickey (Dec 11, 2009)

aragon said:
			
		

> Partition "a" usually has an offset of 16 or 0.  Your offset seems strange.



Partition 'a' usually has an offset equal to the number of sectors/track, specified in the geometry. As the geometry specifies 63 sectors/track, this would be the correct value for this geometry.


----------



## Speedy (Dec 11, 2009)

I have similar problem. Trying to install 8.0 to an empty disk. There is something 8 does not like about drive geometry, no matter what I do it complains no node is created in /dev. I used 6.2 install to partition and label the drive, no problem. Booting from 8 install - disk is seen as empty, from 6.2 install CD the slice with labels is there.


----------



## aragon (Dec 11, 2009)

mickey said:
			
		

> Partition 'a' usually has an offset equal to the number of sectors/track, specified in the geometry. As the geometry specifies 63 sectors/track, this would be the correct value for this geometry.


No, that is incorrect.  What makes you say that?  Read bsdlabel(8).


----------



## mickey (Dec 11, 2009)

aragon said:
			
		

> No, that is incorrect.  What makes you say that?  Read bsdlabel(8).



You are right, I was actually thinking of the offset of the first slice on the disk.


----------



## Beastie (Dec 11, 2009)

Yes, even if the slice that contains partition *a* and the rest starts at the *disk's block 63* (fdisk), *a* will still start at the *slice's block 0* (bsdlabel). And *c* should also start at block 0 since it represents *a* + the rest.


----------



## jb_fvwm2 (Dec 11, 2009)

Speedy said:
			
		

> I have similar problem. Trying to install 8.0 to an empty disk. There is something 8 does not like about drive geometry, no matter what I do it complains no node is created in /dev. I used 6.2 install to partition and label the drive, no problem. Booting from 8 install - disk is seen as empty, from 6.2 install CD the slice with labels is there.



See my post above?


----------



## hirohitosan (Dec 11, 2009)

thanks ... finally I reinstall from scratch everything. Now my server is up again.


----------

