Can't start FreeBSD with old disk after upgrading hardware

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:
Code:
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?
 
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
 
# cat /etc/fstab
Code:
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.
 
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
 
It doesn't work: :(

Code:
mountroot> ufs:/dev/ad0s1a
Mounting root from ufs:/dev/ad0s1a
Root mount failed: 22
...
 
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.
 
wblock, it name is ad4s1a - 100%.

phoenix, it shows following:
Code:
Possibly valid devices for 'ufs' root: ... 'ad', ...
List has many names including the one it has 'ad'.
 
Try your command in post #5 again with
ad4s1a instead of ad0s1a? Then if that
works, the
/etc/fstab editing might fix a boot.
 
Back
Top