Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-23-2008, 11:30 PM   #1
Registered: May 2008
Posts: 227

Rep: Reputation: 30
Updating LILO version


I have an embedded device that has LILO 22.3.1 that I wish to update to the latest 22.8.

I have the 22.8 source code and I've compiledit statically using "make alles" under a Mandriva 2008.0 setup. Since I won't be installing it to the Mandriva setup but rather to a separate image file that I will be writing over to the device, I'm wondering which files go where in the file system?

I know lilo and mkrescue goes to /sbin, goes to /usr/sbin. However I'm not sure where the boot.b, chain.b, and map files are. I currently have these files in the embedded device's /boot directory, which I'm guessing needs to be replaced.

Also, there are 3 files, diag1-3.img in the lilo source directory after building, which I'm also guessing must be copied somewhere.

Also, do I just run lilo in the device after copying the files to complete the install?

I've looked at the Makefile but I'm still confused. Can anyone help me?

Old 11-24-2008, 03:00 AM   #2
Senior Member
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Looking at my Debian system, bootsect.b is in /usr/lib/lilo/. There may be a lilo configuration parameter which sets the default directory to be checked for the .b files.

You may want to put some .bmp files into /boot as well.

If your device has a CompactFlash card you can actually update it on another x86 machine; otherwise you need to log in, make sure you can write to the storage device, and run lilo.

When installing to a CF via another machine, you just need to make up a special lilo.conf; it will be similar to what is on your embedded system except for the following:

1. the 'boot=' parameter of course must be different, because that is where you install lilo
2. the kernel and initrd lines must also be different; for example, instead of:
you will have:
The actual partition with the 'boot' directory *must* be mounted somewhere so lilo can work with it. (In contrast, with 'grub', it must *not* be mounted.)

Now for a trap; unless you use a patched version of lilo, you must be careful when specifying the "init=" argument (if you need to specify it). For an initrd (deprecated) it is simply "init=whatever", but for an initramfs (current, and people seem to refer to it consistently as initrd now) you need "rdinit=whatever". If you use the wrong "init=" argument you may see the image load, get uncompressed, and then the kernel hangs with "could not find init!"
Old 11-24-2008, 03:41 AM   #3
Registered: May 2008
Posts: 227

Original Poster
Rep: Reputation: 30

Actually my embedded device isn't really embedded in the sense that it's actually a SATA storage device with a regular Linux kernel 2.6 running in it. It does not even have initrd, it's "init" is simply a text interface program that I've written that. The device is supposed to plug and play with any PC/laptop(or at least, as many as possible).

Right now I'm compiling lilo in my my development PC that's running Mandriva. I then mount the disk image of my device in a directory of my dev PC. Finally I copy lilo, mkrescue and to the respective directories in the mounted image, while leaving my previous boot.b, chain.b and map files in the image's /boot directory. After that I copy the image back to the device, and boot up with it. However, when I try to run lilo, it gives me the error
Ill-formed boot loader; no second stage section

So I'm guessing something else needs to be copied/modified, or I can't just compile lilo on 1 drive and copy the binaries to another drive?
Old 11-24-2008, 09:59 PM   #4
Registered: May 2008
Posts: 227

Original Poster
Rep: Reputation: 30
anyone has an idea?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
updating Kernel from version 2.6.9 to version 2.6.19 varala_kanth Linux - Kernel 1 01-18-2007 03:21 AM
Error output with LILO while updating my lilo.config adilturbo Linux - General 4 10-17-2006 04:10 PM
LILO warning after updating! Slovak Linux - General 1 12-17-2004 08:40 PM
Kernel Version and updating DMAN Linux - Software 2 01-16-2002 10:38 PM
Problem with Lilo not updating (yes I ran lilo after changing the conf) webguy Linux - General 2 06-24-2001 07:12 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration