fast builds for ext3 filesystems.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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

tune2fs -U random  $rootfs

fs_uuid=05ea19df-a029-4fb3-9ef7-2c497e641a60
sw_uuid=675bf141-9964-4593-9a29-2c0d40c129d5
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" /tmp/${rootfs#/dev/}/etc/fstab
sed -i  "s/$fs_uuid/$new_fs_uuid/g;s/$sw_uuid/$new_sw_uuid/g" /tmp/${rootfs#/dev/}/boot/grub/menu.lst

#clear out ethN udev cache
sed -i '/^# PCI device /,$d'  /tmp/${rootfs#/dev/}/etc/udev/rules.d/70-persistent-net.rules
=========================


--
Stephen Samuel http://www.bcgreen.com
778-861-7641
_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux