# 8.0 -> 8.1 "panic: root mount failed"



## Caliante (Aug 28, 2010)

*EDIT*: _short summary now that the problem is solved so people don't need to read through all this to get a grasp of problem and solution:

Somewhere during the upgrade the script decided that /dev/ad10* now was /dev/ad14*. Hence, after the first part of the upgrade process the machine refused to boot.

Mounting /dev/ad14s1a (previously: /dev/ad10s1a) with the livefs-disk (and from within that the 'Fixit'-program) and editing /mnt/etc/fstab to replace 'ad10' with 'ad14' solved the problem._


Hi all :e

As per:

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



> FreeBSD Update
> 
> The freebsd-update(8) utility supports binary upgrades of i386 and amd64 systems running earlier FreeBSD releases. Systems running 7.[0123]-RELEASE, 8.0-RELEASE, 8.1-BETA1, or 8.1-RC[12] can upgrade as follows:
> 
> ...



I did the first two:


```
# freebsd-update upgrade -r 8.1-RELEASE
# freebsd-update install
```

Yesterday evening. It fetched some 35000 patches (cool ) and after that told me to shut down. I did - both the PC and myself as I went to bed.

This morning I wanted to do the next, for the user land:


```
# freebsd-update install
```

So I started up the computer, could briefly see 'FreeBSD 8.1 RELEASE' flashing by, then a lot of normal messages, and then it hangs, as far as I can tell the last I see is something about my all in one card reader. I press ENTER and I get this message:


```
panic: root mount failed, startup aborted.
cpuid = 0
uptime: 1m11s
Cannot dump. Device not defined or unavailable.
Automatic reboot in 15 seconds.
```

It's clear it's looking for something it can not find e) but being the noob I am I have no clue what.

All I found on the net was:

http://www.mail-archive.com/freebsd-xen@freebsd.org/msg00025.html

Where it is said:



> You might try to specify this path of root partition
> 
> ```
> ufs:xbd1s1a
> ...



But I would need a little bit more help with that:
1. Is this the solution?
2. Where do I need to specify that?
3. How do I find out what slice/partition is what? I can't boot the system.

I would appreciate any suggestions and of course will be in your debt for it :r

Thank you in advance,


----------



## Caliante (Aug 29, 2010)

It's getting weirder :x

This morning I booted it again. *One time only* did it not halt at the previous error. It halted at:


```
vfs.root.mountfrom=ufs:/dev/ad10s1a
vfs.root.mountfrom.options=rw

Manual root filesystem specification:
<fstype>:<device>
eg ufs:/dev/da0s1a
? List valid boot devices
```

Typing in ? returned me to the previously quoted text.

I tried typing in ufs:/dev/ad10s1a and got:


```
mountroot > ufs:/dev/ad10s1a
trying to mount root
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 /etc/fstab
```

I tried this by booting and 'escaping at the loader prompt', followed by 'boot', but then I simply ran into the same problem of the original error ('panic: root mount failed, startup aborted...automatic reboot').

I also tried booting into single user mode and into safe mode, but these both also led to the same problem.

Finally, I took my install-DVD, booted into sysinstall and had a look at the disk and the partitions. Here is something not right I think. When I look into the disk label editor I see this (apologize for the text formatting, I had to write it on a piece of paper first and now have to type it in manually in this message - sorry, the tabs don't hold in the below):


Disk ad 10, partition name ad10s1


```
PART      -  MOUNT     -     SIZE     -   NEWFS
ad10s1a   -  none      -     512MB    -     *
ad10s1b   -  SWAP      -     4096MB   -   SWAP
ad10s1d   -  none      -     4334MB   -     *
ad10s1e   -  none      -     512MB    -     *
ad10s1f   -  none      -     456GB    -     *
```

If I recall correctly, the first time I installed 8.0 and went into this menu I choose (A)auto, and at least there were mount points mentioned. So it seems due to the upgrade to 8.1 all the labels are gone? Is this reason it can't boot? (? boot says /dev/ad10s1a, so it should know enough, no?)

So if this is correct, how do I go on about restoring the disk labels? I can guess ad10s1a is /, but there are three more that currently have 'none' written, and I have no clue what names they should have. Is there any way to find out what there names used to be (taking into account I can not boot into the file system currently = *I* can not do it since I am stuck with the boot problems; perhaps one of you would know of a way to get the information?)

I *really *would appreciate some help, because I have no clue what to do next.

Thank you (*thank you thank you* :e) in advance,

Bye


----------



## jb_fvwm2 (Aug 29, 2010)

```
boot:/dev/ad10s1a
```
(or) with ufs after boot: also
Rereading your post you may or may not have tried it already.
In rare instances you may also need additional .ko's (see
release notes or the UPDATING in /src/ (on the web) for
changes since you first installed if the CLI does not work?


----------



## Caliante (Aug 29, 2010)

jb_fvwm2 said:
			
		

> ```
> boot:/dev/ad10s1a
> ```
> (or) with ufs after boot: also
> ...



Thanks for your reply. I am not sure that I understand it P)

Do you mean I need to do 


```
boot:/dev/ad10s1a
```

Instead of 


```
ufs:/dev/ad10s1a
```


----------



## Caliante (Aug 29, 2010)

I looked up how FBSD does a disk partitioning in the default install.

/
swap
/tmp
/var
/usr

Since I used a default install when installing 8.0 (probably 6 months ago if not longer), my disk layout should probably be the same. So, going from there could I just go into the disk label editor and enter that sequence there (making sure newfs is toggled to 'no' to make sure the disks don't get formatted - this I learned on the fly just a minute ago)?


PART - MOUNT - SIZE - NEWFS
ad10s1a - / - 512MB - *
ad10s1b - swap - 4096MB - SWAP
ad10s1d - /tmp - 4334MB - *
ad10s1e - /var - 512MB - *
ad10s1f - /usr - 456GB - *

Or will I horrible ruin my partitions then beyond the point of repair?

If not, is it sufficient to do just this or do I need to do something else, elsewhere in the system?

Again, thank me for replying to me e:e:e)


----------



## kpa (Aug 29, 2010)

You seem to have only a 512MB root filesystem, is it possible that the filesystem is now full after the 8.1 upgrade? At least on one of my test installs the default 512MB root filesystem was not enough to hold two different kernels.


----------



## jb_fvwm2 (Aug 29, 2010)

I am not sure of the syntax. I've used it once
but forgotten. Search maybe? But that may not
be the fix per the post above.


----------



## wblock@ (Aug 29, 2010)

Caliante said:
			
		

> I looked up how FBSD does a disk partitioning in the default install.
> 
> ```
> /
> ...



You have /tmp and /var reversed there, I think.

Any time you mess with slices or partitions, you run the risk of damaging existing data.

The odd thing here is that you do manage to boot the kernel, which is on the / filesystem.

What does it do if you boot in single-user mode?


----------



## Caliante (Aug 29, 2010)

kpa said:
			
		

> You seem to have only a 512MB root filesystem, is it possible that the filesystem is now full after the 8.1 upgrade? At least on one of my test installs the default 512MB root filesystem was not enough to hold two different kernels.



For me anything is possible e)

But how do I find out:q

Until I have solved the boot problem, I can't not access the hard disk to see what's going on.


----------



## Caliante (Aug 29, 2010)

jb_fvwm2 said:
			
		

> I am not sure of the syntax. I've used it once
> but forgotten. Search maybe? But that may not
> be the fix per the post above.



Then I take it you simply meant: 


```
ufs:/dev/ad10s1a
```

Which is what I tried and which didn't work.


----------



## Caliante (Aug 29, 2010)

wblock said:
			
		

> You have /tmp and /var reversed there, I think.



I believe anything you say e) But how do I find out?



			
				wblock said:
			
		

> Any time you mess with slices or partitions, you run the risk of damaging existing data.



That's what I'm scared about, indeed. Of course, I didn't make a backup before starting the upgrade 

What will happen when I just add /var /tmp etc to the disk label editor? Suppose it is wrong, will it destroy those partitions or will it simply not boot? Because if the latter then I can safely do some trial and error. If not the latter, then I should be needing another solution to find out which partition is what.



			
				wblock said:
			
		

> The odd thing here is that you do manage to boot the kernel, which is on the / filesystem.



This what I find surprising as well.



			
				wblock said:
			
		

> What does it do if you boot in single-user mode?



It doesn't make a difference; both in single user mode and in safe mode the same error occurs as when booting normally.


----------



## Beastie (Aug 29, 2010)

Caliante said:
			
		

> wblock said:
> 
> 
> 
> ...


You can simply use a livefs disc (from the FTP, same location as disc1), mount the partitions and check their contents. It is quite straightforward. /tmp will usually hold a few directories filled with pipe and socket files. /var will have a longer hierarchy with typical directories such as *cron*, *db*, *log*, *mail*, *spool*, etc.



			
				Caliante said:
			
		

> What will happen when I just add /var /tmp etc to the disk label editor?


Probably a big mess. The installation *may* continue but you will end up with a /tmp partition containing the /var directories and files and vice versa.
If that is the case, I would personally use a livefs disc to back up critical files somewhere safe and redo the installation from scratch, i.e. checking the newfs option at least for these 2 partitions.
Next time, execute the [cmd=""]mount[/cmd] command on a working system and write down the output if you cannot memorize it.


----------



## wblock@ (Aug 29, 2010)

Caliante said:
			
		

> I believe anything you say e) But how do I find out?



You can use file -s to see where it was last mounted.  For example:
`# file -s /dev/ada0s1e`

```
/dev/ada0s1e: Unix Fast File system [v2] (little-endian) last mounted on /tmp, volume name tmpfs [...]
```

But to use it, you need a running FreeBSD system.  There are FreeBSD fixit CD and memory stick images available for download from the normal sites.  If you have an extra hard disk, installing a temporary FreeBSD on it would then let you work on the old disk more easily.  I would physically disconnect the old disk while installing the new one, then reconnect it afterward.



> What will happen when I just add /var /tmp etc to the disk label editor?



It may be fine, although it may not fix the problem.  Worst case, well, imagine the worst that could happen.  Also, when you commit changes, the label editor likes to rewrite /etc/fstab.  I would feel safer using bsdlabel from a fixit.

If the problem is being caused by an outdated kernel module loaded by the loader, you might be able to get around that.  Escape to the loader prompt at the boot menu, then
`# unload`
`# load /boot/kernel/kernel`

If that boots into single user, all you have to do is edit /boot/loader.conf to stop loading the bad module.

And this all might be caused by a coincidentally-timed hardware problem.  Disk or power supply or RAM going bad, and chose the most confusing moment to do it.


----------



## Caliante (Aug 29, 2010)

Thank you Beastie and Wblock; I will print your remarks, digest them, try them, and then report back in a couple of days after I have completely reinstalled my system knowing that I am probably going to mess up completely :eï¿½e

No seriously, thanks, I am downloading the live disc now and will try to fix it using your instructions. Thanks again :f


----------



## Caliante (Aug 29, 2010)

x(x(x(x(x(


----------



## Caliante (Aug 29, 2010)

Beastie said:
			
		

> You can simply use a livefs disc (from the FTP, same location as disc1), mount the partitions and check their contents.



This is starting to get annoying x(

8.0 worked like a charm, the upgrade messed it up and look at all the time we are wasting (sorry :r)

I downloaded the livefs-iso, booted with it and did this:


```
mkdir /mnt3
mount /dev/ads10s1a //mnt3
```

It returns:


```
mount:/dev/ad10s1a: no such file or directory
```

when I went into disk label editor from within the fixit-disk it didn't show any partition whatsoever. I rebooted with the 8.0 install DVD, and in the sysinstall there it did find the partitions as I described them above.

FreeBSD turns out to be needing as many reboots and different disks as Windows, I might as well install Windows 7 on this machine x(

(Sorry, I am getting depressed. It's not like I was experimenting with some exotic tricks, I just did a simple upgrade according to the manual, on a non-tweaked FreeBSD 8.0, and on a very recently (with only quality components) built, machine that has been doing 8.0 as well as XP flawlessy for a long time).


----------



## Caliante (Aug 29, 2010)

wblock said:
			
		

> You can use file -s to see where it was last mounted.  For example:
> `# file -s /dev/ada0s1e`
> 
> ```
> ...



I did as you suggested; I booted the livefs-disk and:


```
Fixit# file -s /dev/ad10s1a
```

Which returned:


```
file: could not find any magic files
```

Mounting the disk first also didn't solve anything since I can't mount it, as I posted in the previous post.

I will try the unloading of the kernel next.

Thanks again to all of you for trying to help me out. Now first I am going to take some anti-depression pills.


----------



## wblock@ (Aug 29, 2010)

It looks like the disk device numbering changed.  So look for the current device number in /dev:
`# ls /dev/ad*`

If you had a custom kernel under 8.0, that may be the problem.


----------



## wblock@ (Aug 29, 2010)

Something else comes to mind: it's like this system can't see the hard drive controller after loading the kernel.  Maybe due to a change in 8.1?  Wouldn't think that would affect any IDE controller, but you may have something different.


----------



## Caliante (Aug 30, 2010)

wblock said:
			
		

> It looks like the disk device numbering changed.  So look for the current device number in /dev:
> `# ls /dev/ad*`
> 
> If you had a custom kernel under 8.0, that may be the problem.



You might very well be right 

When I did the '?' after the erroneous booting, I now got this:


```
List of GEOM-managed disk devices:
da3 da2 da 1 da 0
ufsid/659bnn9vn39vn959nv
ntfs/tmp ntfs/work ntfs/data
NEW VOLUME ad14s1f ad14s1e ad14s1d ad14s1b ad14s1a ad10s9 ad10s8 ad10s7 ad10s6 ad10s5 ad14s1 ad14s2 ad10s1 ad14 acd0 ad10
```


When I booted with Fixit and did the ls, I got:


```
Fixit# ls /dev/ad*
/dev/ad10
/dev/ad10s1
/dev/ad10s2
/dev/ad10s5
/dev/ad10s6
/dev/ad10s7
/dev/ad10s8
/dev/ad10s9

/dev/ad14
/dev/ad14s1
/dev/ad14s1a
/dev/ad14s1b
/dev/ad14s1d
/dev/ad14s1e
/dev/ad14s1f
```

The fact that ad14 has a-f behind it makes me think this is now the FreeBSD disk and ad10 is now the Windows disk (PC = dual boot).

If this is the case I still need to find out which slice/partition on disk ad14 goes where, and mounting the partitions didn't work.

Thanks again for your help; much appreciated


----------



## Caliante (Aug 30, 2010)

wblock said:
			
		

> Something else comes to mind: it's like this system can't see the hard drive controller after loading the kernel.  Maybe due to a change in 8.1?  Wouldn't think that would affect any IDE controller, but you may have something different.



Should we look into this (how?) or do we proceed with the other thing (changed disks) first? I have a normal Asus mainboard, btw. Nothing 'exotic'.


----------



## Beastie (Aug 30, 2010)

Caliante said:
			
		

> mounting the partitions didn't work.


You can try to find out the last mountpoint using wblock's suggestion (*file -s*).

Also, how are you mounting it? e.g. `# mount /dev/ad14s1f /mnt`?
What error(s) is it returning?


----------



## Caliante (Aug 30, 2010)

Beastie said:
			
		

> You can try to find out the last mountpoint using wblock's suggestion (*file -s*).
> 
> Also, how are you mounting it? e.g. `# mount /dev/ad14s1f /mnt`?
> What error(s) is it returning?



Thanks Beastie. In post #16 and #17 in this thread I posted that file -s didn't work, nor did the mounting. Both using a livefs-disk of 8.1 FreeBSD from the FTP-site.


----------



## Beastie (Aug 30, 2010)

Caliante said:
			
		

> In post #16 and #17 in this thread I posted that file -s didn't work, nor did the mounting.


Yes I know, but that was when you were trying with *ad10*. Does mounting *ad14* return the same errors, i.e. "no such file or directory"? That would be really abnormal since *ls* shows the slice and partitions do exist.


----------



## Caliante (Aug 30, 2010)

Beastie said:
			
		

> Yes I know, but that was when you were trying with *ad10*. Does mounting *ad14* return the same errors, i.e. "no such file or directory"? That would be really abnormal since *ls* shows the slice and partitions do exist.



Stupid me, you are right, I apologize. I will check what happens now. Thanks again


----------



## Caliante (Aug 30, 2010)

Ok, this is going to be a lot of typing 

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.


```
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 ad14s1*b* and ad14s1*d* I got:


```
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*


```
.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*


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

*/dev/ad14s1f*


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


```
.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:*

```
/dev 100%
/dist 100%
```
The three partititions that I mounted.


----------



## wblock@ (Aug 30, 2010)

Caliante said:
			
		

> Ok, this is going to be a lot of typing
> 
> 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.
> 
> ...



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



> ```
> 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?)


----------



## Caliante (Aug 30, 2010)

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:


```
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


----------



## wblock@ (Aug 30, 2010)

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.


----------



## Beastie (Aug 30, 2010)

Caliante said:
			
		

> wblock said:
> 
> 
> 
> ...


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`


----------



## Caliante (Aug 31, 2010)

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? 

Thanks again for your support :f


----------



## Caliante (Aug 31, 2010)

Thanks again, Beastie. And now, Beastie, now it gets interesting P



			
				Beastie said:
			
		

> Try `# fsck -y -t ufs /dev/ad14s1d`



Actually, this did gave some results:


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



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:


```
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


----------



## wblock@ (Aug 31, 2010)

Caliante said:
			
		

> but with these two I can mount it and can look into it to see directories like:
> audit/
> backup/
> crash/
> ...



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:
> 
> 
> ```
> ...



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.


----------



## Beastie (Aug 31, 2010)

There must be a /dist/sbin/mount_msdosfs on livefs discs. Of course you should leave the *-t msdosfs* option out.


----------



## wblock@ (Aug 31, 2010)

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.


----------



## Caliante (Sep 1, 2010)

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


----------



## Caliante (Sep 1, 2010)

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




```
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
```


```
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?


----------



## wblock@ (Sep 1, 2010)

Caliante said:
			
		

> ```
> freebsd-update install
> No updates are available to install
> ```
> ...



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


----------



## Caliante (Sep 1, 2010)

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


----------



## DutchDaemon (Sep 1, 2010)

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.


----------

