Linux CD-ROM Game System |
||
YAMAMORI Takenori <yamamori> |
The initrd-game.img itself has been completed. Next, we make a floppy disk that built in initrd and test it for booting. This floppy disk image will be burned into a CD-ROM as an El Torito booting image finally.
For making of the floppy disk, we use a floppy disk that the mkbootdisk command creates as a template.
The concrete procedure is the following:
(making of a boot floppy disk) ---- ... insert a new floppy disk ... # /sbin/mkbootdisk -v 2.2.14-1vl6 # mount /dev/fd0 /mnt/floppy # *Note # rm /mnt/floppy/initrd.img # remove what mkbootdisk made, which may not exist # cp -p /boot/initrd-game.img /mnt/floppy/initrd-game.img # vi /mnt/floppy/etc/lilo.conf ... see below for lilo.conf ... # vi /mnt/floppy/boot/message ... see below for /boot/message ... # /sbin/lilo -r /mnt/floppy # Install LILO last Added linux * # umount /mnt/floppy
We modify the /mnt/floppy/etc/lilo.conf in the floppy disk as follows. There may be a description for rescue which mkbootdisk made but we can remove it entirely.
boot=/dev/fd0 timeout=30 message=/boot/message prompt image=/vmlinuz-2.2.14-1vl6 label=linux root=0x101 # This must not be root=0x100, but actual value is ignored initrd=/initrd-game.img # specify the initrd for the game |
It is not concerned with the system, but we can write a game message in /mnt/floppy/boot/message as we like, then a content of it will be displayed in boot with LILO. I write as follows:
Linux CD-ROM game system "circuslinux" |
We must execute the lilo command with a "-r" option as follows after modifying /etc/lilo.conf or /boot/message under /mnt/floppy.
# /sbin/lilo -r /mnt/floppy
Turning the floppy disk into a write-protect state, we boot the system from the floppy disk. It will take somewhat longer time because it is a floppy disk. The shell will be invoked from the linuxrc in the same way as what we saw in the previous booting test for the initrd-game itself. We mount a hard drive by the following command again.
# /cdmount /dev/hda1 /mnt/cdrom ext2 ========= | +--- change it with your actual hard drive partition.
Exiting the shell, when the game starts, this test is completed.
Now, we reboot it again from a hard drive, and type "telinit 3" to start a normal system.
Then we save the image of the floppy disk as follows:
# mkdir /images # dd if=/dev/fd0 of=/images/boot.img bs=1440k count=1