Solved

Debian/Sarge Grub MBR bootage fubared

Posted on 2004-09-27
3
1,298 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Hosting 16 74
Why  my code (program) build with old compiler? 11 104
Upgrade BIOS / EUFI at Scale 4 69
php56-php-mcrypt for rhel7 php56 1 98
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…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

685 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