Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Debian/Sarge Grub MBR bootage fubared

Posted on 2004-09-27
3
Medium Priority
?
1,303 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 22 hours left to enroll

885 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