fast builds for ext3 filesystems.

Stephen Samuel darkonc at
Fri Feb 20 08:29:37 UTC 2009

I'm investigating ways of doing fast builds on a system.
The machines that we're building are essentially identical, but the hardware
is just short of random.

(we rebuild  systems from donated machines for donation to non-profits, and
thrift-store sales).

currently we use the oem install process, but I'm having problems with the
current system, so I decided to
implement my idea for a fast build process.

I've got a build that was copied onto a 6GB partition, then I made a
partimage backup of the system.

On new systems, I restore the 6GB partition onto the (almost always larger)
partition on the new disk (might be between 15GB and 80GB) then use
resize2fs to fit the filesystem into the new partition.

The last thing I do is run a script to reset the UUIDs for fstab and grub.

Question is:  what are the disadvantages of using partimage to install the
new system?
I'm thinking that the only real disadvantage would be performance problems
associated with the placemt of OS data on the expanded filesystem. How bad
would that be, and are there other issues to look at?

My script to reset the uuids on the new system is below.  Am I missing any
critical locations for changing the UUID?

# presumes that mounted filestem for /dev/sdXX is at /tmp/sdXX

rootdev=${rootfs/%[0-9]/} # 2 digit partition numbers?
grub-install --root-directory=/tmp/${rootfs#/dev/} $rootdev

tune2fs -U random  $rootfs

cd /tmp/${rootfs#/dev/}

new_fs_uuid=`vol_id --uuid $rootfs`
new_sw_uuid=`vol_id --uuid $swapfs`

sed -i  "s/$fs_uuid/$new_fs_uuid/g;s/$sw_uuid/$new_sw_uuid/g"
sed -i  "s/$fs_uuid/$new_fs_uuid/g;s/$sw_uuid/$new_sw_uuid/g"

#clear out ethN udev cache
sed -i '/^# PCI device /,$d'

Stephen Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Ext3-users mailing list