Hi

Today I tried the "tohd" command for the first time. One thing I was thinking about was to make a scipt which run lilo and install a boot manager on the hd.

The script could possibly be run from inside /etc/init.d/knoppix-autoinstall.

One problem is to detect if there is already is a boot manager installed. I guess this this could be done by looking for a lilo.conf or grub.conf on all the partitions but it might be better just to ask the user: "Are you sure would install a boot-loader".

The other problem is to find where the Windows installations is located. Usually they would be found at hda1.

Here is the lilo.conf I used today:
Code:
boot=/dev/hda

default=knoppix
prompt
nowarn
timeout=100
image=/mnt/hda1/knoppix/vmlinuz
        label=knoppix
        root=/dev/hda1 # probably not needed
        initrd=/mnt/hda1/knoppix/miniroot.gz
        append="lang=da quiet noscsi" # home=scan myconf=scan
        vga=normal
        read-only
other=/dev/hda1
        label=windows
        table=/dev/hda
To install the lilo I start up from the cdrom and run the following commands as root:
Code:
mount /mnt/hda1
mount -o loop /cdrom/KNOPPIX/boot.img /mnt/test
cp -f /mnt/test/vmlinuz /mnt/hda1/knoppix/
cp -f /mnt/test/miniroot.gz /mnt/hda1/knoppix/
umount /mnt/test
umount /mnt/hda1
The following commands should be run each time lilo.conf has to be changed:
Code:
mount /mnt/hda1
vi /mnt/hda1/knoppix/lilo.conf
rm -f /boot # don't know how to avoid this
ln -s /mnt/hda1/knoppix /boot # and this
lilo -v -C /mnt/hda1/knoppix/lilo.conf -b /dev/hda
umount /mnt/hda1
Would you think it is safe to write a script which does the above? I find it a bit scaring to write a boot manager to an end-user harddisk.

/hans