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

Re: Advanced hard disk mirroring!



I don't suppose your workstations have NICs with PXE support do they? If so you could
use bpbatch (www.bpbatch.com) to boot them over the network. bpbatch supports a small
scripting language which will allow you to partition the disks and load whole linux
images into the disks (just what you want to do). I've used this and it works very
well.

If you don't have NICs with PXE support (unfortunately more likely the case) then it's
worth the time to put together a boot disk which will load up networking services and
then do ghost from a samba/NT/95 share. I've also used this method on a number of
occasions. How do people put together a DOS disc with complete networking (including
DHCP!)? They do it with a WindowsNT server utility called the Network Client
Administrator. When you run it there's an option 'Make Network Installation Startup
Disk'. I haven't actually used the tool myself to create a disk because a sysadmin
here gave me one. I just update the disk with the NDIS driver appropriate to the
target computer. Anyhow you boot from this disk and map the drive with the image and
then you pop in your Ghost disk

The next possibility is to boot linux off a diskette, set up the network, mount a
filesystem over NFS, then dd the image onto the drive. I've also used this method
using the debian rescue disk. This is a little more involved because the installation
doesn't let you at the kernel modules (which you generally need to get the network
going) until you've partitioned the disk and copied the modules onto the partitioned
disk. I get by this by right away scrolling down to the option to run a shell and then
in the shell get a second ram disk set up, mounted on /lib/modules, and then untar.gz
the modules into this ram disk. Sound complicated? Well, only slightly. There's
probably someone who's created a custom boot disk which takes care of all this
nonsense but this is what I do. When you first boot from the rescue disk, at the boot:
prompt type in 'linux ramdisk_size=8192'. This doubles the usual ramdisk size of 4MB
to give us some extra breathing room. Once you get to the 'Debian GNU/Linux
Installation Main Menu' just scroll down to 'Execute a Shell' and hit enter. At the
shell prompt type:

mke2fs /dev/ram1

This will create an 8MB ext2 filesystem on the second ram disk (the first one was
loaded when the rescue disk booted). Now we create a directory for the modules and
mount the ramdisk:

mkdir /lib/modules
mount /dev/ram1 /lib/modules

Now we need to unpack the modules into our directory. Note that I'm using slink disks
here. Things (filenames, etc.) might change for potato when it's released. Ok, so you
pop in the drivers disk now and type:

mount /dev/fd0 /floppy
cd /
zcat < /floppy/modules.tgz | star

Ok, now the modules are loaded into the ram disk. The next step is to load up whatever
modules you need for your particular network card. Let's say we've got a card
supported by the 3c59x driver. We then run:

insmod 3c59x

We'll also need NFS support so we'll have to load up that module. Once that's loaded
we can configure the ethernet interface and mount the nfs volume with our disk image.

insmod nfs
ifconfig eth0 192.168.0.123
route add -net 192.168.0.0 eth0
mount -t nfs -o ro 192.168.0.1:/whatever /mnt

And then use whatever image you've got of the disk to load it onto the drive, e.g.

dd </mnt/theimage.bin >/dev/hda1

There are lots of the regular utilities on the rescue disk image but beware lots of
the only read/write from stdin/stdout and there are other curiosities (e.g. star will
only _un_tar). If you need the full set of utilities you can always mount the entire
filesystem of another linux box over NFS and then just get a good bash shell going
like:

LD_LIBRARY_PATH=/mnt/lib:/mnt/usr/lib
PATH=/mnt/bin:/mnt/usr/bin:/mnt/sbin:/mnt/usr/sbin /mnt/bin/bash

Anyhow that should get you started. If you have any more questions just drop me a
line.

Onno Ebbinge wrote:

> I'm a sysadmin and have two Debian GNU/Linux potato servers and 50
> windows 95 workstations under my care.
>
> My problem is with the 50 workstations:
>
> (the 50 workstations have the same hardware)
>
> I want to install ONE workstation and then mirror the hard disk to
> all other workstations.
>
> The first time I did it was with ghost and I hooked up the installed
> hard disk to every client and mirrored it... Not a nice job to do
> and there must be a better way do do it! I know that ghost CAN use
> NETBIOS connections and such but I don't know how to boot it from a
> 1.44" flop and then use ghost.
>
> My question:
>
> I want to boot the workstation to be installed from a floppy with
> Linux or DOS. Then I want to make a connection to my server (or the
> installed workstation) and mirror the hard disk from a file (or
> hard disk).
>
> Frankly I don't care what is used or how it's being done (Linux/DOS
> with dd/ghost or something else!) but I don't want to hook-up all 50
> workstations again...
>
> Thanks for any ideas,
>
> Onno

--
Jens B. Jorgensen
jens.jorgensen@tallan.com



Reply to: