I'm investigating ways of doing fast builds on a system.<br>The machines that we're building are essentially identical, but the hardware<br>is just short of random.<br><br>(we rebuild  systems from donated machines for donation to non-profits, and thrift-store sales).<br clear="all">
<br>currently we use the oem install process, but I'm having problems with the current system, so I decided to<br>implement my idea for a fast build process.<br><br>I've got a build that was copied onto a 6GB partition, then I made a partimage backup of the system.<br>
<br>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.<br><br>The last thing I do is run a script to reset the UUIDs for fstab and grub.<br>
<br>Question is:  what are the disadvantages of using partimage to install the new system?  <br>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?<br>
<br>My script to reset the uuids on the new system is below.  Am I missing any critical locations for changing the UUID?<br><br><br>=================<br># presumes that mounted filestem for /dev/sdXX is at /tmp/sdXX<br><br>
rootfs=/dev/sda8<br>swapfs=/dev/sda6<br>rootdev=${rootfs/%[0-9]/}<br>rootdev=${rootfs/%[0-9]/} # 2 digit partition numbers?<br>grub-install --root-directory=/tmp/${rootfs#/dev/} $rootdev<br><br>tune2fs -U random  $rootfs <br>
<br>fs_uuid=05ea19df-a029-4fb3-9ef7-2c497e641a60<br>sw_uuid=675bf141-9964-4593-9a29-2c0d40c129d5<br>cd /tmp/${rootfs#/dev/}<br><br>new_fs_uuid=`vol_id --uuid $rootfs`<br>new_sw_uuid=`vol_id --uuid $swapfs`<br><br>sed -i  "s/$fs_uuid/$new_fs_uuid/g;s/$sw_uuid/$new_sw_uuid/g" /tmp/${rootfs#/dev/}/etc/fstab <br>
sed -i  "s/$fs_uuid/$new_fs_uuid/g;s/$sw_uuid/$new_sw_uuid/g" /tmp/${rootfs#/dev/}/boot/grub/menu.lst<br><br>#clear out ethN udev cache<br>sed -i '/^# PCI device /,$d'  /tmp/${rootfs#/dev/}/etc/udev/rules.d/70-persistent-net.rules<br>
=========================<br><br><br>-- <br>Stephen Samuel <a href="http://www.bcgreen.com">http://www.bcgreen.com</a><br>778-861-7641<br>