Creating a live-cd from scratch isn't easy, I think.
What you could do, is look on the net for a live cd and than look at it.
Luckily for you I have a Knoppix live-CD and looked at it a bit.
The CD is boot able like all boot able CDs: it uses boot.cat and boot.img to be bootable.
You need to specify both when making the iso using mkisofs. All looks complicated though.
But however WHEN it boots it starts the kernel and it loads a initrd(hopefully that sounds at least a little familiar).
The initrd contains a script, linuxrc, and a simple linux-fs with /dev,/mnt,/bin and so more basic directories.
Look in your /boot directory. There will at least be one initrd file. Have a look at it:
copy it to a temporary location, gunzip if necessary and than mount using: mount -o loop /path/file /mnt/somewhere
If that doesn't work try it with mount -t cramfs -o loop /path/file /mnt/somewhere.
The file should give you a basic idea of a linuxsystem for one task: loading the actual linuxsystem
The script linuxrc is started when the initrd is loaded and makes sure the system boots step by step. The linuxrc is just like any other shellscript. The only thing you must keep in mind is that the resources you can use are limited to what is included in your initrd's filesystem.
Knoppix solved this with using ash. This shell has built-in mount/umount, test and some other neat functions(they even built in insmod/rmmod).
Knoppix loads modules for filesystems and then it mounts every cdrom-drive, one at a time, untill it finds the cdrom-drive containing the knoppix itself.
(That's one of the key element of a live-cd: finding your cdrom)
When it has found the cdrom it starts a basic setup and puts the files in the right places.
If you have found your CDROM you can start loading your actual filesystem to some locating ( or in some particular way) and start a bootsequens similar to a harddisk setup.
So finding your CDROM-drive is one of the things you need to do.
Another one is deciding what kind of filesystem to use and where you would like to put your filesystem. Some ideas for that:
- Load the entire filesystem into ram(easy but slows your system down)
- Make your filesystem read-only, but load some files into RAM(better)
- Make your filesystem read-only and save changes on the harddisk(thus assuming you have one, difficult to configure)
- Use filesystems that loads only needed files into ram and keeps the rest compressed(squasfs)
- Use a filesystem that mimics being writable, by using the CDROM as filesystem, but when the CDROM is edited the change will be saved in your RAM(no compression will be possible, but is the best way when you only need 650MB, at least that's what I think)
If you have chosen your approach you can start building your filesystem or mkfs your root-directory to the filesystem it needs to be.
It could be possible that you need to create the filesystem first and give it a specified size using dd and than copy all your files onto it.
This is my description of important things concerning live-CD. Keep in mind I have never made one and that this is sort of brainstorming what needs to be done. If you still want to build a live-cd I would be glad to help you out however.
Hope this has given you some ideas and points of interest
Good Luck and ask, because this are nice things to assist in
Hoes