Minimal boot CD

blixel_at_gmail.com
Date: 12/08/04

  • Next message: Richard H.: "Re: embedded web server (EWS) & persistent HTTP 1.1 connection"
    Date: 7 Dec 2004 17:48:20 -0800
    
    

    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 http://syslinux.zytor.com/iso.php

    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?


  • Next message: Richard H.: "Re: embedded web server (EWS) & persistent HTTP 1.1 connection"

    Relevant Pages

    • Re: Kernel panic: initramfs problem? [SOLVED - mostly]
      ... initrd.img-2.6.18-6-686 is 4899969 bytes in size (generic kernel) ... Following up on the initrd idea.... ... with support for the initial RAM disk enabled. ... If RAM disk support is also included, ...
      (Debian-User)
    • Re: BOOT_CS
      ... the CRC32 of the decompressed RAM disk - and stop the boot process ... another kernel version / initrd to load. ... You cannot place the decompressed initrd at a maximum address before ... address minus ramdisk size if I remember ...
      (Linux-Kernel)
    • Re: Beige PowerMac G3/266 trouble
      ... I just wanted to say that this fs is not needed to boot up the ... the ram disk, so entering /dev/ram is probably better. ... the initrd parameter gives the kernel an image with which it ...
      (comp.os.linux.powerpc)
    • Re: [SLE] New initrd way in SuSE-9.0
      ... >>Durung the update initrd's are created for all kernel images ... boot procedure takes the default initrd. ... switch off RAM disk support and Initial RAM disk support. ...
      (SuSE)
    • Re: 2.6.11-1.35_FC3 Kernel upgrade leads to panic
      ... My computer has a kernel panic when booting ... I have seen kernel panics like this with previous automatic updates of ... mkinitrd), and those modules were not added into the new kernel's initrd ...
      (Fedora)