LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   "Disk boot failure..." after lilo writes to the MBR (https://www.linuxquestions.org/questions/linux-hardware-18/disk-boot-failure-after-lilo-writes-to-the-mbr-255047/)

alexko 11-15-2004 07:29 AM

"Disk boot failure..." after lilo writes to the MBR
 
Hi,
following problem: I hah a WD harddisk with some 6 partitions, on the first the windows XP, on one another the debian linux. Yesterday I've decided to reinstall winXP (as often :)), everything wokred well. It owerworte the MBR (as always), so I caouldn't acces LILO. But then I've figured out, I can't boot even to winXP, when I've take out the winXP instalation-CD! In BIOS my boot order is set to:
1. floppy
2. CD
3. harddisk

As you know, when switching on the PC, the winXP installation-cd takes the "boot-opportunity" and waits a few seconds if any key is pressed. If not, it let boot the disk (due to my BIOS-settings) - and everything works ok.
The problem is, when I take out the CD - the Harddisk cant boot! "DISK BOOT FAILURE, INSERT SYSTEM DISK AND PRESS ENTER" appears on screen... confusing, isn't it..
However, I boot with Knoppix, to acces my linux and call "lilo" to owerwrite the MBR - in hope, that LILO does it's work well (and let me boot without the winXP install-CD). But no succes :( Now the situation looks like this:
I switch on the PC without the winXP CD and again - "DISK BOOT FAILURE, ..." appears. So I insert the CD and try again - everythings works OK - the CD waits a while, nothing is pressed, so the disk boots and the LILO screen appears!! (and I can use it to boot windows or linux, just how I wish)

BTW: I was surprised, that after the WIN XP installation I had to use the CD to boot... I've used this CD manytimes to install WIN XP to my disk... always succesfully - after instalation I dont need any CD's to boot, of course...

Any idea? Thx

kilgoretrout 11-15-2004 12:02 PM

Do you have more than one hard drive; it's not clear from your post. Also, post your lilo.conf and the commands you are using to write it to your mbr from knoppix.
Also check in knoppix and see if your windows install created any new partitions. Finally in knoppix, run this as root and post the output:

# fdisk -l

That should list all your partitions and let you know if there are any errors in the partition table.

jacobop007 11-15-2004 05:07 PM

did you uninstall LILO first?
 
Hi,

maybe it's of no use for WinXP (I'm sorry but got off the bus of MS in the '98 version, so I have little experience with XP), but I used to have problems when reinstalling Win98 if LILO was not unistalled prior to Windows touching the MBR (i.e., you should use /sbin/lilo -U first and then install XP .... or try to rebuild the MBR from the XP installation ... I do not if you have a rescue CD or whatever it has to get over this situations ... for XP, I mean, for the linux part of the Job, you may use this Knoppix-Live, mount your root partition from the HD and then run "lilo -U" (I guess you will have yo include any of LILO's options to tell him where the right "lilo.conf" is and so on ...).

I hope it helps. It saved me in the past ... do not think that it was so long ago ... now and again I still use my old MS-Win98 ... maybe when I really need it I will buy a more powerful box, enough to fit WindowsWhatever ...

Ciao.

Jacobo.

alexko 11-15-2004 07:00 PM

To jacobop007: i've tried already to uninstall the lilo (# lilo -u -s <the_original_mbr_saved_to_a_file> ) so the lilo really writes the windows-bmr back , but I have to boot still with cd! Without CD the "DISK BOOT FAILURE" message appears, with the CD it jumps (after waiting a few seconds for keypress) straight to winXP starting screen.

To kilgoretrout: I have only one harddrive. I can check my partitions (say '#fdisk -l') also from my debian: I can see all paritions as the were.. nothing changed (I mean, do I HAVE TO see it from Knoppix? Could it be different?)
I am pretty sure my lilo.conf is OK, because it's the lilo.conf I used for last three installations of XP, but maybe I'm wrong, I'm posting it..
Finally, my command for lilo while in knoppix are these:

mount /mnt/hda7 (my linux partition)
mount --bind /dev /mnt/hda7/dev
mount --bind /proc /mnt/hda7/proc
chroot /mnt/hda7
lilo

and lilo does everything as I am awaiting...

Ok, here is my lilo.conf

# Support LBA for large hard disks.
#
lba32

# Overrides the default mapping between harddisk names and the BIOS'
# harddisk order. Use with caution.
#disk=/dev/hde
# 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/hda

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

# 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

# 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=20
# 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=Linux-2.4.f
#default=WinXP

image=/boot/vmlinuz-2.6.3
label=Linux-2.6.3
read-only

image=/boot/vmlinuz-2.4.25
label=Linux-2.4.25
read-only

image=/boot/vmlinuz-2.4.floppy
label=Linux-2.4.f

image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1

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

other=/dev/hda8
label="grub(hda8)"

# 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"

kilgoretrout 11-15-2004 10:46 PM

Try editing the lilo windows entry like this:

other=/dev/hda1
label="WinXP"
table=/dev/hda

and rerun lilo with:

# lilo -v

That will give you a more verbose output from the lilo write. Note any error messages.

alexko 11-16-2004 06:40 AM

Thanx for reply, I did it like you said - nothnig's changed :( Still have to boot with CD.
I'm posting the lilo -v output, no errors, see below.
Seems like the MBR is written correcly and works properly, IF IT IS FOUND. The problem is - without the CD it's simply NOT found (the "DISK BOOT FAILURE.." message appears still)... I can't understand how the CD finds my MBR, while the BIOS does not :((
Nevertheless, I don't understand why this happened, because as I said - the winXP installation ran so many times ok (windows was bootable without the CD)...

phoenix:~# lilo -v
LILO version 22.6, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 02-Sep-2004, and compiled at 19:13:54 on Sep 13 2004
Debian GNU/Linux

Reading boot sector from /dev/hda
Using MENU secondary loader
Calling map_insert_data

Boot image: /boot/vmlinuz-2.6.3
Added Linux-2.6.3

Boot image: /boot/vmlinuz-2.4.25
Added Linux-2.4.25

Boot image: /boot/vmlinuz-2.4.floppy
Added Linux-2.4.f *

Boot image: /vmlinuz -> boot/vmlinuz-2.4.18-bf2.4
Added Linux

Skipping /vmlinuz.old
Boot other: /dev/hda8, loader CHAIN
Pseudo partition start: 181711278
Added grub(hda8)

Boot other: /dev/hda1, on /dev/hda, loader CHAIN
Added WinXP

Writing boot sector.
/boot/boot.0300 exists - no boot sector backup copy made.

kilgoretrout 11-16-2004 09:43 AM

Go into your bios setup and double check your boot order. Try moving the hard drive to the number one spot in the boot sequence.


All times are GMT -5. The time now is 01:09 AM.