DIY Digital Picture Frame: Part 2 (lilo.conf)

I started with the lilo.conf from the /etc/lilo.conf, and customized it from there. I changed the layout from the cdrom slightly – instead of having the files under /boot/XXXXXX, I copied everything into /boot.

I don’t remember all the changes, and honestly I don’t feel like looking up the starter lilo.conf, but I will go through what I am currently using:

# /etc/lilo.conf – See: `lilo(8)’ and `lilo.conf(5)’,

lba32
boot=/dev/hda
install=/boot/isolinux.cfg
backup=/dev/null
map=/boot/map
timeout=30
vga=791
default=Knoppix

image=/boot/linux24
append=”lang=us hda=scsi initrd=/boot/minirt24.gz noicons nomce noapm nopcmcia noapic noagp noswap noddc quiet restore=hda1 BOOT_IMAGE=knoppix BOOT_IMAGE=linux24″
initrd=/boot/minirt24.gz
root=/dev/hda1
label=Knoppix
read-only

Some of the options may be different, based on your particular computer – I am pretty sure that it customizes the lilo.conf a little based on what it finds. Some of the more interesting things are:

install – I had to change this to point to the right place in /boot.

map – honestly not sure what this is for, but it is an output file, so don’t stress that you cannot find boot.map before running lilo. A real map is generated on the fly at boot time, so this could probably be deleted after lilo.conf is run, but it is small, so I have not tried to do this.

vga – YMMV – this is the value that I used, which gives me 1024x768x64,000 – if you want need something different, based on your hardware, Google “vga lilo”, and you will get a lot of hits with tables to figure out what you want. I think this may actually only affect the screen size during boot up – once it got into X, it went to full size even when I had this set to a different value, one that only used up a small part of the screen.

image – had to change this entirely – pointed at vmlinuz, but after a lot of trial and error (I am a hack at this sys admin stuff, I only scrape by), I figured out the linux24 is the boot image that I needed.

append – this is the interesting part – this allows you to pass boot options to the Knoppix boot process. There was originally a vga=791 in here, but I had to take it out because lilo.conf choked all over it. First thing that I had to change was lang – it was set to German, which made things interesting when it booted the first time. Basically I had to boot from the cdrom again to fix that one 😉 There were quite a few hdx=scsi lines, I nuked all of them except for hda, since I am never going to have more than one “hard drive” in the system. I had to add initrd=/boot/minirt24.gz – I think this was what finally got me booting off the hard drive, with the system convinced that it was booting off the cdrom. You can look in the /cdrom/boot directory for the details on the noXXXX options, but I just pretty much turned everything off that I knew I was not going to need. For a future project, I am pretty sure that I am going to need pcmcia since it does not have a USB port, so I will obviously remove the nopcmcia option. The restore option I set to the hard drive – I am making the hard drive mounted read only, so it does not actually successfully back up on shutdown unless you change the mount options after booting – you may need to do this a couple of times until you get everything right. Even though the backup does not work all the time, since the option is there, once the backup is there – it will restore just fine, which is really all you want anyway, because once things are set, they are not going to changing, so you don’t need to back it up evertime that the system shutsdown cleanly. BOOT_IMAGE – yes two of them, and trust me on the order – you can play around later, but this way works.

initrd – not sure why this has to be there twice, but again, change at your own risk from the value that I have here.

root – needs to be set to the root partition – unless you are feel strongly about it, leave it be, and only set yourself up with one partition – it is not like this is a workstation or server, this is a embedded Linux appliance 😉

label – leave it be if you know what is good for you.

read-only – of course – that is the theme of this project!

Getting late, will make more entries later on the Perl script and the Compact Flash details. At this point I am really frustrated with the Compact Flash to IDE adapter details – it came with 44 pins, not 43, but of course the interface in the laptop has one of the pin holes filled in – Grr! Good old metal fatigue, 10 minutes of bending back and forth, and walah, no more pin. But of course it still does not quite line up correctly, a little high and a little left, so I need to go scrounge up a male to female 44 pin 2 inch ribbon from Fry’s tomorrow. I also need to post details on the other changes that I made to make the 7 in 4 USB adapter work.

Leave a Reply