Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Debian/Sarge Grub MBR bootage fubared

Posted on 2004-09-27
3
Medium Priority
?
1,301 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 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
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…
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

721 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