Trouble migrating to ssd

Hi! I'm trying to migrate my FreeBSD 8.1 system from one disk to another (from /dev/ad0 to /dev/da0). I'm trying to migrate into the ssd while it is in a portable usb harddrive chassis, but it will eventually replace the old drive using its sata port. I seem to have installed a different bootloader on /dev/da0 which presents me with only three options.

Code:
F4: freebsd
F5: drive 1

F6: PXE

When I choose F4, nothing happens except that I get the same prompt again, with the same options. When I choose F5 or F6 the old system is loaded from the hdd (/dev/ad0).

I remember partitioning the 60GB ssd into two partitions 2GB + 58GB. I can find these at /dev/da0e and /dev/da0f. I have used dump to copy my entire / to /dev/da0f (which I had mounted at /mnt/ssd_main). I suspect that I might have overwritten something that was needed in order to boot from /dev/da0.

I'm completely stuck, any help is appreciated!
 
Just in case this is relevant:

Code:
[I]bsdlabel /dev/da0[/I]

prints

Code:
# /dev/da0
#      size     offset    fstype    [fsize bsize bps/cpg]
c: 117231408       0     unused         0      0       # "raw" part, don't edit
e:   3906250       0     unused         0      0
f: 113325158 3906250     unused         0      0
 
I got it working. I started over and followed instructions from the manual. I created a single partition covering the whole drive, /dev/da0s1. Then I created two slices /dev/da0s1a and /dev/da0sb. I think it's important that the b slice is the swap slice. The mountpoint for /dev/da0s1a was /

Sysinstall/fdisk seemed a little bit buggy, but after a few attempts I could confirm that /dev/da0s1 existed and had a label containing the two slices /dev/da0s1a and /dev/da0s1b, which were also visible in /dev.

Then I had to keep /etc/fstab in sync with which drive I wanted too boot from. At one point I think I managed to boot from one drive but loading the other, because of a faulty /etc/fstab. When I moved the drive from the usb chassis to the sata-port I had to change the setting in fstab back to /dev/ad0s1a since the drive got a new name.

To get rid of the annoying bootloader I did

Code:
# sysctl kern.geom.debugflags=0x16
# fdisk -B ad0

as described here.
 
After installing a system, stop using sysinstall. It is not made for non-installation jobs and makes assumptions that aren't made by the standalone tools.

With labels, /etc/fstab doesn't have to be changed when the drive number changes, or even when the drive name changes.

What MS-DOS calls a partition is what FreeBSD calls a slice. The "s1" in ad0s1 means slice 1. FreeBSD can also subdivide slices into smaller pieces, which FreeBSD calls partitions. That would be the "a", "b", and so on.
 
Back
Top