SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Have you tried lilo -C /etc/lilo.conf? It is possible that your lilo is, for some utterly crazy reason, using a different lilo.conf than the one you're editing?
I don't know...I haven't even done anything major to the system, i have used swaret to upgrade some stuff, but not to current, im not running anything that current, and the only big thing i have done was obviously recompile the kernel anyways , here the output of lilo -C
root@hideyoshi:/home/samurai# lilo -C /etc/lilo.conf
Fatal: open /dev/sda: Read-only file system
root@hideyoshi:/home/samurai#
This instructs lilo to install to the "root" of the 3rd partition of hda.
Either will work when set up properly, but I'm confused as to which you want. Back a few posts you mention using "bootsect.lnx" which leads me to believe that you're dual-booting WinNT/2K/XP and wanting to use Window's bootmanager to boot linux. So which is it?
If i do that, how can i be sure I will be able to start windows? my active partition is NTFS, and lilo doesn't even reside in the MBR..windowsNTLoader does, and i boot to linux from a menu from the NTLoader....
Dahammer, I am dual booting, and I want to KEEP the windowsNT boot loader as the default bootloader, because I have tried installing lilo on the MBR, but I always get an error, so the only way i can boot into linux in the first place is to keep the NTLoader as is, and install lilo on the root partition of ext3
my active partition is NTFS, and lilo doesn't even reside in the MBR..windowsNTLoader does, and i boot to linux from a menu from the NTLoader....
Ok, herein lies the problem. You are using the NT bootloader to boot linux from a file "bootsect.lnx", yet when you run lilo from Linux your lilo.conf is setup for installing lilo to the MBR, not the root of the drive.
I'm surprised that you can still boot Windows after instructing lilo to install to the MBR. Anyway, edit your lilo.conf file, change:
Code:
boot = /dev/hda
to
Code:
boot = /dev/hda3
Then run lilo. You shouldn't get any errors, but it may warn you that your root partition is not active, that's ok. If no erros, then run this command:
Now you need to get /tmp/bootsect.lnx onto your Windows drive at C:/. Since you have an NTFS paritition, the easiest way to do that would probably be to mount a dos formated floppy and copy it to it, then boot into Windows.
Code:
mount /dev/fd0 /mnt/floppy
cp /tmp/bootsect.lnx /mnt/floppy
umount /dev/fd0
This assumes that the folder /mnt/floppy exists, if it does not, then create it or substitute where your normally mount floppies instead.
Now boot into Windows, place the floppy in and copy bootsect.lnx onto C:/. You should probably rename the bootsect.lnx file that is already there first, so you have it just in case. I assume you have already edited boot.ini since you are already booting this way.
Now reboot and select Linux or whatever from the NT bootmanager's list. You should get a lilo bootloader prompt now that contains both kernels.
PS: Always remember to recreate and copy a new bootsect.lnx file when using the NT bootmanager to boot Linux. If you don't copy the new bootsect.lnx file to C:/ then Windows will use the old one which is there and that old one contains an image of lilo as it was when it was created not as it is now.
Well /dev/sda is sometimes used in scsi emulation for USB devices like flash cards, cameras, and etc. But yeah, that's crazy. There is no reason for lilo to be trying to access /dev/sda unless you tell it too in the lilo.conf. You sure you dont have a typo in it somewhere? Repost it and enclose it in the [ code] tags [ /code], for easier reading.
BTW, one of my boxes is setup exactly the same way (ie uses XP's bootmanager). Here's it's lilo.conf for reference:
Ok, try enclosing things in quotes as they are in mine. I don't think that's it though. You are using an editor within Linux to edit lilo.conf, correct? The reason I ask is that editing the file with a Windows editor will mess up the linefeeds in the file which could very well cause problems when lilo parses the file.
Yeah, try the quotes and then run lilo with the -t -v option, like this:
Code:
root@corvette:~# lilo -t -v
LILO version 22.5.7.2 (test mode), Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2003 John Coffman
Released 20-Aug-2003 and compiled at 19:15:26 on Aug 25 2003.
Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda3
Warning: Kernel & BIOS return differing head/sector geometries for device 0x80
Kernel: 65535 cylinders, 16 heads, 63 sectors
BIOS: 1024 cylinders, 255 heads, 63 sectors
Warning: Kernel & BIOS return differing head/sector geometries for device 0x81
Kernel: 65535 cylinders, 16 heads, 63 sectors
BIOS: 1024 cylinders, 255 heads, 63 sectors
Warning: Partition 3 on /dev/hda is not marked Active.
Using MENU secondary loader
Calling map_insert_data
Boot image: /boot/vmlinuz-2.6.9
Added Linux-2.6.9 *
Boot image: /boot/vmlinuz-2.6.8.1
Added Linux-2.6.8.1
Boot image: /boot/vmlinuz-2.6.7
Added Linux-2.6.7
Boot image: /boot/vmlinuz-2.4.27
Added Linux-2.4.27
The boot sector and the map file have *NOT* been altered.
The -t options runs lilo in test mode, nothing actually changes. The -v option gives you a little more insight as to what it's doing. The post the output. BTW, to enclose in code tags, use a [ code] (no space after the [) at the top and a [ /code] at the bottom (no space after the [), with what you want enclosed in between.
root@hideyoshi:/home/samurai# lilo -t -v
LILO version 22.5.9 (test mode), Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.
Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda3
Fatal: open /dev/sda: Read-only file system
root@hideyoshi:/home/samurai#
Hmm, looking back I see that the /dev/sda issue first appeared after you were instructed to change "boot = /dev/hda3" to "boot = /dev/hda" and rerun lilo. Doing that caused lilo to try to install itself to the MBR. If it had been successful then you could no longer boot Windows because it would have overwritten the NT bootmanager in the MBR. So apparently something went haywire with that. You could try uninstalling it.
lilo -u
If you have your Windows CD so that you can use it's repair utility. You could also try removing it from the MBR, since you tried installing it there before.
lilo -u /dev/hda
Don't do that 2nd one though unless you can fix the MBR from the CD, cause it may screw it up so that can't boot windows otherwise.
After uninstalling it, try running it again with the -t and -v options to see if the /dev/sda deal goes away.
Something else you can do is use strace to trace the lilo process and try and figure out exactly where it's trying to access /dev/sda and why. Run it like this:
Code:
strace lilo -t -v 1> /tmp/lilotrace.txt 2>&1
This will trace lilo as it runs and write everything it does to /tmp/lilotrace.txt. You should be able to look through the file and find exactly where it accesses /dev/sda, and maybe figure out why. You'll also be able to see which lilo.conf file it using and etc. Beyond that, I'm not sure what to tell you at the moment. You may have to remove the MBR from a DOS bootdisk with "fdisk /mbr" and/or repair it from the Windows CD in order to fix this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.