LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   NTLDR is missing (https://www.linuxquestions.org/questions/linux-newbie-8/ntldr-is-missing-901052/)

porphyry5 09-04-2011 11:09 AM

NTLDR is missing
 
The only OS on my desktop is Slackware 13.1, which has been loading normally from /dev/sda1 for the last 5 months.
Yesterday it would not load, giving the message
Quote:

NTLDR is missing
Press Ctrl-Alt-Del to restart
Doing so produced
Quote:

Disk error
Press any key to restart
It boots just fine from the dvd.

Checked lilo.conf, all as it should be; ran lilo; no difference.
Checked BIOS setup, looked normal but restored defaults anyway; no difference.
Reinstalled Slackware 13.1; no difference.
The output from fdisk -l appears normal
Quote:

root fdisk -l

Disk /dev/sda: 73.4 GB, 73407488000 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008b7f7

Device Boot Start End Blocks Id System
/dev/sda1 * 1 8924 71681998+ 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
1 heads, 63 sectors/track, 15504336 cylinders
Units = cylinders of 63 * 512 = 32256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00a861f5

Device Boot Start End Blocks Id System
/dev/sdb1 * 2 15504256 488384032+ 7 HPFS/NTFS

Disk /dev/sdc: 16.0 GB, 16026435072 bytes
64 heads, 32 sectors/track, 15283 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6f20736b

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdc1 ? 379950 937327 570754815+ 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sdc2 ? 82368 1027695 968014120 65 Novell Netware 386
Partition 2 does not end on cylinder boundary.
/dev/sdc3 ? 913029 1858355 968014096 79 Unknown
Partition 3 does not end on cylinder boundary.
/dev/sdc4 ? 1409025 1409052 27749+ d Unknown
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
root
Suggestions?

kilgoretrout 09-04-2011 12:18 PM

That's a windows error message you are getting; NTLDR is part of the the windows bootloader system and the error message is what you get when it gets corrupted or overwritten. Post your lilo.conf. Was windows ever installed on any of your hard drives?

jefro 09-04-2011 12:34 PM

Overlapping partitions maybe.

porphyry5 09-04-2011 01:31 PM

Quote:

Originally Posted by kilgoretrout (Post 4461267)
That's a windows error message you are getting; NTLDR is part of the the windows bootloader system and the error message is what you get when it gets corrupted or overwritten. Post your lilo.conf. Was windows ever installed on any of your hard drives?

Below is lilo.conf. I assume this machine had windows on it when first sold, but it had ubuntu when I bought it, which I replaced with slackware. I've never put windows on it, and I've made no changes to lilo.conf since June. I know NTLDR is from windows, which made me think the problem came from the BIOS, which is still the original setup.
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# 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
# End LILO global section
# Windows bootable partition config begins
other = /dev/sdb1
  label = Windows
  table = /dev/sdb
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda1
  label = Linux
  read-only
# Linux bootable partition config ends


yancek 09-04-2011 02:20 PM

You have two hard drives, one with a single Linux partition and another 500GB drive with a single windows partition. What's that? A data partition? Do you see the Lilo boot menu when you initially boot the machine? What options show? Which drive is set to first boot priority in the BIOS?

porphyry5 09-04-2011 02:28 PM

Quote:

Originally Posted by yancek (Post 4461371)
You have two hard drives, one with a single Linux partition and another 500GB drive with a single windows partition. What's that? A data partition? Do you see the Lilo boot menu when you initially boot the machine? What options show? Which drive is set to first boot priority in the BIOS?

The 500gb is an external hard drive. It does not show the Lilo boot menu, the disk error message appears first, which is why I checked the BIOS setup. Boot priority is standard, floppy, cd, /dev/sda1.

yancek 09-05-2011 09:48 AM

Your lilo.conf file shows an entry for windows and Linux.

Quote:

other = /dev/sdb1
label = Windows
table = /dev/sdb
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Linux
read-only
It also shows the information below:

Quote:

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
Since the first entry line is commented out, I would expect it to try to boot the first entry which is windows.
You don't indicate what you have on the external drive, ntfs data?
I would think that moving the Linux entry up before the windows entry would work but I haven't used Lilo for years so that is just a guess.
On the other hand, since you said you don't even see the Lilo boot menu, I don't see how that would work. The windows error message would be coming after the BIOS tries to access boot files on the drive.

If you have a Live CD you can use, you could google bootinfoscript, read the documentation on how to run it, run it and post it here as it will provide a lot of information on your systems and boot files.

kilgoretrout 09-05-2011 12:11 PM

Quote:

The only OS on my desktop is Slackware 13.1, which has been loading normally from /dev/sda1 for the last 5 months.
Nonetheless, as yancek noted, your lilo.conf shows an entry for windows on sdb1 and you say sdb is an external hard drive with no windows installation on it. Here's what I think happened. Your 500GB sdb drive once had windows installed on it. The partitions may have been deleted, reformatted whatever, but the windows bootloader is still on the mbr of sdb. When you did your initial installation of slackware, sdb was not connected/powered up during the initial installation. At some point, you did something with sdb connected and powered up which caused a rescan of all your drives and a rewriting of lilo.conf. It may have been a kernel upgrade or other update. During that rescan, your system detected the presence of a windows bootloader on sdb and created a boot entry for it in lilo.conf in the first position. As yancek noted, your lilo.conf is configured to boot the first entry without delay. When that happens, the windows bootloader on sdb looks for a windows installation on sdb1; finding none, it spits out the standard NTLDR error message.
To correct this situation, just comment out these lines as shown, all of which are for loading a windows installation on sdb1:

#other = /dev/sdb1
#label = Windows
#table = /dev/sdb

Then the only entry in lilo.conf will be your slackware installation on sda1. In order for these changes to take effect, you will have to rewrite the changes in lilo.conf to the mbr which can only be done by running as root:

# lilo -v

If you are able to boot into slackware with the installation cd or by other means do so, make the changes to lilo.conf and run lilo -v to write the changes to the mbr. If you can't boot into slackware, boot with your livecd, mount the sda1 at say /media/sda1, make the changes to lilo.conf, and then run lilo -v from within a chroot environment by running the following commands as root:

# chroot /media/sda1 or whatever mount point you used for sda1
# lilo -v

Make sure lilo runs without error messages. The changes should now be effective and you should boot directly into slackware on sda1 on reboot.

porphyry5 09-05-2011 04:26 PM

I thank you both, kilgoretrout and yancek, unplugging the external hd solved the problem. It then went to the Slackware bootup logo, and I could start it normally. It must have been trying to find a valid MBR on /sdb1, which caused the generation of the error message. The mystery is why it began doing this, when its been quite happy loading from /sda1 for the last few months with /sdb1 plugged in all that time.


All times are GMT -5. The time now is 04:02 AM.