Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am currently developing a new distro from code. On my development machine, I have my base system on hda1 and my development system on hdb1.
Now, when I try to boot my development system from LILO, it uses the kernel from /boot on hda1, not the kernel from /boot on hdb1. What is the problem?
This is my lilo.conf file:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
#compact # faster, but won't work on all systems.
prompt
timeout = 50
# VESA framebuffer console @ 800x600x64k
vga = 788
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda1
label = Linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
append = "console=tty0 console=ttyS0"
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root =/dev/hdb1
label = Mini-Slack
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
#append = "init=/sbin/init"
# Linux bootable partition config ends
I am not sure what you are asking, but I will try to answer as best I can :
When your computer boots, AFAIK, nothing is mounted and all LILO does is point the CPU at the kernel so it can start executing (Sorry, I don't really know a lot about this, perhaps you could ask a lilo dev for more info?) So, as long as lilo knows which kernel you are talking about when you write lilo to the MBR, it doesn't matter what is mounted where - lilo can get it. (Notable exception - I believe you need a special BIOS to run kernels off network drives)
If you've ever had to run lilo from knoppix you'll know what I am talking about - to successfully write it to MBR, you have to change all paths from /boot/* to /mnt/hdx/boot/* (of course, after doing this a couple of times, I have found the -r option, which is very helpful when fixing a broken lilo from boot disk)
Now, I can't be sure if any of that made sense (sorta tired), so I'll just re-phrase my last line
Assuming of course, the hdb1 is mounted at /mnt/hdb1 when you run /sbin/lilo
*EDIT* I must be tired, LILO is writen to MBR, NOT the BIOS
Ok, I just rewrote my lilo.conf to point to the kernel on the second HDD:
image=/mnt/target/boot/vmlinuz
Now, when I actually run /sbin/lilo, it doesn't complain about the file not being there (assuming HDB1 is mounted to /mnt/target), but when I actually boot the system, LILO gives the error 0x01 (illegal command).
I don't think you can tell LILO to boot a kernel that is on a mounted drive, since that mount isn't going to exist when the system boots, and LILO isn't going to be able to locate the kernel.
Does anybody else have any experience with this kind of thing?
I don't think you can tell LILO to boot a kernel that is on a mounted drive, since that mount isn't going to exist when the system boots, and LILO isn't going to be able to locate the kernel.
Well, either I'm superman and can do the impossible, or you can, because I have done it before.
And to follow that logic through, you shouldn't be able to boot ANY kernel, because your root partition is simply mounted at / (instead of /mnt/*)
try lilo -v and see if you get any error messages.
mount ur /hdb1 partition and go to the /boot directory there. From there, copy the vmlinuz.xxxx and the initrd.XXXX.img file into the /boot directory of hda1.
And in your lilo.conf, you will need to write the complete thing instead of just vmlinuz.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.