| Booting from Compact Flash with lilo |
I do know how to boot with lilo. If you are still interesting just let me know. |
|
|
| RE: Booting from Compact Flash with lilo |
Its good to know you can boot the CF card with LILO, please provide more details. |
|
|
| RE: Booting from Compact Flash with lilo |
I installed lilo on CF yesterday. I do not make it your way. I make a normal install and add "noatime" in fstab. I don't want to have a RAM filled with file system image.
Anyway I hope that my work can be useful for you.
The problem is what BIOS and Kernel think about disk geometry.
The thing is that BIOS think that there are 255 heads! So we got L 02 02 error as lilo can't find the kernel. If I do understand exactly lilo writes in MBR a physical address of the kernel on disk and this is geometry dependent.
To partition your CF the right way you should invoke fdisk with -H flag: fdisk -H 255 /dev/hdc
This works for me. You can see what BIOS think about your CF in this way: lilo -t -v
This is how I make it work. |
|
|
| RE: Booting from Compact Flash with lilo |
Hi Andrei. You have actually given me some hope. Is your CF forrmated ext2 or 3? And if I have a 1gig CF should I use the command : fdisk -H 1023 /dev/hdc?
Thanks. Eric |
|
|
| Save settings on exit |
Does anyone have an idea how to configure the system decribed here to save any file changes back to the CF when the system is halted or rebooted? |
|
|
| RE: Save settings on exit |
In order to save changes back, your cf card needs to be large enough to hold both a compressed and uncompressed copy of the disk image. Write a script to mount the cf card, mount the uncompressed image (as a loop device) backup changes (either copy /etc across or everything, or use rsync) then unmount the image, and compress it with gzip -c image > image.gz
If you want it to happen every time you shutdown, then call the backup script from the /etc/rc.d/rc.6 script which runs everytime you shutdown/reboot. Other distros might have the script in slightly different location/name |
|
|
| Making the CF bootable |
To make the CF bootable, there is still one little thing to do just before the syslinux /dev/hdc1 command. Use the: cat mbr.bin > /dev/hdc command just before the above one. This is mentioned in the syslinux documentation.
Where mbr.bin can be found in the syslinux software package(at least, in 3.11). Not doing so results in "Missing operating system" messages when trying to boot only with the CF inside. |
|
|
| RE: Making the CF bootable |
I only think you need to do this if your CF card doesn't have a working MBR, or if you've broken the MBR. I've never used a CF card that needed to have it's MBR reset before it would boot. |
|
|
| RE: Save settings on exit |
> backup changes (either copy /etc across or everything, > or use rsync) then unmount the image, and compress it with > gzip -c image > image.gz
May be better like this: 1. worked system in RAM /dev/ram0 2. mounted Compact Flash /dev/hda1 3. uncomperessed image 'n' mouted in /dev/ram2 The script on similarity FAM, watches changes on /etc, /root, $HOME or needed you catalog(s). Them write chenges on /dev/ram1 in /etc On the reboot or halt make: umount /dev/ram1 dd if=/dev/ram1 | gzip -9 > /mnt/cflash/initrd.gz #(/dev/hda1)
Thats all !!!
|
|
|
| ubuntu on 2GB CF Card |
I successfully installed ubuntu 5.04 on a 2GB CF Card ..no other hard drive! works perfectly except on start up, it take about 8 tries before the CF Card is recognize by ubuntu : hda: drive not ready for command I also removed some software like openoffice to reclain 754mb of space. |
|
|