Author Topic: mbr boot problem after update  (Read 3877 times)

jbike

  • Guest
mbr boot problem after update
« on: October 13, 2009, 08:04:13 PM »
This is a strange one, perhaps due to hd data corruption of the MBR. When I boot, the system stops at the video card memory check, then tries to go on, but ends up back at the video memory check... again and again ... an endless loop. fsck turns up nothing on the hd. I then tried to redo the mbr with Menu > System > Configuration > Boot and Init redoMBR  ... nothing works. Yet a live disk boots every time. I am just about ready to reinstall, but I thought I would ask if anyone had any encouraging words. Am I really erasing the mbr above? It seems to me that when I run the redo mbr command... the menu.lst is not pulled from my hd, but rather from the live disk somewhere. I have tried to save this both both places without any success. When I search the forum, I get suggestions that I have already tried. Again the data on the drive is safe and sound- I just cannot get it to boot.

any ideas? I have had zero problems with this machine (or pclos) since I built it 5 yrs ago. Until now. Maybe this is my excuse to upgrade ;D


Thanks,
Jbike
« Last Edit: October 14, 2009, 01:51:27 PM by jbike »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: mbr boot problem after update
« Reply #1 on: October 14, 2009, 01:42:04 AM »
This is a strange one, perhaps due to hd data corruption of the MBR. When I boot, the system stops at the video card memory check, then tries to go on, but ends up back at the video memory check... again and again ... an endless loop. fchk turns up nothing on the hd. I then tried to redo the mbr with Menu > System > Configuration > Boot and Init redoMBR  ... nothing works. Yet a live disk boots every time. I am just about ready to reinstall, but I thought I would ask if anyone had any encouraging words. Am I really erasing the mbr above? It seems to me that when I run the redo mbr command... the menu.lst is not pulled from my hd, but rather from the live disk somewhere. I have tried to save this both both places without any success. When I search the forum, I get suggestions that I have already tried. Again the data on the drive is safe and sound- I just cannot get it to boot.

any ideas? I have had zero problems with this machine (or pclos) since I built it 5 yrs ago. Until now. Maybe this is my excuse to upgrade ;D


First off, you need to understand grubs role in things. Grub has only one job, to find, and load into memory, the kernel and any modules needed by the kernel, contained in the initrd,img file. That's it... done. Once the kernel is loaded grub is on vacation until next boot. Adios, gone fishing... or whatever grub does when it's off duty. ;D

You can reinstall grub until you turn blue, but it's not going to do any good, as it's not involved in the problem you are experiencing. The kernel is long past the loading into memory stage, and well into booting the system when the error occurs.

The first thing I would do is shut down completely, remove, then reinstall the video card, being sure it's well seated, with all pins making good contact. If the video card is as old as the rest of the system, while its out, clean the contacts with alcohol and cotton swabs. Make sure no lint or hairs are left behind that could prevent good contact. Check the fan for free movement, and remove any dirt, or dust bunny deposits. I remove my fans and clean them with alcohol also, and if dragging, remove the fan and shaft from the motor, dip a bamboo skewer (think Chinese food) in alcohol, and ream the shaft hole in the motor bearing. Bamboo is stiff enough to remove any deposits, absorbent enough to let the alcohol act as a solvent for the sticky stuff, while soft enough that it can't do any damage to the bearing itself. A single drop of light oil on the shaft, after cleaning it too, and the whole thing can be reassembled, and will run like new. It takes me about 5 minutes or less per fan, when I do my scheduled maintenance tear downs, every 4-6 months. Check the heat sink for dirt also. A clean machine is a happy machine.  ;D

Odds are pretty good that, if the card hasn't fried itself from overheating, due to fan, dirt, or contact problems, things will work properly again when rebooted. If nothing else, it's worth a little time to eliminate those items from the list of possible causes, can't hurt anything, and just may save a video card.

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

jbike

  • Guest
Re: mbr boot problem after update
« Reply #2 on: October 14, 2009, 04:44:30 AM »
Thank you for responding so quickly Old-polack!  My video card is a GeForce5200FX added about 3 yrs ago (a fanless model). As you suggested, I tried cleaning/reseating all cards... but no luck. Remember it will boot and display video for a live disk just fine (this is what I am typing on). Also, does not the main memory and video card memory check occur before grub does it's business? I must admit that my knowledge of grub and the boot process is far from complete- very limited in fact.  I thought that there is a hunk of code in the first sector of the disk, that the bios and/or hardware of the hard drive execute first, which points to the image. This hunk of code is not a "file" that can be replaced... it must be put there by some tool.  Perhaps that what I replaced when I ran the redoMBR in system>configuration>boot and init>redombr ? If I did it correctly? I question this because when I re-saved the menu.lst... I thought that it should have been pointing to my hard disk as follows:  system:/media/hda1/boot/grub on my hda1   rather than  to: /mnt/loop/boot/grub/   where ever that is???  I guess I am questioning whether I actually replaced the mbr on the hd.

 Is there anyway that I can point and run the image from a live disk?

 Am I still barking up the wrong tree?

Many many thanks for your patience,
Jbike

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: mbr boot problem after update
« Reply #3 on: October 14, 2009, 01:28:41 PM »
Thank you for responding so quickly Old-polack!  My video card is a GeForce5200FX added about 3 yrs ago (a fanless model). As you suggested, I tried cleaning/reseating all cards... but no luck. Remember it will boot and display video for a live disk just fine (this is what I am typing on). Also, does not the main memory and video card memory check occur before grub does it's business?

Here's the sequence;

BIOS checks hardware with all set parameters; if no problems, calls the bootloader. (grub, in this case)

Grub reads menu.lst, uses the information to locate the kernel and initrd image, then loads both to memory, and relays to the kernel where root is; ie root=/dev/hda1, and whatever other parameters are present in the appropriate menu.lst stanza.

Kernel uses the information from grub to locate the init scripts, and uses their instructions to complete the boot process.

Your problem is occurring during the init process run by the kernel.

Quote
I must admit that my knowledge of grub and the boot process is far from complete- very limited in fact.  I thought that there is a hunk of code in the first sector of the disk, that the bios and/or hardware of the hard drive execute first, which points to the image. This hunk of code is not a "file" that can be replaced... it must be put there by some tool.  Perhaps that what I replaced when I ran the redoMBR in system>configuration>boot and init>redombr ? If I did it correctly? I question this because when I re-saved the menu.lst... I thought that it should have been pointing to my hard disk as follows:  system:/media/hda1/boot/grub on my hda1   rather than  to: /mnt/loop/boot/grub/   where ever that is???  I guess I am questioning whether I actually replaced the mbr on the hd.

Yes you did, and it's working fine. Actually you didn't replace the MBR, (that's a specific location on the hard drive, the first sector of the first cylinder; location 0:0) you replaced the grub stage1 code, located in the first 446 bytes of the MBR.

There may be a problem with filesystem corruption that prevents one or more of the init scripts from being read properly. To eliminate that possibility, I'd run an fsck on the unmounted / partition, from the liveCD.

From a root terminal,

[root@localhost ~]# fsck -f /dev/<whatever>              <Enter>

Replace <whatever> with the proper designation for your / partition. Wait for the process to complete, then reboot to see what effect it had.

If you get asked if something should be repaired, press the Enter key, as the default answer is always correct. Do this as many times as it takes to complete the process.

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

jbike

  • Guest
Re: mbr boot problem after update
« Reply #4 on: October 14, 2009, 01:55:37 PM »
Thanks old-polack I will try fsck again when I get home tonight (I had run this first thing and it turned up the nothing).  Maybe I messed it up the first time.

Thanks,
Jbike

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: mbr boot problem after update
« Reply #5 on: October 14, 2009, 02:08:28 PM »
Thanks old-polack I will try fsck again when I get home tonight (I had run this first thing and it turned up the nothing).  Maybe I messed it up the first time.

Thanks,
Jbike

Just be sure you use the fsck -f trigger, as it causes a forced, full, inode by inode check, rather than just a journal check.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

jbike

  • Guest
Re: mbr boot problem after update
« Reply #6 on: October 14, 2009, 04:58:07 PM »
If I did this correct, it did not repair the disk...I did the fsck on the root partition, hda1 not my home partition. Results are as follows:

[root@localhost root]# fsck -f /dev/hda1
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda1: 239499/2436448 files (0.8% non-contiguous), 1463496/4863670 blocks
[root@localhost root]#
« Last Edit: October 14, 2009, 05:03:52 PM by jbike »

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: mbr boot problem after update
« Reply #7 on: October 14, 2009, 05:56:29 PM »
If I did this correct, it did not repair the disk...I did the fsck on the root partition, hda1 not my home partition. Results are as follows:

[root@localhost root]# fsck -f /dev/hda1
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda1: 239499/2436448 files (0.8% non-contiguous), 1463496/4863670 blocks
[root@localhost root]#

Again, semantics. An fsck does not repair a disk, it checks, and if necessary, repairs a filesystem on a particular partition on the disk.

I'm not trying to be a smart-ass about this, just trying to impart the fact that the terms used when dealing with anything have specific meanings, and should be as precise as possible when dealing with troubleshooting a system that's far remote from the person trying to help. There's no reason you should know this at the start, but there's no way you'll learn the different distinctions, without someone telling you what the different terms imply, as they come up in the conversation.

The printout of the fsck shows a filesystem without errors. Had any repairs been carried out automatically, it would have been noted in the printout.

At this point, at least the filesystem itself is now eliminated as a suspect as the cause of your problem, so we know we have to look elsewhere for a solution.

I'm going to do some checking in the various boot scripts to see if I can turn up anything suspect. Hang tight!

If anyone else comes up with any bright ideas of something to check, go with it. There's no such thing as too much information when troubleshooting, and at any point, something could be revealed that leads to an immediate solution.  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

jbike

  • Guest
Re: mbr boot problem after update
« Reply #8 on: October 14, 2009, 07:01:20 PM »
Fear not old-Polack, I've got a thick skin. I am just thankful for help! Also If I were to give up right away and re-install, or buy a new machine (my economic stimulus contribution  :D)... what would there be to learn?  What fun would that be.  In the meantime, I will ponder this one myself. No worries either way.

Jbike

jbike

  • Guest
Re: mbr boot problem after update
« Reply #9 on: January 16, 2010, 01:03:19 PM »
 I  thought I would give it one more try. When I boot my system...it simply continues to reboot, again and again in a never ending cycle. I have tried the redo mbr in system> configuration>boot and init as well as reinstalling grub from pclos control center without any luck. My fstab looks like this:

### Entries below this line were automatically added by hwdetect v0.7.1
# ROOT
/dev/root   /   rootfs   defaults   0 0
# PROC
none   /proc      proc      defaults   0 0
# PTS
none   /dev/pts   devpts   mode=0620   0 0

# /dev/hda1, size=38909367, type=131: Journalised FS: ext3 (primary)
/dev/hda1   /mnt/hda1   ext3   user,exec,rw,noauto   0 0

# /dev/hda5, size=8177022, type=130: Linux swap (extended)
/dev/hda5   swap   swap   defaults   0 0

# /dev/hda6, size=109209807, type=131: Journalised FS: ext3 (extended)
/dev/hda6   /mnt/hda6   ext3   user,exec,rw,noauto   0 0

# cdrom: LITE-ON DVD SOHD-16P9SV
/dev/hdc   /media/cdrom   auto   user,exec,ro,noauto   0 0

# cdrom: LITE-ON DVDRW SHW-160P6S
/dev/hdd   /media/cdrom2   auto   user,exec,ro,noauto   0 0


and my menu.lst looks like this:

timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=a78be4b2-2b2e-41ab-944e-551119cbc36a  acpi=on resume=UUID=878bb41c-01bc-4576-9ac6-17653ff32abd splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=a78be4b2-2b2e-41ab-944e-551119cbc36a  acpi=on resume=UUID=878bb41c-01bc-4576-9ac6-17653ff32abd
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=a78be4b2-2b2e-41ab-944e-551119cbc36a  failsafe acpi=on
initrd (hd0,0)/boot/initrd.img

My system has only one os, pclos with a root partition hda1 ( from manage disk partitions) that  looks like this: /mnt/hda1 and a home partition that looks like /mnt/hda6 (also made a swap partition).   According to gparted, the boot flag is set on hda1.

Any ideas on how I can fix this? It seems similar but I don't think that the solution applies in my case?

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12660
Re: mbr boot problem after update
« Reply #10 on: January 16, 2010, 03:16:38 PM »
The fstab you posted is from either running hwdetect on an installed system or you copied fstab from the livecd to an installed system. The reason you cannot boot is there is no such thing as /dev/root on an installed system.

You  might try this for /etc/fstab

#ROOT
/dev/hda1 / ext3 defaults 0 0
#PROC
none   /proc      proc      defaults   0 0
#PTS
none   /dev/pts   devpts   mode=0620   0 0
#SWAP
/dev/hda5   swap   swap   defaults   0 0
#HOME
/dev/hda6 /home ext3 defaults 0 0


Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

jbike

  • Guest
Re: mbr boot problem after update
« Reply #11 on: January 16, 2010, 03:31:11 PM »
You were right. I was in the root partition for the live disk... once I mounted hda1... I found fstab to look like this:

# Entry for /dev/hdb1 :
UUID=a78be4b2-2b2e-41ab-944e-551119cbc36a / ext3 defaults 1 1
# Entry for /dev/hdb6 :
UUID=3315543d-ddb1-42ae-8114-b63f18cf02c3 /home ext3 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/hdb5 :
UUID=878bb41c-01bc-4576-9ac6-17653ff32abd swap swap defaults 0 0
none /dev/pts devpts mode=0620 0 0



This looks strange compared the the fstab that you clipped in above. I went on to save the old one off, then copied yours in /etc/fstab .... now it stops indefinitely after grub and sits there asking me to wait (but it no longer continues to reboot). I think we are closer. Can I completely reinstall grub , the mbr, and anything that has to do with booting from the live disk?

Thanks,
Jbike
« Last Edit: January 16, 2010, 03:46:28 PM by jbike »

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12660
Re: mbr boot problem after update
« Reply #12 on: January 16, 2010, 04:26:06 PM »
You were right. I was in the root partition for the live disk... once I mounted hda1... I found fstab to look like this:

# Entry for /dev/hdb1 :
UUID=a78be4b2-2b2e-41ab-944e-551119cbc36a / ext3 defaults 1 1
# Entry for /dev/hdb6 :
UUID=3315543d-ddb1-42ae-8114-b63f18cf02c3 /home ext3 defaults 1 2
none /proc proc defaults 0 0
# Entry for /dev/hdb5 :
UUID=878bb41c-01bc-4576-9ac6-17653ff32abd swap swap defaults 0 0
none /dev/pts devpts mode=0620 0 0



This looks strange compared the the fstab that you clipped in above. I went on to save the old one off, then copied yours in /etc/fstab .... now it stops indefinitely after grub and sits there asking me to wait (but it no longer continues to reboot). I think we are closer. Can I completely reinstall grub , the mbr, and anything that has to do with booting from the live disk?

Thanks,
Jbike



All I did was to suggest the old style for fstab since I didn't know all your uuid's. You might try editing your /boot/menu.lst and change the root device from uuid to root=/dev/hda1

root=UUID=ad8f1f84-4a0d-4242-bf2a-cef989722517 to root=/dev/hda1


Thanks to everyone who donates. You keep the servers running.
Follow me on Twitter for the latest development info.

Offline Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: mbr boot problem after update
« Reply #13 on: January 16, 2010, 04:39:10 PM »
jbike:

Boot the liveCD, log in as root, open a terminal and enter;

[root@localhost ~]# fdisk -l          <Enter>  <-- That's a lower case L not a number 1

Post your results.
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

jbike

  • Guest
Re: mbr boot problem after update
« Reply #14 on: January 16, 2010, 05:02:21 PM »
Here is the answer to the last question...

[root@localhost root]# fdisk -l

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

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2422    19454683+  83  Linux
/dev/hda2            2423        9729    58693477+   5  Extended
/dev/hda5            2423        2931     4088511   82  Linux swap / Solaris
/dev/hda6            2932        9729    54604903+  83  Linux
[root@localhost root]#