Cloning FreeBSD 8.1 with Clonezilla

Hello, all.

I recently installed FreeBSD 8.1 release and intend on cloning this install to many more identical systems. I used sysinstall's recommended drive slice scheme and arrived at:

Code:
/dev/ad0s1a /    ufs
/dev/ad0s1b none swap
/dev/ad0s1d /var ufs
/dev/ad0s1e /tmp ufs
/dev/ad0s1f /usr ufs


I then zeroed the free space with:

Code:
$ dd if=/dev/zero/ of=filler bs=1m; rm filler

I then used Clonezilla to create an image.

When I restored the image to a 2nd machine I received a root mount error. Problem is, the 2nd machine's HDD is ad10s1a and the original Gold machine is ad0s1a.

I resolved the problem (I guess) by booting the FreeBSD and running "fixit" from sysinstall. From there I was able to edit /etc/fstab and rename all instances of ad0s1a to ad10s1a.

Does anyone know why FreeBSD would name the HDD on the second machine like this? I would really like to prevent this to simplify cloning additional machines.

Thank you,
Lawrence F.
 
IDE Primary Master channel is ad0
IDE Primary Slave channel is ad1
IDE Secondary Master channel is ad2
IDE Secondary Slave channel is ad3
First SATA port is ad4
Next SATA port is ad6
Next SATA port is ad8, and so on.

Thus, depending on how and where you connect the drive, the number will change.

This is why lots of us recommend glabel(8) to label the drive before you partition it. That way, the device name (/dev/label/<name>) never changes, no matter where you connect it.
 
swanthog said:
Hello, all.

I recently installed FreeBSD 8.1 release and intend on cloning this install to many more identical systems.
...
When I restored the image to a 2nd machine I received a root mount error. Problem is, the 2nd machine's HDD is ad10s1a and the original Gold machine is ad0s1a.

Drive numbering is dynamic. Unless you change the kernel, but that's a mistake. Label the filesystems and the drive number doesn't matter. This article shows that; ignore the AHCI part unless your systems can use AHCI.
 
Back
Top