Solved

Debian/Sarge Grub MBR bootage fubared

Posted on 2004-09-27
3
1,289 Views
Last Modified: 2013-12-15
My grub installation has become corrupted.  I believe it is the MBR part of grub that is corrupted.  When I boot my machine, I just get a black screen.  This was caused by a faulty power connector (where the drive was power-cycled several times rapidly).

I can mount the drives using utilities from a diskette (tom's rtbt), everything seems to be intact, and I've run e2fsck on all drives.  I'm ignorant about how to get it to start the installed copy of Debian manually, or how to repair grub to get it to start automagically.

Roughly: Debian 'Sarge' build.    
/dev/hda1 = /
/dev/hda2 = /swap
/dev/hda6 = /home
/dev/hda7 = /boot

I tried walking through the grub installation utility (manual mount via chroot, load grub, specify root and kernel, and type "boot"), but it unceremoniously dumps me back out of grub without doing anything spectacular.

...Oh, and this is a 450MHz PIII - typical PC hardware - two IDE drives, bootable CDRom and floppy.

I'd love to get a boot diskette working (quickly) and repair the MBR boot option as an optimal solution.  Debian is the only OS on this machine, and reinstallation is an option, but I'd rather fix it than reinstall for what seems like a simple issue.

Many thanks!


0
Comment
Question by:Syncubus
  • 2
3 Comments
 
LVL 2

Author Comment

by:Syncubus
ID: 12162567
Oh, and this is a 540 MHz PIII, Intel board, two IDE hard drives, bootable (ATAPI) CDROM and floppy.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 12163843
> I tried walking through the grub installation utility (manual mount via chroot, load grub, specify root and kernel, and type "boot")

The process for that should have looked similar to:

mkdir /mnt/sys
mount /dev/hda1 /mnt/sys
mount /dev/hda7 /mnt/sys/boot
chroot /mnt/sys
grub-install /dev/hda

Is that what you did?
0
 
LVL 2

Author Comment

by:Syncubus
ID: 12163919
Sort of, up until chroot.  My procedure was:

# from tom's rtbt disk prompt on ramdrive:
mount -t auto /dev/hda1 /mnt
chroot /mnt /bin/bash
su -
cd /
# there's already a boot directory here
mount -t auto /dev/hda7 /boot
grub
> root (hd0,0)
> kernel (hd0,6)/vmlinuz2.6..3-1-386
> boot

I was expecting to be greeted with my linux system.  I wasn't.  Perhaps 'grub-install' was the command after all...  I'll remember it if I ever inadvertantly resolder that sloppy molex to a power cord again. ;-)

Cheers!



It's all moot now, as I've formatted the drive and am reinstalling (I'm impatient like that, I suppose).

Thanks for your help.

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now