Solved

Debian/Sarge Grub MBR bootage fubared

Posted on 2004-09-27
3
1,299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to change the nameserver on Ubuntu Server 6 100
can i read my emails on lamp ftp 4 71
Linux MD5 Hash 7 97
RHEL 6.0 - Does it support SHA2? 7 41
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

710 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