Need some help here if anyone can spare a minute.
I have been working (ok struggling) with this project for some time. It is a PC/104 industrial board running Linux. The board is basically a normal computer (AMD Geode 300mhz x86 processor, SODIMM memory, 2 IDE channels, usb, ethernet, etc), all normal stuff. Currently I have a hard-drive and CDROM connected to one IDE channel and the other IDE channel is dedicated to a on-board compact-flash socket. With this setup I installed Gentoo Linux onto the hard-drive, got it all working fine and honestly it's pretty slick for a 3.5"x3.5" computer.
Now, I need to get this to the customer, which means the hard-drive and CDROM go away, it needs to boot entirely off the compact-flash card, load a initial ramdisk (initrd) and execute out of that.
I have read everything I can find about this and it certainly appears do-able. I created my initrd image file using the 'dd' command then 'mount -o loop...' etc, I stripped down alot of stuff from my actual system here since I'm using about 1.8gig on the hard-drive, but compact-flash card is only 512meg, and more importantly RAM is only256meg on this board (although that could be upped easily if needed). The CF card shows up as /dev/hdc according to Linux, I can read/write to it happily, it appears Linux doesn't know or care it's a CF card (the BIOS shows it as a hard-drive also).
So I have it starting to boot, have the CF card formatted, a kernel on it (2.6.9 that I compiled). I am using syslinux as the boot loader and it starts up, finds the image file (lite.gz) and says it finds the kernel, and starts uncompressing the kernel. Works for 10-15 seconds, then halts with a "Kernel Panic - Not Syncing: VFS: Unable to mount root fs on unknown (0,0)". I looked that error up and usually it's because of a "root=" or "boot=" directive wrong in the boot loader, so it's not passing the correct info to the kernel. Soooo, I'm trying to learn what is a 'correct' way to pass argument to the kernel, I have grub and lilo both I can use (grub seems to have issues though, I just compiled lilo because most examples I've seen use it, I know any should work, but monkey see, monkey do, I'm happy to copy a working system).
I would greatly appreciate it if someone could post what either their grub.conf, or lilo.conf, or syslinux.cfg files are to load a initrd at startup, then change-root, or switch-root or whatever it's called where you make the root file-system the ramdisk you just created. I read that I need a /linuxrc file which will be executed immediately after the initrd is created/expanded, I'm alittle lost with that however. I have read many versions of /etc/fstab files, some using /dev/ram0, some /dev/ram1, some /dev/rd/0/, some /dev/mem...a ton of variations, I just am looking for what will load a initrd then run out of it, with no hard-drive or cdrom or anything around.
I found one other writeup which has helped some (not enough or I wouldn't be here), in that example the initrd was mounted as the root drive, but then the CF card was remounted as /etc or something like that, so in the running program you could write out to real storage (writing to the initrd does no good for keeping anything ofcourse), and you could specify a program to run at startup which wouldn't have to be in that image, so you could say always run /etc/MyProgram, so then to update your program, you'd just over-write that file on the flash-card with a new version, never touching the actual file system image.
The compact-flash card ideally needs to stay as a FAT16 card, as we have plans of using Windows computers with USB CF readers to load these in the field.
So that is the plan, any help is greatly appreciated. I'm not a linux guru, never worked much with this at all, know almost nothing, yet I am the most knowledable person (linux-wise) working on this project...eeeek...
Thanks in advance! Mark Brodis