Jump to content











Photo
- - - - -

kexec-loader v2.1


  • Please log in to reply
26 replies to this topic

#1 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 30 July 2009 - 05:12 PM

I haven't felt like working on kexec-loader much lately, so it's sat for weeks at a time with no changes. This release is mostly bugfixes and UI improvements.

Download page

#2 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 01 August 2009 - 04:16 PM

I'm planning to update the readme to use more examples instead of being like a reference manual. How easy do you think downloading and using kernel modules is?

#3 was_jaclaz

was_jaclaz

    Finder

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

Posted 01 August 2009 - 06:03 PM

I'm planning to update the readme to use more examples instead of being like a reference manual. How easy do you think downloading and using kernel modules is?

Good, the more documentation and examples there are, the better. :P

How easy do you think downloading and using kernel modules is?


I beg your pardon? :idea:

jaclaz

#4 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 01 August 2009 - 06:29 PM

I beg your pardon? :idea:


Eh?

#5 was_jaclaz

was_jaclaz

    Finder

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

Posted 02 August 2009 - 09:50 AM

Eh?

I mean, before asking how easy it is, you should make sure that the other people actually know what you are talking about. :)

I never downloaded a kernel module in my life :P, let alone attempting actually using it. :P

Is it serious, doctor? :P
:P

:idea:

jaclaz

#6 solemnwarning

solemnwarning

    Member

  • Members
  • 73 posts
  •  
    United Kingdom

Posted 30 August 2009 - 08:56 PM

kexec-loader v2.1.1 released :whistling:

I've rewritten the docs as suggested here to have examples for common usage and a reference section at the end to cover everything else.

kexec-loader-2.1.1-floppy.img.gz
modules-2.6.30.5-1.tar.gz
kexec-loader-2.1.1-readme.html

Updated config loading code to look for kxloader.cfg if there is no
kexec-loader.conf file.

Changed behaviour of timeout directive: 0 timeout will boot instantly
instead of waiting forever, use "off" to force no timeout. The default
setting is "off", but will be overridden by menu.lst unless explicitly
set in kexec-loader.conf.

Fixed bug: Module loading failed due to my lack of testing.

Changed ls command to not output timestamps or list ./.. directories.

Fixed bug: Append option ignored and cmdline used in its place.

Fixed bug: Error from kexec-tools dying not visible when booting menu
target as alert was not set on failure.

Added support for modules packed in TAR archives, optionally compressed
with LZMA using the .tlz extension.



#7 Bicephale

Bicephale

    Member

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

Posted 25 October 2009 - 04:48 PM

Hi SolemnWarning,

Thank you for finally allowing 8.3 DOS filenaming relatively to 'kexec-loader.conf' which
can now be replaced by 'kxloader.cfg', it seems! I'm glad you considered my suggestion.

:cheers:

#8 Bicephale

Bicephale

    Member

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

Posted 06 November 2009 - 03:50 AM

Would somebody please tell me how to merge these two diskettes as one:

http://www.moriy.com/dr-dos/downloads/
'dr70570c.img' ('DR-DOS v7.05.70c', 2009-May-25)

http://www.solemnwar...er/download.cgi
'kexec-loader-2.1.1-floppy.img.gz' ('KExec-Loader v2.1.1', 2009-Aug-30)

Both use 'SysLinux' so i get some success if i edit its configuration file:

'SysLinux.CFG'
# Adapted for use with 'Slax' Linux

default plop

prompt 1

timeout 50

say CLI:  plop, kexec, dos, bcdl

display /Boot/Help.msg

F1 /Boot/Aide.msg

F0 /Boot/Help.msg



label bcdl

menu label Bootable CD Loader

kernel /bcdl.bin



label dos

menu label Caldera Dr-DOS v7.05.70c

kernel /drdos/FAT12FD.BSS



label kexec

menu label KExec-Loader v2.1.1 (2009-Aug)

kernel /vmlinuz initrd=/initrd.img



label plop

menu label PLoP BootManager v5.0.4

kernel /PLPBt

#append initrd=/plpbt.igz

Unfortunately, even if 'KExec-Loader v2.1.1' appears to load as planned
a time comes when it stalls complaining about some "Kermel Panic"...

:thumbup:

Thanks to the new DOS 8.3 file naming support, 'kxloader.cfg' can now
be edited using nothing but the hybrid diskette itself, which is one of
my present objectives relatively to the merging... I was hoping there
could be someone here who might figure out what i've done wrong.

:(

#9 was_jaclaz

was_jaclaz

    Finder

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

Posted 06 November 2009 - 08:33 AM

At first sight this:

label kexec
menu label KExec-Loader v2.1.1 (2009-Aug)
kernel /vmlinuz initrd=/initrd.img


should really be:

label kexec
menu label KExec-Loader v2.1.1 (2009-Aug)
KERNEL /vmlinuz
APPEND initrd=/initrd.img


jaclaz

#10 Bicephale

Bicephale

    Member

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

Posted 06 November 2009 - 10:07 AM

Thank you for your answer. I downloaded the same 'SysLinux' version
as that which is used by 'KExec-Loader v2.1.1' (e.g. v3.63) and created
an MS-DOS v7.10a (W98) bootable diskette where 'SysLinux' has been
installed. Then, i used two seperated lines instead of one as you have
recommended and now 'KExec-Loader' loads further until it reaches
an endless loop:

Searching for boot disk...
Press any key to abort


That's an improvement because when i press "any key" i'm dropped
to the 'KExec-Loader' CLI from which i've effectively been able to
initiate the lauching of 'Slax' installed on an SD card inserted after i
got into that CLI. Normally, the 'KExec-Loader' diskette automatically
offers a menu with two items to choose from... I'm not sure where to
look next but at least 'PLoP', 'MS-DOS' and 'KExec-Loader' are now
working from the same diskette - with non fatal failures...

Any additional hints?

:dubbio:

#11 was_jaclaz

was_jaclaz

    Finder

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

Posted 06 November 2009 - 10:39 AM

Cannot say if it's a syslinux issue, but I don't think so.

Is it NOT the same issue you had before about the volume name, is it? :thumbup::
http://www.boot-land...?...=7124&st=11
:dubbio:

WHAT are the contents of your kxloader.cfg?

jaclaz

#12 Bicephale

Bicephale

    Member

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

Posted 06 November 2009 - 06:11 PM

Hi JacLaz,

Thanks again, in a way you're right to warn me about the label...

This time, instead of starting from a DOS diskette i just used the
'KExec-Loader' one. My 1st operation was to install DOS on it via
the "Sys" command, then i used 'CopyBS' to save the boot sector
to a .BS file, then i re-installed 'SysLinux' and finished the work
by copying the DOS .BS file to my diskette. This is how far i was
able to go with this method:

Searching for boot disk...
Press any key to abort
Found boot disk: fd0
Loading /mnt/fd0/kxloader.cfg
/mnt/fd0/kxloader.cfg:47 No root device specified
/mnt/fd0/kxloader.cfg:55 Unknown directive 'boot'

Press any key to continue...


That's even more improvement because instead of being dropped
to the 'KExec-Loader' CLI when pressing "any key" it took me to
the scroll list (menu) as expected.

I tried to label the diskette under both DOS and Windows but the
name showed up in capital letters only and it broke my diskette as
described in the previous post. I used Peter Norton's '88 'Volume
Label' tool to label the diskette as 'kexecloader' (no capitals) and
this undone what the DOS/Windows 'Label' commands had done.

The next step is probably to fix 'kxloader.cfg' which follows below:

'kxloader.cfg'
# Example kexec-loader configuration file



# Timeout is specified in seconds

#

timeout 5



# Load device.map/menu.lst from a GRUB installation

#

# grub-path (hda1)/grub



# Map GRUB device names

# This overrides any mappings in device.map

#

# grub-map hd0 sda

# grub-map hd1,a hda5



# Specify arguments for kernel modules

# All modules in /modules/ are loaded automatically

#

# kmod foomod name=value name

# kmod barmod name=value name



# Boot Linux

#

title	Generic Linux System

root	hda1

kernel	/vmlinuz

cmdline	root=/dev/hda3

initrd	/initrd.gz



# Boot this floppy (For debugging)

#

title	kexec-loader

root	LABEL=kexecloader

kernel	/vmlinuz

initrd	/initrd.img



# Slax entry

title SLAX v6 (SD directly)

root /dev/sda1

kernel /boot/vmlinuz

initrd /boot/initrd-en.gz

cmdline root=/dev/ram0 rw ramdisk_size=6666 autoexec=xconf;startx;telinit~4;poweroff



# Slax Loading a la IceCube

root LABEL=SLAX

title SLAX v6 (via GrUB4DOS)

kernel /grub.exe --config-file="find --set-root /boot/slax.cfg; chainloader +1"

initrd /slax.img



# GrUB entry

title Load 'GrUB.EXE' from SD card '/boot/' directory

root /dev/sda1

kernel (sda1)/boot/grub.exe

boot



# GrUB entry

# title Load GrUB menu from SD card root

# grub-path (sda1)/



# GrUB entry

# title Load GrUB menu from SD card '/boot/' directory

# grub-path (sda1)/boot

And here's 'SYSLINUX.CFG' just to confirm the previous modifications:

'SYSLINUX.CFG'
# Adapted by Bicephale for 'Slax' Linux

default plop

prompt 1

timeout 50

say CLI:  plop, kexec, dos, bcdl

display /Boot/Help.msg

F1 /Boot/Aide.msg

F0 /Boot/Help.msg



label bcdl

menu label Bootable CD Loader

kernel /bcdl



label dos

menu label MS-DOS v7.10a

kernel /dos/MSDOS.BS



label kexec

menu label KExec-Loader v2.1.1 (2009-Aug)

kernel /vmlinuz

append initrd=/initrd.img



label plop

menu label PLoP BootManager v5.0.4

kernel /PLPBt

#append initrd=/plpbt.igz

:dubbio:

#13 was_jaclaz

was_jaclaz

    Finder

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

Posted 06 November 2009 - 06:29 PM

Troubleshooting does not work this way. :(

You don't throw in everything you have around and expect that everything is working. :thumbup:

Then look for the problem in tens of lines. :dubbio:

You make a SIMPLE kxloader.cfg, then you add entries in it, when it stops working you have found which one is "botched".

OR you actually read and try to interpret what the program tries desperately to tell you, let's go from the bottom:


/mnt/fd0/kxloader.cfg:55 Unknown directive 'boot'


this is telling you that on line #55 of kxloader.cfg the "directive" 'boot' is NOT recognized.
translation, you used a (WRONG) entry for grub4dos you copied from somewhere, simply edit this entry:

# GrUB entry
title Load 'GrUB.EXE' from SD card '/boot/' directory
root /dev/sda1
kernel (sda1)/boot/grub.exe
boot

removing last line.
But wait a minute, THAT line is #55, thus:

/mnt/fd0/kxloader.cfg:47 No root device specified

that means that you have a "botched" root specified on line #47,
should be exactly 8 lines above the "boot", i.e. this line:
root LABEL=SLAX

part of:

# Slax Loading a la IceCube
root LABEL=SLAX
title SLAX v6 (via GrUB4DOS)
kernel /grub.exe --config-file="find --set-root /boot/slax.cfg; chainloader +1"
initrd /slax.img


You must PAY ATTENTION when playing with commands/text configuration files!

:(

jaclaz

#14 Bicephale

Bicephale

    Member

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

Posted 06 November 2009 - 07:32 PM

It's a pleasure to read you JacLaz, as always...

The uncommented lines were remnants of my
experiments which probably date back to the
last spring... Having no internet access when i
tested this diskette i included a few samples to
serve as guides later because i hate having to
type endless lines of cryptic instructions. One
of them works fine, my 'SLAX' SD card booted
flawlessly even if this machine doesn't support
USB bootable drives. The availability of DOS
and an editor will make my task considerably
less tiresome in the future, including trouble-
shooting!... I guess i'll resurface when 'SLAX'
has its NTFS & PXE features fixed and mature.

:dubbio:

#15 was_jaclaz

was_jaclaz

    Finder

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

Posted 06 November 2009 - 08:41 PM

...
Having no internet access when i tested this diskette.....

I guess i'll resurface when 'SLAX' has its NTFS & PXE features fixed and mature.


You mean you are a polar bear in disguise and you will soon be going into winter letargy till spring? :(

By then you will have once again forgotten the steps to build a diskette!

:thumbup:

Just remember to jolt down the link to this thread.:dubbio:

:(

jaclaz

#16 Bicephale

Bicephale

    Member

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

Posted 07 November 2009 - 12:19 AM

Having no internet access when i tested this diskette i included a few samples...


This passage means that each time i reboot with the diskette
i'm dealing with minimum resources and it's not a convenient
time to browse around on the net. The samples were added,
putting various elements into a single bloc maybe for future
evaluation. What's commented out with a "#" character at the
begining of the line remains to be tested, most obviously...

In any case, this diskette isn't the end of a quest, it's simply the
begining and that's why i intend to wait for as long as it takes
in order to reach the next step. When i can trust 'Slax' with my
French-Canadian Windows environment (and also those of my
mother, sisters, cousins and relatives) i'll do what i did a couple
days ago.

One brick at a time. Too bad if i must forget and re-learn again:
that's how knowledge is acquired, isn't it?...

:dubbio:

#17 was_jaclaz

was_jaclaz

    Finder

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

Posted 07 November 2009 - 12:17 PM

This passage means that each time i reboot with the diskette
i'm dealing with minimum resources and it's not a convenient
time to browse around on the net.

We have solved that kind of problems some time ago. :(
We call that "Take notes" or "Print the page when you are online" :thumbup:

One brick at a time. Too bad if i must forget and re-learn again:
that's how knowledge is acquired, isn't it?...

Yep :(

:dubbio:

jaclaz

#18 Bicephale

Bicephale

    Member

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

Posted 07 November 2009 - 05:42 PM

Sorry but paper isn't a satisfying solution when
one can do so much better using the machine
to configure the machine! Don't worry though,
i do use paper when that's essential... Actually,
your funny remark is an opportunity to suggest
a way to improve 'KExec-Loader': when a new
situation occurs i'd find it more convenient if i
could simply edit a pre-existing entry instead
of being forced to drop to an empty CLI space
from which i must re-invent the wheel without
the help of suitable editing tools. Who will find
it extravagant to do with 'KExec-Loader' what
can be done using similar SoftWare already?...

As a 'Slax' user, for example, i happen to deal
with 'SysLinux' on which 'KExec-Loader' also
depends. The dynamic (on-site) edition of one
single command line doesn't require any paper,
no matter how short the line! So, if it's normal
to find that feature in a basic application such
as 'SysLinux' why not in 'KExec-Loader'?!!

:(

Thank you for allowing me to stay on topic!

:dubbio:

#19 Bicephale

Bicephale

    Member

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

Posted 04 January 2010 - 10:39 AM

Hi SolemnWarning,

I'd like you to see this:

http://www.slax.org/...680#postid54680

:)

#20 Philippe Lelédy

Philippe Lelédy
  • Members
  • 5 posts
  •  
    France

Posted 01 February 2010 - 11:11 AM

My question is exactly one asked SolemnWarning:

How easy do you think downloading and using kernel modules is?

I know a lot about Linux, nothing about DOS, and I have not any real floppy I can use. But I do need update kexec-loader-2.1.1-floppy.img to add some FS modules in /modules directory. I don't know how to do that only with floppy.img files. Does mount -o loop is enough ?

PhL.

#21 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13437 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 01 February 2010 - 11:15 AM

I don't know how to do that only with floppy.img files. Does mount -o loop is enough ?


Yep. :cheers:

http://untitledfinal...es-under-linux/

;)

Wonko

#22 Philippe Lelédy

Philippe Lelédy
  • Members
  • 5 posts
  •  
    France

Posted 01 February 2010 - 02:47 PM

I don't know how to do that only with floppy.img files. Does mount -o loop is enough ?

Yes, it's that simple:

sudo mount -o loop= kexec-loader-2.1.1-floppy.img kexec-loader-2.1.1.mnt
Make some changes, e.g.
cp modules-2.6.30.5-1/fs/{xfs.tlz,ext2.tlz} kexec-loader-2.1.1.mnt/modules/

df -h .
Warning ! cp ext2.tlz didn't work for me. But cp ext2.ko did the job.

There is 356K free space ! And then umount
sudo umount kexec-loader-2.1.1.mnt

Simple, isn't ?
[Ubuntu 9.10]

#23 Philippe Lelédy

Philippe Lelédy
  • Members
  • 5 posts
  •  
    France

Posted 01 February 2010 - 03:12 PM

How easy do you think downloading and using kernel modules is?

Once you have undestood that you have 2 files to download, http://www.solemnwar...1-floppy.img.gz and http://www.solemnwar...6.30.5-1.tar.gz it is a little more clear.

I found Readme.html a little confusing when using the word kernel. It is not always very clear if the word is used to speak about the kernel built by solemnwarning and put in the floppy image, or about the target kernel. Modules usage should be explained a little bit more. Is putting module in modules/ directory enough or is it required to put them in initramfs/modules/ ? It depends ! If module is mandatory for accessing boot disk (the one with kexec-loader on it !) , YES, but if the module is only necessary to load the target kernel/initrd, NO.

Furthermore, it seems that the word module itself has two different meanings.

kmod <module> <args>
Set options to be passed to a kernel module if it is loaded.

which kernel ? the target or the solemnwarning ? I think it's solemnwarning' one.

module <path> [args]
Load and pass a multiboot module to the target kernel.

What is a multiboot module ? It is not a kernel module !

#24 Philippe Lelédy

Philippe Lelédy
  • Members
  • 5 posts
  •  
    France

Posted 01 February 2010 - 03:38 PM

cp modules-2.6.30.5-1/fs/{xfs.tlz,ext2.tlz} kexec-loader-2.1.1.mnt/modules/

Copying ext2.tlz didn't gave me access to the ext2 filesystem where the target kernel is to be found. I had to extract ext2.ko from ext2.tlz, and to copy ext2.ko in modules/ in order to gain access to my ext2 formatted partition.

It is not what it is explained

One or more modules may be packaged in a tar file, or an LZMA compressed tar file with the .tlz extension.


Ph.L.

#25 Philippe Lelédy

Philippe Lelédy
  • Members
  • 5 posts
  •  
    France

Posted 02 February 2010 - 11:47 AM

As a "thank you" for solemnwarning, I explain here my usage of kexec-loader : preparing a LiveUSB with a floppy to boot from for not leaving alone those who use and old computer which can't boot out of USB but has a floppy drive.

$ sudo mount -o loop= kexec-loader-2.1.1-floppy.img kexec-loader-2.1.1.mnt

$ cat kexec-loader-2.1.1.mnt/kexec-loader.conf | g -v &#39;^#&#39;

timeout 5

title Ubuntu Live sd{a,..}

root	sda3

kernel /liveCDs/ubuntu-9.10-5.4/casper/vmlinuz

cmdline  boot=casper live-media-path=liveCDs/ubuntu-9.10-5.4/casper ignore_uuid persistent  debug break=mounx

initrd /liveCDs/ubuntu-9.10-5.4/casper/initramfs-V3bA.lz

$ ls kexec-loader-2.1.1.mnt/modules 

ext2.ko
The initramfs-V3bA.lz is customized initramfs for starting search for live-media from the first sd, that is sda, since on older computer this is the device name of the first plugged in USB. On moderm computer I use another customized initramfs which start the search at sdb.
I test it under kvm, it is slow but does work:

$ sudo umount kexec-loader-2.1.1.mnt

$ lsusb

&#91;...&#93;

Bus 001 Device 017&#58; ID 0325&#58;ac02

&#91;...&#93;

$ sudo kvm -m 760 -usbdevice host&#58;0325&#58;ac02 -fda kexec-loader-2.1.1-floppy.img

husb&#58; open device 1.17

&#91;...&#93;
BTW it is a little bit tricky to find out which line of lsusb output (here it is 0325:ac02 ) refers to the one USB drive you want to use with kvm (here -usbdevice host:0325:ac02). The rule of thumb is to unplug and replug it, and make a diff between lsusb output before and after. Some times, you are more lucky

$ lsusb

Bus 001 Device 017&#58; ID 0325&#58;ac02

Bus 001 Device 020&#58; ID 0930&#58;6545 Toshiba Corp. Kingston DataTraveler 2.0 Stick &#40;4GB&#41; / PNY Attache 4GB Stick
When there is useful info, it comes from a database, but this info lacks when there is no entry in this database:

$ egrep &#39;^0325|.ac02|^0930|.6545&#39; /var/lib/misc/usb.ids

0930  Toshiba Corp.

	6545  Kingston DataTraveler 2.0 Stick &#40;4GB&#41; / PNY Attache 4GB Stick
Worst, you may be unlucky with wrong info from the database:

$ lsusb -s 001&#58;002															

Bus 001 Device 002&#58; ID 13fe&#58;3100 Kingston Technology Company Inc.
You would better ask the device itself (being root)

# lsusb -v -s 001&#58;002 | egrep &#39;i&#40;Ma|Pr|Se&#41;&#39;

  iManufacturer		   1		 

  iProduct				2 Patriot Memory

  iSerial				 3 07981A0890713E03

# lsusb -v -s 001&#58;021 | egrep &#39;i&#40;Ma|Pr|Se&#41;&#39;

  iManufacturer		   1 OCZ Technology

  iProduct				2 RALLY2

  iSerial				 3 AA04012700341377
This reliable info is the one used in /dev/disk/by-id

$ ls -l /dev/disk/by-id| egrep &#39;&#40;RALLY2|Patriot&#41;.*0 -&#39;

usb-OCZ_RALLY2_AA04012700341377-0&#58;0 -> ../../sdc

usb-_Patriot_Memory_07981A0890713E03-0&#58;0 -> ../../sdb
So another mean of getting the precious -usbdevice host:0325:ac02 you need to feed in kvm is

$ udevadm info -q property --name /dev/sdc | grep &#39;ID=&#39; 

ID_VENDOR_ID=0325

ID_MODEL_ID=ac02
Sorry for this a little bit out of topic and long post, but it may help somebody using qemu|kvm while testing an USB boot stick.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users