Slax author's Blog (RSS)
09
October2012
Slax Boot installer for Linux
There is already a bootinst.bat script in /slax/boot/ directory, which is used from within Windows to make Slax boot from an USB device you copied it into, but there was no official Linux equivalent to it till now. It's called bootinst.sh and you can find it on Linux Live Kit github.
How it works? First of all, it uses 'df .' to find out which devices are we on. Then, it runs extlinux in order to install boot loader to the current partition. Finally, and this is a bit tricky, it puts MBR (master boot record) to the drives sector zero and uses fdisk to unmark all active partitions (so nothing seems bootable at the device) and then it toggless bootable flag only for the current partition. This way, the MBR code knows where to boot from.
For Slax, I will add similar detection if the user tries to install the bootloader to a partition which resides on the same disk drive like Windows, I did for the windows boot installer.

User comments

