Linux CD-ROM Game System
|YAMAMORI Takenori <firstname.lastname@example.org>|
For this article, I made the first CD-ROM of the game system while writing down the procedure in a memo. And then, I erased the contents of the hard drive entirely and made the CD-ROM game system again with just the memo I had written so as to confirm the procedure is all right.
The one of the key to make the system to boot with just a CD-ROM is to use initrd well. When it is successful that we mount the CD-ROM with linuxrc in the initrd, and change the real-root-dev to initrd itself, and then /sbin/init gains control, we can make a boot floppy disk with that, and then burn a CD-R with it as the El Torito bootable image.
Another is to adapt to a read-only filesystem. Generally, no writing access occurs in each directory like /bin, /usr, /sbin after the installation of the OS unless any new application is installed.
While, writing access occurs in each directory like /var, /tmp of course. A little writing access occurs in a directory /etc even if the system setting is not changed.
As for a directory /dev, no new device file will be created unless the system setting is changed, but the permission and owner of the device file are changed dynamically.
In this system, we made each /dev, /etc as a read-only directory forcibly. The directory /var is also read-only except each /var/run, /var/lock is moved to /tmp with a symbolic link.
There is no problem even though we make them read-only forcibly because what we have to do is to execute just a game in a single user mode.
If you want to start not only a game but also an entire Linux system with just a CD-ROM, you have to do something more to adapt each directory /etc, /var, /dev to the read-only.
In this system, each setting for the X Window System, sound, and joystick is fixed on the CD-ROM. I actually tried to boot a few other machine from this CD-ROM. Then, the game itself works fine on each machine except one that has an older video card. Because the XF86_SVGA is used as the X server, it works on many system. However, the sound and joystick cannot work because the hardware environment is different one by one. Someday we can try for it, but it will require a persevering work that is to make an auto recognition system step by step for a variety of hardware.
Good luck !