[syslinux] Adding memdisk or similar when booting linux

Kjetil.Mikkelborg at kongsberg.com Kjetil.Mikkelborg at kongsberg.com
Wed Mar 19 04:36:43 PDT 2008


>Kjetil.Mikkelborg at kongsberg.com wrote:
>>
>> Is there anyway i can keep redhats initramfs image, and load a second one?
>>
>> If not, I really would need to ensure that the initramfs could hold both redhats data, and my driverdisk data. But still this is much cleaner than jumping from memdisk >to syslinux and so on. How does actually initramfs handle this? can it be dynamicly enlarged? with this scenario, the initramfs could with no problem be twice and tripple >the original size.
>>
>> And if i really can have a second initramfs, how do i access it?
>>
>
>If you load multiple initramfs images, then they overlay; the resulting
>filesystem contains both files.
>
>        -hpa

Ok, thanks, but..

Ive tried using linux.c as an example, but I am in no way capable of adding files with this simple code

size_t kernel_len, dd_len;
void *kernel_data, *dd_data;
struct initramfs *initramfs;

loadfile("path to vmlinuz on tftp server",&kernel_data,&kernel_len);
loadfile("Path to dd.img file on tftp server",&dd_data,&dd_len);
initramfs = initramfs_init();
initramfs_load_archive(initramfs,"path to redhat enterprise 4 initrd.img file on tftp server");
initramfs_add_file(initramfs,dd_data,dd_len,dd_len,"/dd.img",0,0755);
syslinux_boot-linux(kernel-data,kernel_len,initramfs,"append string",0xffff,0);

is there any more init I have to do to add files? and,  is it really right to use dd_len,dd_len as arguments (whats the first len since the second is for how much data we add).

--Kjetil




More information about the Syslinux mailing list