[K12OSN] Cloning drives, no network or compression
ssh at tranquility.net
Sat Nov 29 05:13:52 UTC 2008
The recent Acer cloning discussion is reminding me of a problem I am
having cloning disks. I am making this a new thread because I do not
want to restore over a network or use compression. This is one of the
biggest and most helpful bunch of Linux geeks there is, thought I would
throw it out here.
Here's the situation. I have a lot of old PCs I want to convert to a
custom Debian/Ubuntu distro. Most of them are using an old Suse install.
The guy who set these up is long gone, and even though these boxes have
worked for years, he otherwise screwed up many things, and the powers
that be are Linux-leery, and want to move to Winderrs.
I do not have Windows machines available for this imaging project, so
that lets out several choices.
The machines are so old, that I think transferring a compressed image
will take more time to clone on uncompressing. The network they are on
is a mish-mash of token ring and ethernet, and it's mostly wired with
old IBM Type 2 wiring. The ethernet ones are using a balun to use the
old wiring. The network is pretty slow, and I don't want to set up
(another) DHCP server for cloning purposes. Many of the machines don't
have name resolution available.
The average hardware is 400-1.700mhz celerons/PIIs typically with 256
meg of ram, all have USB, none have CD drives. They are using a mixture
of network printers, parallel and serial barcode printers.
My custom image (remastersys is great for creating a fresh ISO from an
existing install) is a total of 2.6 gig, one / partition and one swap.
It has the several basic users created, generic printer configurations
set up. It was created on a larger drive with small partitions, then
using dd to only image the first two partitions by block count.
My problem is that most of the machines are too old for either PXE boot
or USB boot. I have experimented with piping dd through netcat
(Knoppix), but it's pretty slow as well. So far what I have been doing
is using Damn Small Linux (it seems to detect the needed hardware fine).
It has a boot floppy that works in the machines well, and then allows
the machine to boot to USB, currently to a USB DVD drive, hopefully
eventually to a syslinux-prepared USB pen drive.
I use http://www.littlesvr.ca/isomaster/ to plop my disk image into the
DSL iso. It lives on a DVD disc. Once I get my floppy-->USB DVD DSL
booted, I just run dd if=/cdrom/masterimage.dd of=/dev/hda bs=64k and
off it goes. Machines modern enough to have USB 2.0 will clone in 20
minutes, older 1.x USB machines take an hour and 20 minutes. I boot into
root, set the default user, hostname and printer, and am done. There are
no recent NV/ATI chipsets to worry about.
While multicast solutions could be much faster on a more modern network,
I am reluctant to try to work with the Windows oriented network admin to
change things. Imaging the machines one at a time is adequate.
OK, here's my problem (finally). Sometimes the cloned machine comes up
with a GRUB error in stage 1.5 Sometimes I re-run the imaging process
and it works, sometimes it doesn't. The destination discs are usually
old, but all were in place and working before my imaging process. They
are always larger than my small image. I think my dd method of imaging
should overwrite boot sector and MBR. I haven't yet found anything in
common with the few machines this has failed on.
Is there some quirk about GRUB with drive geometry? It seems like I read
somewhere about large disks in grub should be set in BIOS for large, or
LBA, or something. These are small disks, nothing over 40 gig.
More information about the K12OSN