8.0 -> 8.1 "panic: root mount failed"

Ok, this is going to be a lot of typing :p

As per the suggestion of Beastie to try the commands 'mount' and 'file -s' on the partitions that seem to have changed from ad10 to ad14, I did so after booting from the fixit disk.

Code:
file -s /dev/ad14s1a
file: could not find any magic files

This was the case for all of them: ad14s1a - ad14s1f.

Mounting worked, however only for three out of the five partitions; for ad14s1b and ad14s1d I got:

Code:
mount: /dev/ad14s1b: invalid argument

I have no clue why these two partitions couldn't mount. I could guess one of them being /swap and therefor for some reason not being mountable (?), but that leaves still one other partition that refuses to mount.

For the three that did mount I wrote down what is in it.

/dev/ad14s1a

Code:
.cshrc
.profile
.snap
bin/
boot/
compat@
dev/
dist/
entropy
etc/
home@
lib/
libexec/
media/
mnt/
proc/
rescue/
root/
sbin/
sys@
tmp/
usr/
var/

/dev/ad14s1e

Code:
.ICE-unix
.X11-unix
.XIM-unix
.font-unix
.snap/
4bbef6756759645949ftjrjh
fam-caliante
kde-caliante
kde-root
lucene-cffgdjlshhgdshghdhfg-write.lock*

/dev/ad14s1f

Code:
.snap
X11R6@
ZTS/ ->>> A directory I created myself containing MP3.
bin/
compat/
games/
home/ ->>> Contains indeed my personal files as a user (Desktop, Downloads, etc)
include/
lib/
libdata/
libexec/
local/
obj/
ports/
sbin/
share/
src/

/mnt2

Then there also appears a /mnt2 which I didn't create, and which didn't show up in df (perhaps this is the fixit disk?)

Code:
.cshrc
profile
bin/
boot/
boot.catalog
cdrom.inf
dev/
etc/
lib/
libexec/
media/
mnt/
proc/
rescue/
root/
rr_move/
sbin/
stand@
sys@
tmp/
usr/
var/


Finally, df shows:
Code:
/dev 100%
/dist 100%
The three partititions that I mounted.
 
Caliante said:
Ok, this is going to be a lot of typing :p

As per the suggestion of Beastie to try the commands 'mount' and 'file -s' on the partitions that seem to have changed from ad10 to ad14, I did so after booting from the fixit disk.

Code:
file -s /dev/ad14s1a
file: could not find any magic files

That means the "magic file" is missing from the fixit, maybe left out to save space.
But some of this is good news:

Code:
mount: /dev/ad14s1b: invalid argument

From a default "auto" install, you get these partitions:

"a" /
"b" swap
"d" /var
"e" /tmp
"f" /usr

Something has happened to /var. Hard to say what, exactly. fsck -y /dev/ad14s1d is worth a try, but don't be surprised if it doesn't work. Good news is that your actual data should all be in / (mostly /etc) and /usr (actual data and /usr/local/etc), and you can use the fixit to copy that elsewhere.

Then there also appears a /mnt2 which I didn't create, and which didn't show up in df (perhaps this is the fixit disk?)

Yes, that's the fixit media. (But if it doesn't show in the df output, where does it show?)
 
And again many, many thanks for helping me, Wblock :f

wblock said:
That means the "magic file" is missing from the fixit, maybe left out to save space.

I trust you know what that is, I have no clue :e

wblock said:
Something has happened to /var. Hard to say what, exactly. fsck -y /dev/ad14s1d is worth a try, but don't be surprised if it doesn't work.

I tried it, and you are right, it didn't work:

Code:
fsck -y /dev/ad14s1d
fstab: /etc/fstab:0: no such file or directory
fstab: /etc/fstab:0: no such file or directory
fsck: could not determine filesystem type.

Notes:
1. This was the case for all partitions, not just for s1d.
2. I did not mount any of them, as I have understood for fsck filesystems should not be mounted.

wblock said:
Good news is that your actual data should all be in / (mostly /etc) and /usr (actual data and /usr/local/etc), and you can use the fixit to copy that elsewhere.

I'm starting to be afraid I will have to do a complete reinstall (which will be a bunch of work :(, especially taking into account it was a pain in the *ss the last time to get FreeBSD to dual boot with XP that resides on disk1. And I still need XP until I have discovered all FreeBSD-applications as replacement for the ones I currently use in XP).

Most of what I did with the machine sofar was customization (tweak KDE a little here, install Flash/Skype/Firefox with add ons there, and such). I have a 1 GB FAT32 partition on the other disk, could you perhaps tell me how I backup which important directories on what FreeBSD-partition to the 1GB FAT32? With that I mostly mean: which directories, and how to find out the FAT32-partition name and mount it to the Fixit-disk?

wblock said:
Yes, that's the fixit media. (But if it doesn't show in the df output, where does it show?)

I have to admit: I have no clue. It was on accident that I typed 'cd /mnt2' where I wanted to type 'mnt3', and noticed this one also existed. a 'df' didn't show it, 'though.

Thank you again for all your help :f

Final notes:
1. I learned myself that I am very committed to getting FreeBSD working again - this is good news :e
2. Once I have a working installation I will never, ever again, do an upgrade from X.x to X.y :stud
 
Caliante said:
I'm starting to be afraid I will have to do a complete reinstall (which will be a bunch of work :(, especially taking into account it was a pain in the *ss the last time to get FreeBSD to dual boot with XP that resides on disk1.

If you have a fair amount of memory, try VirtualBox. Install it on the Windows system and run FreeBSD inside it as a VM. Most of the features of a real machine, but you can have both systems running at the same time, sharing peripherals and disk space.

Most of what I did with the machine sofar was customization (tweak KDE a little here, install Flash/Skype/Firefox with add ons there, and such). I have a 1 GB FAT32 partition on the other disk, could you perhaps tell me how I backup which important directories on what FreeBSD-partition to the 1GB FAT32? With that I mostly mean: which directories, and how to find out the FAT32-partition name and mount it to the Fixit-disk?

It sounds like it's all stuff you'd recreate on reinstall anyway. Do you have any user-created files (documents, photos, etc)?

2. Once I have a working installation I will never, ever again, do an upgrade from X.x to X.y :stud

Probably the wrong lesson to take from this; FreeBSD source upgrades work great. Binary upgrades I've never tried, but they work also or the FreeBSD team wouldn't have released them. Whatever happened may not have had anything to do with the upgrade.

In the future: make a backup before doing something drastic. DVDs and drive space are cheap.
 
Caliante said:
wblock said:
Something has happened to /var. Hard to say what, exactly. fsck -y /dev/ad14s1d is worth a try, but don't be surprised if it doesn't work.
I tried it, and you are right, it didn't work:

Code:
fsck -y /dev/ad14s1d
fstab: /etc/fstab:0: no such file or directory
fstab: /etc/fstab:0: no such file or directory
fsck: could not determine filesystem type.
Try # fsck -y -t ufs /dev/ad14s1d

Caliante said:
I'm starting to be afraid I will have to do a complete reinstall (which will be a bunch of work :(, especially taking into account it was a pain in the *ss the last time to get FreeBSD to dual boot with XP that resides on disk1.
Boot disc1 and redo the installation, mounting the partitions on the right mountpoints (a on /, d on /var, e on /tmp and f on /usr) and disabling newfs for all partitions.
This may work, but there are no guarantees.

Caliante said:
Most of what I did with the machine sofar was customization (tweak KDE a little here, install Flash/Skype/Firefox with add ons there, and such). I have a 1 GB FAT32 partition on the other disk, could you perhaps tell me how I backup which important directories on what FreeBSD-partition to the 1GB FAT32? With that I mostly mean: which directories, and how to find out the FAT32-partition name and mount it to the Fixit-disk?
All your "user customization" is in your home directory (i.e. on /usr in your case). System settings are in /etc (i.e. on /). Boot the livefs disc and do the following:
# cd /mnt
# mkdir fat root usr
# mount -t msdosfs -o longnames /dev/ad10s1 fat
(try the above command with ad10s1 up to ad10s9 until you find your FAT32 slice)
# mount -t ufs /dev/ad14s1a root
# mount -t ufs /dev/ad14s1f usr
# tar -cvzf /mnt/fat/home_backup.tar.gz /mnt/usr/home/Caliante
# tar -cvzf /mnt/fat/etc_backup.tar.gz /mnt/root/etc
 
wblock said:
If you have a fair amount of memory, try VirtualBox. Install it on the Windows system and run FreeBSD inside it as a VM. Most of the features of a real machine, but you can have both systems running at the same time, sharing peripherals and disk space.

My main goal is to get rid of Windows :e

wblock said:
It sounds like it's all stuff you'd recreate on reinstall anyway. Do you have any user-created files (documents, photos, etc)?

Well, the thing is: in setting up this box I had to do a lot of manually editing config files, and it's them I would like to keep foremost. So that I can easily copy them back on an eventual fresh install of FreeBSD and have all these settings in place again.

wblock said:
Probably the wrong lesson to take from this; FreeBSD source upgrades work great.

Point taken, I will study source upgrades next time I dare to do an upgrade.

wblock said:
Binary upgrades I've never tried, but they work also or the FreeBSD team wouldn't have released them. Whatever happened may not have had anything to do with the upgrade.

I'm rather superstituous; if it worked before the upgrade, I didn't do anything before the upgrade (as in custom kernel and such), I didn't do anything during the upgrade, and it doesn't work, then? :p

Thanks again for your support :f
 
Thanks again, Beastie. And now, Beastie, now it gets interesting :pP

Beastie said:
Try # fsck -y -t ufs /dev/ad14s1d

Actually, this did gave some results:

Code:
fstab:/etc/fstab:0: No such file or directory
fstab:/etc/fstab:0: No such file or directory
** /dev/ad14s1d
** Last mounted on /mnt3 [B]->>> Not true, yesterday I couldn't mount it.[/B]
** Phase 1 Check blocks and sizes
** Phase 2 Check path names
** Phase 3 Check connectivity
** Phase 4 Check reference counts
** Phase 5 Check cyl groups

88963 files, 339850 used, 1808077 free (2869 frags, 225651 blocks, 0,1% fragmentation).

***** FILE SYSTEM IS CLEAN *****

Note, however, that doing fsck without the '-y' and without the 'ufs' still doesn't work.

Also, trying to mount it without '-t ufs' also still doesn't work, but with these two I can mount it and can look into it to see directories like:
audit/
backup/
crash/
cron/
preserve/
rwho/

And such.


So, would this mean that for some reason or the other all the partitions appear to be intact? Would this mean I could simply:
1. Boot the livefs-disk again
2. Go into disk label editor to set the proper mount points for the ad14-partitions
3. Mount the partition that has /etc/, edit fstab to point to the now ad14-partitions (because in there it probably still says ad10?)
4. Reboot
5. Be happy?

(My guess is your answer will be 'no' and you will tell me why :( )

Beastie said:
Boot disc1 and redo the installation, mounting the partitions on the right mountpoints (a on /, d on /var, e on /tmp and f on /usr) and disabling newfs for all partitions.
This may work, but there are no guarantees.

Just for my understanding: the problems occurred after the first steps of the upgrade. If I understand correctly the patches to the kernel have been installed, so the kernel is now 8.1. If I were to reinstall with an 8.0 disk or with an 8.1 disk, wouldn't this pose any problems with the files and settings already on the disks (as they are now partly 8.0 and partly 8.1)?

Beastie said:
All your "user customization" is in your home directory (i.e. on /usr in your case). System settings are in /etc (i.e. on /). Boot the livefs disc and do the following:
# cd /mnt
# mkdir fat root usr
# mount -t msdosfs -o longnames /dev/ad10s1 fat
(try the above command with ad10s1 up to ad10s9 until you find your FAT32 slice)
# mount -t ufs /dev/ad14s1a root
# mount -t ufs /dev/ad14s1f usr
# tar -cvzf /mnt/fat/home_backup.tar.gz /mnt/usr/home/Caliante
# tar -cvzf /mnt/fat/etc_backup.tar.gz /mnt/root/etc

Thanks very much for this completely fool proof step by step guide. It's very clear.

When I tried it, it went wrong on the try to mount:

Code:
mount -t msdosfs -o longnames /dev/ad10s1 fat
mount: exec ms_dosfs not found: no such file or directory
mount: in path:/sbin;/usr/sbin

Thanks again for all your great help :f
 
Caliante said:
but with these two I can mount it and can look into it to see directories like:
audit/
backup/
crash/
cron/
preserve/
rwho/

And such.

So, would this mean that for some reason or the other all the partitions appear to be intact? Would this mean I could simply:
1. Boot the livefs-disk again
2. Go into disk label editor to set the proper mount points for the ad14-partitions
3. Mount the partition that has /etc/, edit fstab to point to the now ad14-partitions (because in there it probably still says ad10?)
4. Reboot
5. Be happy?

Possibly. At this point it's a recovery operation, and a little thing that goes wrong can still wipe it out. I'd suggest backing up these partitions with dump(8), but the dumpfile for /usr would certainly be bigger than 1G, and probably bigger than a FAT32 filesystem would like. If you had an external hard drive with UFS, or another computer on the network offering smbfs or NFS or sshd, that could be used. (But just think of all the neat stuff you're learning!)

Just for my understanding: the problems occurred after the first steps of the upgrade. If I understand correctly the patches to the kernel have been installed, so the kernel is now 8.1. If I were to reinstall with an 8.0 disk or with an 8.1 disk, wouldn't this pose any problems with the files and settings already on the disks (as they are now partly 8.0 and partly 8.1)?

Well, it hopefully won't be necessary, but an 8.1 kernel would probably be mostly okay with 8.0 userland. It might complain, but would likely still boot into a usable state.

When I tried it, it went wrong on the try to mount:

Code:
mount -t msdosfs -o longnames /dev/ad10s1 fat
mount: exec ms_dosfs not found: no such file or directory
mount: in path:/sbin;/usr/sbin

The USB "memstick" image is apparently a lot more complete than the fixit image. Fixit should have mount_msdosfs in /rescue, though:
# /rescue/mount_msdosfs -o longnames /dev/ad10s1 fat

Edit: removed reference to sade and bsdlabel. The labels are there already, it's just fstab that specifies where they are mounted that's wrong.
 
The more I think about this, sade or bsdlabel should not be necessary. Using the fixit, mount /:
# mount /dev/ad14s1a /mnt

Edit /mnt/etc/fstab so it refers to ad14 instead of ad10, and reboot. /var should be okay now.
 
wblock said:
The more I think about this, sade or bsdlabel should not be necessary. Using the fixit, mount /:
# mount /dev/ad14s1a /mnt

Edit /mnt/etc/fstab so it refers to ad14 instead of ad10, and reboot. /var should be okay now.

I did this, and I am now typing this message from within 8.0, that is currently busy installing 'the new userland components'.

I will report back here when it is done doing that, since I am sure then again nothing will work anymore :e:e:e

Thanks again to the both of you for your help; much appreciated :f
 
Hmmm...:stud

FreeBSD 8.1-RELEASE Announcement

The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 8.1-RELEASE. This is the second release from the 8-STABLE branch which improves on the functionality of FreeBSD 8.0 and introduces some new features. Some of the highlights:
* zfsloader added
* zpool version of ZFS subsystem updated to version 14
* NFSv4 ACL support in UFS and ZFS; support added to cp(1), find(1), getfacl(1), mv(1), and setfacl(1) utilities
* UltraSPARC IV/IV+, SPARC64 V support
* SMP support in PowerPC G5
* BIND 9.6.2-P2
* sendmail updated to 8.14.4
* OpenSSH updated to 5.4p1
* GNOME 2.30.1, KDE 4.4.5

Code:
freebsd-update install
No updates are available to install

freebsd-update fetch
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 8.1-RELEASE from update2.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 8.1-RELEASE-p0

Code:
uname -a
FreeBSD local.host 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386


So how come then my KDE says it is still 4.3.1, instead of 4.4.5?
 
Caliante said:
Code:
freebsd-update install
No updates are available to install
Code:
uname -a
FreeBSD local.host 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

So how come then my KDE says it is still 4.3.1, instead of 4.4.5?

Because freebsd-update(8) updates FreeBSD--the system, and KDE is a port, not part of the system. Welcome to the world of portmaster(8) and portupgrade(1)! (Probably should start a new thread for that, though. We've about worn out this one.)

Oh, and congratulations on getting your system back! (A dump(8) backup now would be a good idea.)
 
wblock said:
Because freebsd-update(8) updates FreeBSD--the system, and KDE is a port, not part of the system. Welcome to the world of portmaster(8) and portupgrade(1)! (Probably should start a new thread for that, though. We've about worn out this one.)

Oh, and congratulations on getting your system back! (A dump(8) backup now would be a good idea.)

Ah, ok, my misunderstanding then (Noooooooooooobbbbbbbbbbbbbb �jrx( )

The confusion came because I thought that 'userland' meant all the other apps. I now understand this isn't the case.

Thanks for all your help(!)

EDIT: come to think of it: then how come the release notes say that KDE 4.4.5 is included? Or is this only if you do a fresh full install of 8.1? That would make sense as an explanation. Then again, it doesn't make sense (to me, but I have a strange brain) that it would not be included in the upgrade. Rambledamamble da blablabla :D
 
The CD includes certain packages to get up and running quickly. The -RELEASE announcement simply tells you with which precompiled packages that specific -RELEASE ships.
 
Back
Top