Click to See Complete Forum and Search --> : Tricky LILO situation
sploo22
07-02-2003, 09:58 PM
I recently managed to get my hands on an old 75MHz PC with no CD-ROM and am trying to get a basic Linux system up. I moved the hard disk into my good computer (Debian 3.0), made an ext2 filesystem on /dev/hdc1, and copied /bin, /sbin, /boot and /etc across. The problem is, once I put the drive into the old computer it will be hda and not hdc.
I edited the top of lilo.conf to look like this:
boot=/dev/hdc1
root=/dev/hda1
but when I boot it gives me this message:
L 40 40 40 40 40.....
with one "40" appearing every 30 seconds. Any ideas?
Check this (http://www.linuxgazette.com/issue55/tag/8.html). That's how a lilo.conf should look.
boot= is not used. It seems that you forgot to add the label and root options, to boot up that partition.
mdwatts
07-03-2003, 07:53 AM
You need to make the HD assignment changes in both your bootloader config (/etc/lilo.conf) and /etc/fstab.
It might have been easier to at least change /etc/fstab while the HD was still in the other computer.
sploo22
07-03-2003, 10:29 AM
I did edit lilo.conf; that was just the top of it. I have an entry for the image plus all the other settings the same as on my other computer, and I have edited fstab.
From the lilo.conf man page, I was under the impression that "boot=" determined on what disk partition LILO was installed.
mdwatts
07-03-2003, 10:53 AM
All you need to do is change EVERY reference of hdc to hda in /etc/lilo.conf and /etc/fstab. That is all.
And run /sbin/lilo (as root).
sploo22
07-03-2003, 01:47 PM
I'm not sure I understand what you mean. I want to install LILO on hdc, not hda, and I haven't gotten the "target" computer to boot at all (doesn't recognize any CD-ROM drives I've tried). I saw that there's an option called "install=XXX" in the man page; is that what I need?
Basically, the only problem is that the drive is referred to differently on the two computers. I read a HOWTO once that described this situation but I can't remember which one and I haven't found it in any of my searches.
mdwatts
07-03-2003, 01:54 PM
Sorry as I misunderstood.
You want to install the bootloader to the mbr of hdc? How will you boot as the system automatically looks for the boot record of the primary/master (hda) drive.
You need a bootloader installed on hda and then install the Linux bootloader (on hdc) into the boot/root partition and not the mbr of hdc.
Then you add a entry to boot Linux on hdc to the bootloader that is on hda.
Follow? :)
sploo22
07-03-2003, 03:43 PM
I used the Debian command "install-mbr" to write the bootloader to the MBR, and set it to load the boot record of the first partition. When the (old) computer boots with the hard drive in it, it displays the letters "MBR" showing that the MBR has been loaded correctly. Finally, it starts to load LILO, but apparently LILO is not finding the Linux partition properly.
Therefore, I need to install LILO onto hdc on my current computer, but have it look for the kernel and root filesystem on hda when it actually boots.
Sorry if I'm not being clear, clarity is not one of my strong points :)
mdwatts
07-03-2003, 03:52 PM
Could you please post the contents of your /etc/lilo.conf as you may require a map drive command.
map-drive = 0x81
to = 0x80
map-drive = 0x80
to = 0x81
lordhelmut
07-03-2003, 03:57 PM
Have you run 'lilo' after making changes to lilo.conf?
sploo22
07-03-2003, 03:58 PM
Yes, I did, with "lilo -C /mnt/etc/lilo.conf" (/mnt is where I mounted the other hard disk).
mdwatts, thanks for your help; I'm at school now but will post lilo.conf when I get home.
sploo22
07-06-2003, 04:53 PM
Update: Somehow, merely by swapping and replacing IDE drives, I managed to completely nuke my entire computer. (The good, working one!) I mean completely. As in, the BIOS startup screen doesn't even show up, no beeps, no nothing, and I have to hold the power button for 4 seconds to even turn it off.
mdwatts, serz and lordhelmut, thank you very much for taking the time to help me out, but the problem is now moot. Oh well... :rolleyes:
mdwatts
07-06-2003, 04:56 PM
Uh-oh !!
Checked all the internal cables/connections?
Removed the battery, waited a few seconds and replaced?
sploo22
07-06-2003, 05:12 PM
Double and triple-checked all the connections, but I hadn't thought of taking out the battery. Thanks, I'll try it!
mdwatts
07-06-2003, 05:17 PM
Have a look through your motherboard manual (if you have it). It may have other suggestions.
If clearing the CMOS (by removing the battery) doesn't work, it's possible that you zorked something other than the mobo. Reseat all of your cards and RAM first, and if that doesn't change things start removing components (NIC, sound card, RAM sticks, etc.) one by one and see if you can narrow it down that way.