LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-31-2003, 11:36 PM   #1
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Rep: Reputation: 0
LILO Problem in New Year


i install Debian Linux on /dev/sda
and i install Windows XP on /dev/hda1

but i tried to edit my /etc/lilo.conf to boot Windows XP
it always can't
how come?
 
Old 01-01-2004, 12:09 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Post the contents of your file /etc/lilo.conf

I suspect you set the location of the MBR as /dev/hda1 instead of /dev/hda

Have a look at this ->

Code:
# DOS bootable partition config begins
other = /dev/hda1
  label = Windoze
  table = /dev/hda
 
Old 01-01-2004, 12:19 AM   #3
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hda
# bios=0x81

#disk=/dev/sda
# bios=0x80

# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/sda

# Specifies the device that should be mounted as root. (`/')
#
root=/dev/sda1

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller. Using `compact' is especially recommended when
# booting from a floppy disk. It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: bmp, compat, menu and text
# Look in /boot/ and in lilo.conf(5) manpage for details
#
install=/boot/boot-menu.b

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration. If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well. Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20

# You can put a customized boot message up if you like. If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress. `single-key' goes with the `alias' lines in the
# `image' configurations below. eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
prompt
timeout=150
# prompt
# single-key
# delay=100
# timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
vga=normal

# Kernel command line options that apply to all installed images go
# here. See: The `boot-prompt-HOWO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""

# Boot up Linux by default.
#
default=2.4.22-ac4

image=/vmlinuz
label=bf2.4.18
read-only
# restricted
# alias=1

image=/boot/bzImage-2.4.22-ac4
label=2.4.22-ac4
read-only
append="mem=1024M hdd=ide-scsi"

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2

# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.

other=/dev/hda1
label="WinXP(hda1)"
table=/dev/hda
 
Old 01-01-2004, 12:40 AM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
After you edited LILO, did you run /sbin/lilo
 
Old 01-01-2004, 12:42 AM   #5
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
looks like lilo is having problem with 2 hard disk config
 
Old 01-01-2004, 02:13 AM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
I have 2 hard disks and LILO doesn't have a problem with it. Which did you install first - Debian or Windows XP?

Did you install LILO to the MBR or to / (the Linux root partition)?

Also please post the output of
# fdisk -l (lower case L) as root
and
df -h

Did you recompile the kernel after your initial install? And you didn't answer, if you ran /sbin/lilo after making changes to LILO.
 
Old 01-01-2004, 02:26 AM   #7
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
of coz i did /sbin/lilo <-- everyone knows this

i install Debian first and then Windows XP

Disk /dev/sda: 18.3 GB, 18351959040 bytes
255 heads, 63 sectors/track, 2231 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 637 5116671 83 Linux
/dev/sda2 638 642 40162+ 83 Linux
/dev/sda3 643 2231 12763642+ f W95 Ext'd (LBA)
/dev/sda5 643 1279 5116671 83 Linux
/dev/sda6 1280 1891 4915858+ 83 Linux
/dev/sda7 1892 2197 2457913+ 83 Linux
/dev/sda8 2198 2231 273073+ 82 Linux swap

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 9728 57657285 f W95 Ext'd (LBA)
/dev/hda5 2551 6629 32764536 b W95 FAT32
/dev/hda6 6630 9728 24892686 b W95 FAT32

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdb2 2551 9729 57665317+ f W95 Ext'd (LBA)
/dev/hdb5 2551 5100 20482843+ b W95 FAT32
/dev/hdb6 5101 7650 20482843+ b W95 FAT32
/dev/hdb7 7651 9729 16699536 b W95 FAT32

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.9G 1.3G 3.7G 26% /
/dev/sda2 35M 7.7M 27M 23% /boot
/dev/sda5 4.9G 2.9G 2.1G 59% /usr
/dev/sda6 4.7G 3.2G 1.6G 67% /var
/dev/sda7 2.4G 1.9G 482M 80% /home
/dev/hda1 20G 4.0G 16G 20% /mnt/XP_System
/dev/hda5 32G 21G 11G 66% /mnt/Storage1
/dev/hda6 24G 592K 24G 1% /mnt/Storage2
/dev/hdb1 20G 15G 4.8G 76% /mnt/Appz
/dev/hdb5 20G 14G 6.2G 69% /mnt/MoviesMP3
/dev/hdb6 20G 12G 7.9G 60% /mnt/Privated
/dev/hdb7 16G 12G 4.8G 71% /mnt/Misc
 
Old 01-01-2004, 03:13 AM   #8
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by samxiao
of coz i did /sbin/lilo <-- everyone knows this
You are in error - everyone does not know this. You will find in these forums where that one command has fixed many LILO boot problems.

Quote:
i install Debian first and then Windows XP
You should install Windoze first, and then Linux. Windoze XP probably wrote over the MBR. Try this specific link ->
http://www.tldp.org./HOWTO/LILO-2.html#ss2.1

Quote:
Disk /dev/sda: 18.3 GB, 18351959040 bytes
255 heads, 63 sectors/track, 2231 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 637 5116671 83 Linux
/dev/sda2 638 642 40162+ 83 Linux
/dev/sda3 643 2231 12763642+ f W95 Ext'd (LBA)
/dev/sda5 643 1279 5116671 83 Linux
/dev/sda6 1280 1891 4915858+ 83 Linux
/dev/sda7 1892 2197 2457913+ 83 Linux
/dev/sda8 2198 2231 273073+ 82 Linux swap

Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/hda2 2551 9728 57657285 f W95 Ext'd (LBA)
/dev/hda5 2551 6629 32764536 b W95 FAT32
/dev/hda6 6630 9728 24892686 b W95 FAT32

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/hdb2 2551 9729 57665317+ f W95 Ext'd (LBA)
/dev/hdb5 2551 5100 20482843+ b W95 FAT32
/dev/hdb6 5101 7650 20482843+ b W95 FAT32
/dev/hdb7 7651 9729 16699536 b W95 FAT32

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.9G 1.3G 3.7G 26% /
/dev/sda2 35M 7.7M 27M 23% /boot
/dev/sda5 4.9G 2.9G 2.1G 59% /usr
/dev/sda6 4.7G 3.2G 1.6G 67% /var
/dev/sda7 2.4G 1.9G 482M 80% /home
/dev/hda1 20G 4.0G 16G 20% /mnt/XP_System
/dev/hda5 32G 21G 11G 66% /mnt/Storage1
/dev/hda6 24G 592K 24G 1% /mnt/Storage2
/dev/hdb1 20G 15G 4.8G 76% /mnt/Appz
/dev/hdb5 20G 14G 6.2G 69% /mnt/MoviesMP3
/dev/hdb6 20G 12G 7.9G 60% /mnt/Privated
/dev/hdb7 16G 12G 4.8G 71% /mnt/Misc
You actually have 3 hard disks, and they all have a bootable partition. You only need to have /dev/hda1 marked as bootable, and then install LILO in the MBR.

So, the question still remains - where did you install LILO? I think you have LILO installed in /dev/sda rather than in the MBR, which is now on /dev/hda with Windoze. And am I correct that hdb us just a storage drive, and has no OS?
 
Old 01-01-2004, 03:16 AM   #9
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
/dev/hdb is for storage
/dev/hda has Windows on it..
/dev/sda <-- i install MBR in there
how do i config lilo and install MBR in /dev/hda and overwrite the Windows one

i dun have a choice to install Windows XP at first, this is what i got
so how do i config my /etc/lilo.conf and install MBR in /dev/hda instead of /dev/sda
thanks
 
Old 01-01-2004, 04:15 AM   #10
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by samxiao
/dev/hdb is for storage
/dev/hda has Windows on it..
/dev/sda <-- i install MBR in there
how do i config lilo and install MBR in /dev/hda and overwrite the Windows one

i dun have a choice to install Windows XP at first, this is what i got
so how do i config my /etc/lilo.conf and install MBR in /dev/hda instead of /dev/sda
thanks
By the way, what do you mean by "but i tried to edit my /etc/lilo.conf to boot Windows XP it always can't how come?" Maybe we've missed something else.

Windows XP has a bootloader which was installed into the MBR when you installed Windows XP last. I believe you have the LILO bootloader installed in /dev/sda1, so that it never sees the Windows XP bootloader. The method I like is to install Windows first, and let it write it's bootloader to the MBR of the hard drive it's on - in my case it's /dev/hda. Then I will install the Linux distribution, and when I do, I install LILO in the MBR. Then LILO gets a choice to load the Windows OS, which of course, has the bootloader in the MBR.

What is the brand of your motherboard? I use Asus, and they have a unique feature, which I don't think any other mobo has. When you reboot the computer, just after the POST screen you can hit the ESC key for 1 second and get a screen which gives you a choice of boot devices. It's very tricky to hit the key at just the right time. If you do, you can choose the first hard drive, which will be your /dev/hda and that should boot your Windows XP - proving that the MBR is intact. If you get there and it doesn't boot XP, then you have another problem.

I used to run Debian, but I'm not at the moment. So therefore, the instructions I am going to give you would work for Slackware, but I can't say they will for Debian. That issue of the boot mapping in Debian is what may be different. You can learn all you need to know about this by reading your /etc/lilo.conf file and the link about LILO at TLDP that I gave you.

However, if you were running Slack, and assuming this will work in Debian, exit your X window system and get to the console. Then login as su. Next, run cfdisk /dev/sda and when it comes up, change that bootable partition. It will have /dev/sda marked as bootable, and you just enter on the choice that says [Bootable] and the word Bootable in that top line will disappear. Then you must choose [Write] and then type yes. After that, just choose [Quit]. Next, run cfdisk /dev/hdb and do the same procedure on it. This should make only /dev/hda as your bootable partition, which is where your Windoze MBR is located. Now run /sbin/lilo and if there are no errors, then reboot.

I'd search in the Debian forums, and read that article from The Linux Documentation Project before I did this, however. It might make your system unbootable.

What is /dev/sda anyway? Is that a USB drive? I say this because I mount things such as my USB Flash disk, and USB hard drive, by mount /dev/sda1 /mnt/<devicename>

You can find the answer, if mine is not correct, by searching and reading. I think you can change those bootable labels that I told you, and then probably run the cfdisk utility from your Debian CD, and then install LILO into the MBR with the CD.

Read some before you take those steps. As I say, in Slack the boot images are in the /boot directory, but I don't remember exactly what Debian does with that.
 
Old 01-01-2004, 12:38 PM   #11
samxiao
LQ Newbie
 
Registered: Dec 2003
Posts: 14

Original Poster
Rep: Reputation: 0
thx, looks like i need to fix the lilo myself
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
year 2038 problem masand Linux - News 11 04-08-2005 11:23 PM
Lilo vs Grub - PROBLEM with lilo nelsonnery Linux - Software 2 09-09-2004 12:09 PM
problem with Year net card of 8RDA+ nisten Linux - Networking 0 07-19-2003 05:04 AM
10 year newbie here, nvidia problem jack gardener Linux - Software 5 12-10-2001 09:21 AM
Problem with Lilo not updating (yes I ran lilo after changing the conf) webguy Linux - General 2 06-24-2001 08:12 PM


All times are GMT -5. The time now is 12:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration