[syslinux] Adding memdisk or similar when booting linux

Kjetil.Mikkelborg at kongsberg.com Kjetil.Mikkelborg at kongsberg.com
Wed Mar 26 03:43:05 PDT 2008


> > >>
> > >> Thanks for your reply, but stil  no luck.
> > >> changed the last arg to -1, but still no sign of /dd.img in initrd
> after booting.
> > >> So, am i looking at the wrong end here? is an initrd image handled
> the same way as
> > >> a cpio archive regarding initramfs? Since i suspect redhat is stil
> using initrd image
> > >> (with ext2 filesystems).
> > >>
> > >
> > >No, you can't add files to an initrd filesystem.
> > >
> > >Don't know about RHEL, but Fedora has been initramfs for soem time.
> > >
> > >> Ive also just for testing tried to change to using
> initramfs_load_file instead of the code above,
> > >> but still no luck with that either.
> > >>
> > >> Any more hints to were to look?
> > >
> > >Well, finding out what your initrd is would be a first step.
> > >
> > >        -hpa
> >
> >
> > Ok, then what I am trying cannot work then ;) since redhat enterprise
> 4 did use initrd instead of initramfs (which actually redhat enterprise
> 5 does).
>
> No, RHEL4 uses initramfs also. In a CentOS (RHEL clone):
> # cat /etc/redhat-release
> CentOS release 4.4 (Final)
> # uname -r
> 2.6.9-42.0.3.ELsmp
> # zcat /boot/initrd-2.6.9-42.0.3.ELsmp.img | cpio -t | head -5
> 2168 blocks
> .
> loopfs
> etc
> etc/udev
> etc/udev/udev.conf

Hey, cool, same results on a redhat enterprise 4u4 box so yes redhat does use initramfs, but NOT in its install enviroment.
zcat /media/cdrom/images/pxeboot/initrd.img > /tmp/t
file /tmp/t
/tmp/t: Linux rev 1.0 ext2 filesystem data

so almost but not really there :)

>
> > is there any way I could get memdisk work with linux? (without
> pxelinux -> loading memdisk - > loading syslinux approach -> loading
> linux)?
> >
> > is there anyway I can make memdisk emulate a floppy for linux?
> > I know this problem now only is valid for older than initramfs
> distros, and I did fiddle with the tought of making a initrd ->
> initramfs converter as a comboot module, but that would require
> handling of ext2 filesystem in comboot (or I could make a initramfs
> image which does the converting,.. need to check in to that)..
> >
>
> Actually, just converting between initrd and initramfs isn't enough.
> The
> boot scripts probably depend on being started in an initrd (the kernel
> boot process changes), and the kernel itself may not have support for
> initramfs.

I tried converting it, and just copying the content of initrd to a initramfs archive did boot (and addition of /init -> /sbin/init) but anaconda bailed on remounting /dev so the problem actually occured inside anaconda (did not expect to not being able to bindmount or remount its enviroment).

My next action now is to see if I can make a initramfs which can setup a initrd enviroment, and chroot to it. If so, I could make this enviroment copy its content from /dd.img to /initrdrooot/dd.img, but my main concern now is that this is still no very scalable.. how can i handle  more than one driver disk ?
(and if this approach will work at all ;))

--Kjetil





More information about the Syslinux mailing list