I'm trying to learn how to make a bootable Linux CD with a bare minimum of tools on it as I only need it to do a few things. I've spent hours searching google and experimenting with some various methods explained in articles I found, but none of them have panned out.
I've read the bootdisk howto but besides being seriously outdated, it focuses on floppies.
So far I have been able to use ISOLINUX to create a bootable CD by following the instructions at
The CD boots, finds my kernel, and then panics because it can't find anything else. That was obviously expected since I had not yet built the root file system. But at least getting to that point assured me I was on the right track.
I knew I needed some kind of sane working environment for the kernel to load. Busybox was the first thing I thought of. I may one day be interested in compiling everything I want from source, but for the time being Busybox is absolutely perfect for what I want.
I'm just not sure how to proceed from the point I'm at now. I was thinking I had to make an initrd image, mount it as a loop device, and then install busybox to that location. I have done that. (Though I'm not sure I did it right ... does the initrd have to be a specific size?) I then updated my CD image to include the initrd image I created. I reburned the CDRW and tried to boot from it.
The loader finds and loads vmlinuz and even finds and loads intird ... but it still kernel panics. I didn't expect it to work the first time, but I have tried reburning the CDRW a dozen times, trying a few different things, and I'm getting nowhere.
The kernel panic I'm getting is:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I think the problem may be with my /dev directory inside of my initrd ... but I'm not even sure if we are at that point yet when the kernel panics. Do I need two /devs? One inside of the initrd for the ram disk image and one outside of the initrd so the system can boot?
I'm pretty confused about that point. My ISO contains:
initrd.gz isolinux.bin isolinux.cfg vmlinuz
Here are the lines I have in my isolinux.cfg:
timeout 10 default vmlinuz append initrd=initrd.gz load_ramdisk=1 ramdisk_blocksize=4096 root=/dev/rd/0
I compiled everything I needed into my kernel. No module support at all. I included RAM disk support ((4096) Default RAM disk size) and Initial RAM disk (initrd) support into the kernel.
I'm not sure if my isolinux.cfg is being read properly ... my timeout setting of 10 seconds doesn't seem to work. It boots instantly. (Though now that I'm writing this I'm thinking that might be miliseconds?)
Also I'm not sure if "root=/dev/rd/0" is right. I copied that from someone else's setup and I'm thinking it could be the source of my current problem. But since there's no /dev on the CD to look at, I don't know what it should be.
I feel like I'm pretty close to achieving my goal. Can someone help me make the final leap?