dual boot system returns grub rescue> prompt

E

emekadavid

I dual boot my laptop, win7 and fedora17. due to some display problems on windows, I decided to reinstall the win7. On loading the bootdisk and on thewindows screen to choose sizes and formats, I accidentally deleted the system reserve file (i believe i have the name correct) instead of deleting and formatting appropriate disk spaces.
Now, I have an issue. The win7 booting disk won't load beyond the windows start screen and fedora 17 installation reports several errors. running the system without a boot disk brings up the following prompt:
grub rescue>
I think the prompt is my only recourse to a solution now.
Can anyone help me out?
thanks
 
P

Paul

emekadavid said:
I dual boot my laptop, win7 and fedora17. due to some display problems on windows, I decided to reinstall the win7. On loading the bootdisk and on the windows screen to choose sizes and formats, I accidentally deleted the system reserve file (i believe i have the name correct) instead of deleting and formatting appropriate disk spaces.
Now, I have an issue. The win7 booting disk won't load beyond the windows start screen and fedora 17 installation reports several errors. running the system without a boot disk brings up the following prompt:
grub rescue>
I think the prompt is my only recourse to a solution now.
Can anyone help me out?
thanks

The thing about dual boot, is you have to view the operations
on it as "components" of a solution. And then the question becomes,
do you know how all the component parts work, and can you reproduce
the steps when needed ? If not, then perhaps dual booting using
a single hard drive, is not for you. I'm very weak on the
GRUB part, and GRUB repair - I don't think I've ever successfully
repaired a broken GRUB. I have run a distro where update-grub actually
worked properly, but that doesn't say it always works.

THis is an example of Windows 7. MBR and two partitions. SYSTEM RESERVED
contains the boot files. Normally, SYSTEM RESERVED doesn't mount, as it
isn't given a drive letter, and the utilities on the DVD know what to do.

+--------------------------+-----------------------------------------+----+
| MBR - 440byte boot code | SYSTEM RESERVED - boot files, boot flag | C: |
+--------------------------+-----------------------------------------+----+

Windows would normally boot using MBR code, find the boot flag, run
the files in SYSTEM RESERVED, and eventually the OS runs from C: .

Fedora, is more likely to use grub or grub2. Some Linux distros, use two
partitions in a manner similar to Windows 7. The /boot partition has the
GRUB files, and it doesn't normally appear mounted in the desktop. Altough
nothing prevents the user from editing the setup, and always having /boot
mounted over top of /. You need to do such a step in any case, if you
expect to update-grub.

+------------------+----------------------------------------+----------------------+
| MBR - GRUB code | /boot unmounted partition - boot files | Main Linux partition |
+------------------+----------------------------------------+----------------------+

When you dual boot, there is an "easy" install order and a "hard" install
order. If you installed Fedora as the second OS, that would be "easy". When GRUB
is installed, it would create an entry to "chain load" Windows 7.

The difficulty comes in, when reinstalling or removing OSes from a dual boot.
Both OSes want to write over the MBR. That means a portion of GRUB could go missing.
I've run one Linux install here, using GRUB loaded on a floppy diskette. Which
reduces the risk of an MBR collision. I don't even remember how I did that
now, as that setup was removed long ago.

You would start by reviewing the installation order, which OS came
second, whether any hand editing was necessary, figuring out how
the system is currently booting. And whether any external media is
used to boot things up.

You can use "update-grub", but that wouldn't be appropriate unless
you've finished getting Windows 7 installed. If both OSes are broken,
you have to decide which one to fix first. And then work on the
dual booting issues.

http://superuser.com/questions/434591/adding-windows-7-to-fedora-17-grub-boot-loader

# Some combination of these. Depending on whether grub.cfg is OK.
grub2-mkconfig -o /boot/grub2/grub.cfg
update-grub

I don't know if I believe the answer in that superuser thread. It would
depend on what you booted the system with, as to whether update-grub would
work. If you boot with a live-cd, then I expect an attempt to use update-grub
won't work (because the root device would be the CD). It might require
doing a "chroot" first, then running grub-update once you've convinced the
OS that the / system on the hard drive is the one to use. You'd need
to mount both / and /boot, in order for update-grub to come from
/sbin, and for it to update files in /boot/grub.

There's an example of chrooting (Change Root directory) here.
This changes the root directory as a restricted environment to work
in. You lose access to the CD executables, when inside your chroot.
So not everything is accessible once chrooted.

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6

# mount -t proc proc /mnt/gentoo/proc
# mount --rbind /sys /mnt/gentoo/sys
# mount --rbind /dev /mnt/gentoo/dev

# chroot /mnt/gentoo /bin/bash
# source /etc/profile
# export PS1="(chroot) $PS1"

That makes /mnt/gentoo the new / of the system.
While running a live-cd, you might need to mount the Fedora hard
drive partitions, give them a mount point, and with chroot,
make them become the new / in place of the CD file system.

As I see it, the trick is getting update-grub, to update the
actual hard drive, and not attempt to update whatever you're booting
with. And that's where I see chroot coming into play.

I doubt I could fix this successfully. About all I can do to help
is to suggest reviewing the steps taken so far, which OS was installed
second (probably Fedora), and what OSes are currently working. And also,
whether you're currently booting the hard drive Fedora using a separate
floppy boot loader or similar.

Paul
 
D

David

At Mon, 24 Mar 2014 09:18:59 -0700, emekadavid rearranged some electrons
to write:
I dual boot my laptop, win7 and fedora17. due to some display problems
on windows, I decided to reinstall the win7. On loading the bootdisk and
on the windows screen to choose sizes and formats, I accidentally
deleted the system reserve file (i believe i have the name correct)
instead of deleting and formatting appropriate disk spaces.
Now, I have an issue. The win7 booting disk won't load beyond the
windows start screen and fedora 17 installation reports several errors.
running the system without a boot disk brings up the following prompt:
grub rescue>
I think the prompt is my only recourse to a solution now.
Can anyone help me out?
thanks

It's been my experience (3 dual boot systems here) that if you install
Windows first, then Linux, you will have no issues. Linux works and
plays well with others. Windows doesn't.

It is possible you'll have to start over. Hopefully you have a decent
backup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top