Jump to content











Photo
- - - - -

kexec-loader v2.0


  • This topic is locked This topic is locked
45 replies to this topic

#26 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 06 March 2009 - 08:06 PM

I don't understand why people want to edit the config file from the disk, especially for testing. If you're unsure of what settings you need, why not just try them in the shell and update the config once you figure out what you need?

#27 Bicephale

Bicephale

    Member

  • Members
  • 50 posts
  • Location:Qc/Canada
  •  
    Canada

Posted 09 March 2009 - 10:23 PM

...why not just try them in the shell and update the config once you figure out what you need?


I guess my post was too long to be understood, never mind.

#28 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 13 March 2009 - 02:49 PM

Do I see it right that if I want to create a working iso I need to build everything from source as everything is linked into linux.upx?

Can I drop in easy some generic kernel like the kernel image on Ubuntu Live CD?

There's an initramfs on the download page you can use instead of building kexec-loader from source

Creating an bootable iso with grub4dos and mkisofs is easy. I thought I can simply use...
title kexec-loader-iso

kernel /vmlinux

initrd /kexec-loader-2.0-initramfs.cpio.gz
...and take some common kernel build away such as the Ubuntu kernel.

But it seams like the Ubuntu kernel is also just a lightweight one who loads further kernel modules which are stored inside Ubuntu's initramfs. I doubt the is a "monolithic linux kernel build" where everything is compiled into the kernel binary, lots of linux kernel features are only available as module.

So my question, is it possible to inject your kernel modules into your initramfs in order to let the kernel recognize the CD?

I think it would be cool if we could inject anything (including configuration files) into your initramfs because the real mode bootloader (syslinux or grub4dos) could just boot kexec-loader's kernel + initrd and it wouldn't matter anymore what the kexec-loader bootdevice is (real floppy, .real cd or virtual floppy/cd/hd).

#29 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 13 March 2009 - 03:04 PM

Creating an bootable iso with grub4dos and mkisofs is easy. I thought I can simply use...

title kexec-loader-iso

kernel /vmlinux

initrd /kexec-loader-2.0-initramfs.cpio.gz
...and take some common kernel build away such as the Ubuntu kernel.

But it seams like the Ubuntu kernel is also just a lightweight one who loads further kernel modules which are stored inside Ubuntu's initramfs. I doubt the is a "monolithic linux kernel build" where everything is compiled into the kernel binary, lots of linux kernel features are only available as module.

So my question, is it possible to inject your kernel modules into your initramfs in order to let the kernel recognize the CD?

I think it would be cool if we could inject anything (including configuration files) into your initramfs because the real mode bootloader (syslinux or grub4dos) could just boot kexec-loader's kernel + initrd and it wouldn't matter anymore what the kexec-loader bootdevice is (real floppy, .real cd or virtual floppy/cd/hd).


I've not added support for anything like this for one simple reason, putting stuff in the initramfs involves building everything from scratch, and modifying some of my build scripts. If you are capable of this then you can probably make any changes you need to kexec-loader anyway.

#30 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 30 March 2009 - 10:46 PM

@ solemnwarning
It is easy to put extra things in the initramfs.

Syslinux and the last 'daily' build of grub4dos support loading multiple initramfs files. So your rootfs file system will contain all the files of the separate cpio archives.

Syslinux:
KERNEL /linux.upx

APPEND initrd=/kexec-loader-2.0-initramfs.cpio.gz,/cdrommodule.cpio.gz,othermodules.cpio.gz

Grub4dos:
KERNEL /linux.upx

initrd /kexec-loader-2.0-initramfs.cpio.gz /cdrommodule.cpio.gz othermodules.cpio.gz

When you use this approach, there is no need to check for the floppy image to load additional modules, so memdisk or grub4dos floppy emulation can be used to boot kexec-loader.

You can also allow an additional parameter to the kernel to see which config file to load.

#31 mr_

mr_

    Frequent Member

  • Members
  • 355 posts
  •  
    Germany

Posted 30 March 2009 - 11:00 PM

This sounds promising. I hope it's getting implemented.

#32 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 31 March 2009 - 11:10 PM

Does linux support loading files from multiple initramfs archives and copying them to rootfs?

#33 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 01 April 2009 - 08:39 PM

Does linux support loading files from multiple initramfs archives and copying them to rootfs?

I don't know. But linux doesn't need to know how to do it.

Syslinux (syslinux/isolinux/pxelinu/extlinux) and grub4dos merge the multiple cpio archives themself to one initramfs. So the linux kernel only sees one initramfs cpio archive.

#34 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 09 April 2009 - 12:28 AM

OK, I've done some playing around with external initramfs's tonight and it breaks UPX. If you try passing an initramfs archive to a UPX compressed kernel, it will triple fault. UPX takes 40kB off of the kernel, but an uncompressed kernel+initramfs.cpio.gz is only 9kB bigger than a combined, UPX compressed kernel, so maybe gzip does better compression than UPX, I dunno. If I stop using UPX it also means I can use kernel 2.6.26+ which might be useful.

On another note: I finished shell autocompletion tonight, tommorows nightly build will include it and I'll probably make a stable release this week.

EDIT: I forced a nightly rebuild, link: kexec-loader-r506-floppy.img.gz

#35 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 10 April 2009 - 09:57 PM

The Linux 2.6.30-rc1 prepatch includes support for compressing bzImage with bzip or LZMA instead of gzip, I tested LZMA and a 775kB kernel became 672kB, the next version of kexec-loader will either use the 2.6.30-rc1 prepatch kernel, or 2.6.30 when it comes out.

#36 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 16 April 2009 - 08:50 AM

I've added support for loading keymaps and written a fairly hacky script for converting console-tools keymaps to kexec-loader keymaps, nobody's ever requested this but I think being able to select non-US keymaps is useful :)

The keymap is loaded from rootfs if it exists, so I'll write a better script that generates an initramfs archive sometime, I've also added support for loading modules from the rootfs, so running kexec-loader from stuff besides floppies/USB with FAT can be done by just packaging the modules you need into a CPIO archive and merging it with the initramfs using syslinux.

There's a severe bug in Linux 2.6.28+ which makes it impossible to run kexec-loader, but there's a patch in LKML now and it'll probably be merged with Linus's tree for 2.6.30-rc3 :)

#37 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 20 June 2009 - 01:42 PM

Maybe a nice addition to the README of kexec-loader would be, mentioning that MEMDISK can be used to boot floppy and hard disk images and iso images (, which are stored on a USB device).

MEMDISK is also very small (less than 20kb), so it is even possible to include it in the kexec-loader floppy itself.

MEMDISK iso emulation is new, BTW:
http://www.boot-land...?showtopic=8258

#38 opex

opex
  • Members
  • 3 posts
  •  
    Sweden

Posted 26 July 2009 - 03:06 PM

Hi,

I'm trying to boot a usb pen drive with Zeroshell but my bios can't boot from that device.
I've tried PLoP but with the current version the reading speed is really slow and it takes roughly an hour to boot to a running system.
Looking around I found kexec-loader but I can't figure out how to configure it to boot my pen drive.
The pen drive is recognized as follows by kexec-loader
|  Device |	  Size |	Format |	  Label |

+---------+-----------+-----------+------------+

|	 sda |	4.02GB |   UNKNOWN |   NO LABEL |

|	sda1 |   13.96MB |	  ext3 |   NO LABEL |

|	sda2 |  160.91MB |   iso9660 |	  CDROM |

|	sda3 |  839.53MB |	  ext3 |   profiles |
sda1 contains vmlinuz, initrd.gz and a grub folder and sda2 is the root partition.
Can anyone help me configure kexec or point me in the direction of another solution I can try?

#39 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 July 2009 - 03:22 PM

Done. :idea:

I don't think that the speed is due to PLoP, I mean, usually Motherboards that do not support USB booting have 1.1 speed only.

But 1 hour is definitely too much for anything!

:P

jaclaz

#40 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 July 2009 - 04:05 PM

How do you say in Swedish:
NO NEED TO DOUBLE POST!

:idea:

Read Rules, and particularly Rule #2:
http://www.boot-land...?act=boardrules

Would this be more understandable?

DET FINNS INGET ATT SKRIVA SAMMA SAK dubbelt


jaclaz

#41 opex

opex
  • Members
  • 3 posts
  •  
    Sweden

Posted 26 July 2009 - 04:42 PM

Well it's kinda hard to figure the board out when posts are merged to other threads without notice. All I got was a broken link when I tried reload my thread.
Maybe the created thread should be closed and referred to existing one to minimize confusion or send out an automated email explaining what happened.
I found out by mistake that my posts were here by going to my user page and click the posts tab.

And my English is fine, thank you very much

#42 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 26 July 2009 - 06:17 PM

Well it's kinda hard to figure the board out when posts are merged to other threads without notice. All I got was a broken link when I tried reload my thread.
Maybe the created thread should be closed and referred to existing one to minimize confusion or send out an automated email explaining what happened.
I found out by mistake that my posts were here by going to my user page and click the posts tab.


It would be even easier if users would post in the appropriate forum, and, in the unfortunate :P case where they posted in the wrong place, and expecially AFTER having asked a Board Mod/Admin to actually MOVE the post to the appropriate place, would get NOT surprised :idea: that the thread was actually MOVED somewhere else or MERGED in the main thread related to the app for which help was asked.

Quick tip:
  • Threads may be moved/deleted/merged
  • Posts may be moved/deleted/merged

Rule #8 :):
http://www.boot-land...?act=boardrules


Next time you log-in:

And you'll be able to see your last Posts. (in other words, you did it by chance, but that would be the way you should do it normally)

jaclaz

#43 opex

opex
  • Members
  • 3 posts
  •  
    Sweden

Posted 26 July 2009 - 11:23 PM

Less MISTAKES (you seem to like to capitalize words so I thought I'd try it) would be made if newly created users weren't REDIRECTED to the Hallow World section WITHOUT NOTICE in the first place. A quick look at the first page of that section states the obvious that I'm not the first one to make it.

True, I asked it to be moved. But I didn't expect it to disappear without notice. Especially when other threads in the above named section had the "Moved:"-sticker on them. I'm an unfortunate creature of thinking consistency is the way to go. But it's not like I can't adapt, one just have to know the quirks to be able to work around them.

I don't know how you utilize forums but personally if I have a problem or question I tend to want it answered/fixed sooner rather then later. Which means, for me, that starts with searching and only then do I post a new thread. Usually I just skip to the next forum looking for answers there.
I certainly wouldn't spend time looking under every rock to find every function a board has to offer. You'd have to sell me your usefulness before I decide whether or not it's worth investing my time in your community. This includes user friendliness. Even the best forums in the world wouldn't live long if the users had to jump threw hoops and things didn't work as expected.

Only as a last resort do I look threw threads with pages after pages of different questions, answers and other related stuff all jumbled up just because it happened to be about a specific software. But that's just me.


Final note. Since this isn't a flaming/whoring section I won't reply to anything that doesn't have to do with the software or my problem in question. If you wish to point out another technical feature of this board or make another reference to the rules, that's up to you.

Peace out.

#44 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 30 July 2009 - 05:28 PM

New version here:
http://www.boot-land...?showtopic=8592

jaclaz

#45 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 01 August 2009 - 04:02 PM

Hi,

I'm trying to boot a usb pen drive with Zeroshell but my bios can't boot from that device.
I've tried PLoP but with the current version the reading speed is really slow and it takes roughly an hour to boot to a running system.
Looking around I found kexec-loader but I can't figure out how to configure it to boot my pen drive.
The pen drive is recognized as follows by kexec-loader

|  Device |	  Size |	Format |	  Label |

+---------+-----------+-----------+------------+

|	 sda |	4.02GB |   UNKNOWN |   NO LABEL |

|	sda1 |   13.96MB |	  ext3 |   NO LABEL |

|	sda2 |  160.91MB |   iso9660 |	  CDROM |

|	sda3 |  839.53MB |	  ext3 |   profiles |
sda1 contains vmlinuz, initrd.gz and a grub folder and sda2 is the root partition.
Can anyone help me configure kexec or point me in the direction of another solution I can try?


If you've got a menu.lst and device.map file in sda1/grub you should be able to just put this in kexec-loader.conf to use the grub config:

grub-path (sda1)/grub


#46 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 25 October 2009 - 05:22 PM

New version here:
http://www.boot-land...?showtopic=8592

jaclaz



Move along peeps, the new thingy is here :cheers::
http://www.boot-land...?showtopic=8592

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users