script hacking
Nicolas Triantafillou
nick at uow.edu.au
Thu Jan 13 12:28:48 CET 2005
Hi all,
I've recently stumbled upon a problem due to a combination of our
imaging software, hardware, and FAI.
I've solved this problem with some hacking of
/usr/lib/fai/sbin/setup_harddisks
the diff is as follows, and I know it's a very ugly way of doing it..
but it works:
726,728d725
< $command = "";
< `mkfs.ext2 /dev/hda3`;
< `mkfs.ext2 /dev/hda6`;
Basically, what this does is follow this line and make it not run:
$command = "LC_ALL=C sfdisk /dev/$disk < $filename";
What I need FAI to do, is to not partition my hard disks at all, but
still install to the partitions I want. I can't use sfdisk, because the
drive geometry according to the partition table is different to the
actual hardware and it isn't changeable (this is the main problem and
caused the hacking). Even preserving every partition calls sfdisk and
still fails due to that geometry check. (heads on my hard disk don't
wanna change from 16 to 255 no matter what I do).
Now, this hack works for one set of hardware, but nothing else, so I
need a way to make this work only when one class is defined.
I'd like to know if I can do this more elegantly, be it completely
different with a hook, a futher hack to make it only work if a certain
class is defined, or some other way
If you've read this far.. thanks! ;-)
Nick.
More information about the linux-fai
mailing list