LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-21-2004, 08:38 PM   #46
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31

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?
 
Old 12-21-2004, 09:03 PM   #47
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
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#
 
Old 12-21-2004, 09:06 PM   #48
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Code:
boot = /dev/hda
This instructs lilo to install to the MBR.

Code:
boot = /dev/hda3
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?
 
Old 12-21-2004, 09:19 PM   #49
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
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....
 
Old 12-21-2004, 09:22 PM   #50
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
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
 
Old 12-21-2004, 09:35 PM   #51
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
If you do what?
Quote:
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:
Code:
dd if=/dev/hda3 of=/tmp/bootsect.lnx bs=1 count=512
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.

Last edited by DaHammer; 12-21-2004 at 09:40 PM.
 
Old 12-21-2004, 09:47 PM   #52
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
ok, i changed the hda to hda3 again, but now im not even getting a warning anymore, im still getting an error.

Fatal: open /dev/sda: Read-only file system

i don't know why its still pointing to sda now, when i don't even have any scsci/s-ata drives
 
Old 12-21-2004, 09:54 PM   #53
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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:
Code:
# LILO configuration file
# 
boot="/dev/hda3"
prompt
timeout="50"
vga="773"

# Default kernel
image = "/boot/vmlinuz-2.6.9"
  root = "/dev/hda3"
  label = "Linux-2.6.9"
  read-only

image = "/boot/vmlinuz-2.6.8.1"
  root = "/dev/hda3"
  label = "Linux-2.6.8.1"
  read-only

image = "/boot/vmlinuz-2.6.7"
  root = "/dev/hda3"
  label = "Linux-2.6.7"
  read-only

image = "/boot/vmlinuz-2.4.27"
  root = "/dev/hda3"
  label = "Linux-2.4.27"
  read-only
  append="hdc=ide-scsi"

# Linux bootable partition config ends

Last edited by DaHammer; 12-21-2004 at 10:00 PM.
 
Old 12-21-2004, 09:58 PM   #54
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
here's lilo.conf , no mention of sda anywhere..

[/code]

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda3
#compact # faster, but won't work on all systems.
prompt
timeout = 300
# 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/hda3
label = Linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = /boot/vmlinuz.old
root = /dev/hda3
label = slack.old
read-only
# Linux bootable partition config ends

[/code]
 
Old 12-21-2004, 10:06 PM   #55
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.
 
Old 12-21-2004, 10:08 PM   #56
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
No, im editing lilo.conf from linux, not windows, but if you want i can try putting quotes anyways
 
Old 12-21-2004, 10:18 PM   #57
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.

Last edited by DaHammer; 12-21-2004 at 10:21 PM.
 
Old 12-21-2004, 10:25 PM   #58
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
ok, here is the output from lilo -t -v

Code:
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#
 
Old 12-21-2004, 10:27 PM   #59
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,181

Original Poster
Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
ps, I DID enclose everything in quotes like you said in my lilo.conf

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda3
#compact        # faster, but won't work on all systems.
prompt
timeout = "300"
# 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/hda3"
  label = "Linux"
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
image = "/boot/vmlinuz.old"
  root = "/dev/hda3"
  label = "slack.old"
  read-only  
# Linux bootable partition config ends
 
Old 12-21-2004, 10:53 PM   #60
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.


Last edited by DaHammer; 12-21-2004 at 11:04 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 12:58 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 03:28 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration