Personally I prefer GRUB because it's more flexible and breaks less often![]()
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:
To install the lilo I start up from the cdrom and run the following commands as root: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
The following commands should be run each time lilo.conf has to be changed: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
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.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
/hans
Personally I prefer GRUB because it's more flexible and breaks less often![]()
chlor,
I just tried your example and it worked great! I can now boot my system without the Knoppix CD....and using the "tohd" command
I ran into a few places in your script where the "knoppix" should be capital "KNOPPIX" because that's how the "tohd" command writes it to the drive... not knowing what version you used, maybe your's was different. Not a big oops, but it might really confuse some newbies.
Code:
note: change the 'da' to 'en' for all you english speakers!!
After the '#' is commented out...add those inside to use them.
I also deleted the other section because the drive only has Knoppix on it...if that's the case you'll get an error lilo tries to find windows.
I created my lilo.conf on the desktop using the default editor cause I'm not good at vi yet....that may help some newbies out there. Also, for some reason, it wouldn't let me make the hda1 read/write, so I had to copy over lilo.conf from the root shell.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
Code:
from the default root prompt {KNOPPIX}
to copy the lilo.conf file from the desktop
Code:cd Desktop cp -f lilo.conf /mnt/hda1/KNOPPIX/
To install the lilo I start up from the cdrom and run the following commands as root:
Code:
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:
Code:mount /mnt/hda1 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
Hope this helps somebody else out!
That 'tohd' function is GREAT!!! Thanks everybody!
Dell PowerEdge C6320 82F9M Server Blade Module 10gb SFP+ 082F9M
$79.99
Dell PowerEdge M620 Blade Server 2x 10C E5-2690v2 64GB Ram 2x 600GB 10k HDD
$125.00
Dell PowerEdge M620 Blade Server 2 x Xeon e5 2665 8 x 16 GB(128) RAM - No HD
$44.99
Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD
$79.00
Dell PowerEdge FX2s CTO Blade 4 Slot 2U Chassis 2x 2000W
$399.00
Dell PowerEdge M520 Blade Server Xeon E5-2403 NO HDD NO RAM
$40.00
Cisco UCSB-B200-M5 V05 Blade Server with 2x GOLD 6146, 3.2GHZ 64GB RAM, NO SSD
$649.00
Google Search Appliance - Dell PowerEdge R710 x2 Xeon X5690 192GB Memory 6TB HDD
$529.99
HP ProLiant BL460c Gen9 Blade 2x E5-2690v4 2.6GHz =28 Cores 32GB P246 650FLB
$223.00
HP ProLiant BL460c Gen9 Blade 2x E5-2697v3 2.6GHz =28 Cores 32GB P246 650FLB
$173.00