# Can't start FreeBSD with old disk after upgrading hardware



## August (Aug 19, 2010)

I had to change hardware to a new one (the old one was 9.5 years old). After I put a hard drive with FreeBSD 4.11 to a new machine it stopped work. This is a message:

```
Mounting root from ufs:/dev/ad4s1a
Root mount failed: 6
...
> mountroot
```
New computer detect hard drive with FreeBSD 4.11 as ad0. How can I change settings in order my FreeBSD loads properly?


----------



## wblock@ (Aug 19, 2010)

It'll be in single user.
`# cat /etc/fstab`

Remount / as read/write:
`# mount -u /`

Then mount the /var, and /usr partitions as shown, substituting the new hard drive (ad0) for the old (ad4).

Edit /etc/fstab and change the drive.  ^D or exit and that should be it.

For future use, consider labeling the filesystems so the drive number doesn't matter.  Ignore the AHCI stuff here, but look at the labeling: http://www.wonkity.com/~wblock/docs/html/ahci.html


----------



## August (Aug 19, 2010)

> `# cat /etc/fstab`




```
Mounting root from cat /etc/fstab
Can't allocate root mount for filesystem 'cat': 19
Root mount failed: 19
Manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
eg. ufs:/dev/da0s1a
...
```
With 





> `# mount -u /`


The same error.


----------



## wblock@ (Aug 19, 2010)

Sorry, I thought you were already past the boot.  It's asking what disk to boot, so you need to enter the new disk number and slice: ufs:/dev/ad0s1a


----------



## August (Aug 19, 2010)

It doesn't work: 


```
mountroot> ufs:/dev/ad0s1a
Mounting root from ufs:/dev/ad0s1a
Root mount failed: 22
...
```


----------



## wblock@ (Aug 19, 2010)

Maybe the disk isn't ad0, or the slice isn't s1.  At the prompt, try ScrollLock and scroll back up with PageUp to make sure.

That old, it could have been a "dangerously dedicated" disk, which would be (I think) just ufs:/dev/ad0a

Once you find it, you'll have to edit /etc/fstab to match, as above.


----------



## phoenix (Aug 19, 2010)

What's the output of *?* at the mountroot prompt?


----------



## August (Aug 20, 2010)

*wblock*, it name is ad4s1a - 100%.

*phoenix*, it shows following: 
	
	



```
Possibly valid devices for 'ufs' root: ... 'ad', ...
```
List has many names including the one it has 'ad'.


----------



## jb_fvwm2 (Aug 20, 2010)

Try your command in post #5 again with
ad4s1a instead of ad0s1a? Then if that 
works, the
/etc/fstab editing might fix a boot.


----------

