mount / failed after upgrade

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

Hi there. I tried to upgrade from 7.1 to 8.0
first I update ports and after I did
Code:
# freebsd-update -r 8.0-RELEASE upgrade
everything was OK, after that I:
Code:
# freebsd-update install
and was OK everything, no issues
After REBOOT the system doesn't start:
Code:
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
Code:
# 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

Daemon

Reaction score: 181
Messages: 1,695

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

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

I still have no idea how to recover my system.

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

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,875
Messages: 31,140

First, boot to single user mode then:
Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a
If any of the mount commands fail have a look at your /etc/fstab.
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

well I boot in single user mode
Code:
# 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:
Code:
/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

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,875
Messages: 31,140

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

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

Code:
# mount
/dev/ad4s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local multilabel)
that's the output of mount command
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,875
Messages: 31,140

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

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

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:
Code:
GEOM: ad4s1: geometry does not match label (255h, 63s != 16h, 63s)
could it be something useful?
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

aragon said:
Perhaps this?

Code:
mount -u -w /dev/ad4s1a
same message
Code:
mount: /dev/ad4s1a on /: specified device does not match mounted device
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

Code:
# 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

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,875
Messages: 31,140

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

jb_fvwm2

Daemon

Reaction score: 181
Messages: 1,695

Very! slim chance: (apologies)
Code:
# 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.
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

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:
Code:
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
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

Code:
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
 
OP
OP
hirohitosan

hirohitosan

Well-Known Member

Reaction score: 3
Messages: 279

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

aragon

Daemon

Reaction score: 279
Messages: 2,029

Your disklabel certainly looks odd to me.

Code:
#       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.

Code:
#       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

Well-Known Member

Reaction score: 85
Messages: 427

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

Well-Known Member

Reaction score: 15
Messages: 250

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

Daemon

Reaction score: 279
Messages: 2,029

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

Beastie

Daemon

Reaction score: 505
Messages: 2,235

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