Standalone/rescue bootfloppy
With this kinda bootfloppy you can boot any system since all necessary
stuff to boot a system is on the floppy.
- The first step is, of course, to create a config file.
The following config file lines will tell chos to search for it's binary files and
save other files on first floppy drive.
bindir=/floppy
chos.map=/floppy/chos.map
chos.background=/floppy/chos.background
install=/dev/fd0
Also setup a Linux kernel that exists on the floppy..
linux "Linux" {
image=/floppy/my_linux
...
}
- Now that you have a config file, mount the damn floppy:
(someone)/chos_path/$ mount /floppy
and copy chos binaries and your kernel there:
(someone)/chos_path/$ cp ./bin/* /floppy
(someone)/chos_path/$ cp where_ever_my_kernel_is /floppy
- And finally run chos:
(root)/chos_path/$ chos -v -c the_config_file_I_created
The above let's you boot the kernel of a floppy, but you still need to have
a root filesystem on a hard or floppy disk or an NFS image.
If you want to make a real 'rescue' floppy, there are the
chances:
- Copy all the necessary binaries to set the system up and running
and do the things you want on the same or another floppy (Linux will prompt you to insert the floppy).
You need '/bin/sh' at least.
You might want to use statically compiled binaries since shared libc,
not to mention libg++, is pretty huge, which leaves you no space
for the actual binaries...
You must add something like 'root=/dev/fd0' on the Linux command line.
- If one floppy isn't big enough, create a compressed ramdisk.
See '/usr/src/linux/Documentation/ramdisk.txt' for information
on creating one.
If you want to use an initial ramdisk, the ramdisk image must be small
enough to fit on the same floppy with the kernel and chos data.
(That's due chos at the moment only supporting regular-file initrds. I should
add support for initrd devices.)
Passwords
Suppose you wanted other users to only be able start Linux (or some other OS) here's
what you do:
- Set a password (password=my_password)
- For those OSes you allow others to boot, set the password off or in case of
Linux probably to 'restricted'.
(In image configuration: password=no|restricted)
Here's an example configuration that
- automagically starts Linux unless a modifier key is being held down ...
- ... and requires a password to start DOS or to manually enter Linux a command line
install=/dev/hda
password=salasana # salasana = Finnish for password
autoboot=not_pressed
linux "Linux" {
image=/boot/vmlinuz
password=restricted
cmdline=vga=EXTENDED root=/dev/hda4
}
bootsect "DOS" {
image=/dev/hda1
}