[SOLVED] Rescuing Windows Vista as well as Fedora through bootable USB
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Rescuing Windows Vista as well as Fedora through bootable USB
My system was a dual-boot with Windows Vista and Fedora 9. During the installation of some updates of Windows vista I powered off the system and since then my Windows Vista gives blue death screen error. I think it as some MBR corruption issue for which I have searched these corrective steps:
Quote:
Step 1:1. Put the Windows Vista installation disc in the disc drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, and a keyboard or another input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and then click Next.
6. In the System Recovery Options dialog box, click Startup Repair.
7. Restart the computer.
Step 2: use bootrec.exe to fix MRB and BOOT
1. Put the Windows Server 2008 installation disc in the disc drive(you can use Windows Vista installation disc too), and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, and a keyboard or another input method, and then click Next.
4. Click Repair your computer, and then click Next.
5. In the System Recovery Options dialog box, click Command Prompt.
6. Type bootrec /fixmbr, and then press ENTER.
7. Type bootrec /fixboot, and then press Enter.
8. Restart the computer.
My DVD-ROM does not detect any media I insert into it. So I have created a Windows Vista's USB installation media.
My Problem: At present Fedora boots normally. But when I will fix MBR, what will happen to fedora ? If it removes the grub, I will not be able to boot in fedora. Please suggest something. I think there must be a way to install grub through USB, but I don't know the 'howtos' of that.
You would boot a LiveCD after restoring the windows MBR and then do
Code:
grub-install /dev/sda
/dev/sda being the main bootable drive. That should be all you need to do, but you can always search through the hundreds of How-to's on Google if your not comfortable with it. I did this with Windows 7 and Ubuntu a couple of weeks ago. Works great!
Ok. Thanks ctkroeker.
So now I have created a Live USB with Fedora-9-i686-Live.iso using liveusb-creator. When I boot with this LiveUSB, I only see four options:
Quote:
- Boot
- Verify and Boot
- Memory Test
- Boot from Local Drive
Non of the choice leads me to a terminal type of environment where I can put the command 'grub-install /dev/sda'
Okay I got it. You mean when I am taken to the desktop of fedora through LiveUSB, I can access the terminal and put this command. Right, thanks. Now two questions:
First, you told me the command 'fdisk -l' to view the drives. Is this some kind of a hint ? I mean why I will need to view my drives ? Will not 'grub-install /dev/sda' alone enough?
Second, and very important. I am doing my project in fedora. If something goes wrong, all my project data will be doomed. Consequently, I may be killed by my supervisor !! So do you think everything will be ok ? In fact I want to load myself with the every the information that I may need for this rescue operation.
In fact, I am not only a newbie but also some kind of a dumb as a bonus. So please bear with me.
You need fdisk -l to identify your drives
if say you have windows on /dev/sda and another drive thats /dev/sdb
and you do grub-install /dev/sda
then its gonna install grub to your windowds drive which would be bad
you could use a persistent fedora usb install to back up data to
and could also just compress your datd and place it on usb,etc
before doing anything
you should always back-up stuff
[mq15@localhost ~]$ sudo fdisk -l
[sudo] password for mq15:
mq15 is not in the sudoers file. This incident will be reported.
[mq15@localhost ~]$ su -c "fdisk -l"
Password:
bash: fdisk: command not found
[mq15@localhost ~]$
Now what ?? Let's try logging in as root...and it worked. Here is the result of 'fdisk -l'
Code:
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x369b369b
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3990 32049643+ 7 HPFS/NTFS
/dev/sda2 3991 13155 73616384 7 HPFS/NTFS
/dev/sda3 13411 14593 9502447+ 83 Linux
/dev/sda4 13156 13410 2048287+ 5 Extended
/dev/sda5 13156 13410 2048256 82 Linux swap / Solaris
Partition table entries are not in disk order
I guess, grub.conf will be also needed for this decision:
Code:
[mq15@localhost ~]$ su -c "cat /boot/grub/grub.conf"
Password:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/sda3
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.27.25-78.2.56.fc9.i686)
root (hd0,2)
kernel /boot/vmlinuz-2.6.27.25-78.2.56.fc9.i686 ro root=UUID=807f9a9d-67bc-4774-81a9-177d6a158e33 rhgb quiet
initrd /boot/initrd-2.6.27.25-78.2.56.fc9.i686.img
title Fedora (2.6.25-14.fc9.i686)
root (hd0,2)
kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro root=UUID=807f9a9d-67bc-4774-81a9-177d6a158e33 rhgb quiet
initrd /boot/initrd-2.6.25-14.fc9.i686.img
title Windows Vista
rootnoverify (hd0,0)
chainloader +1
su
grub
root (hd0,2) (means sda3 in grub-speak)
setup (hd0)
quit
2) I suggest you mount your sda3 partition and remove that hiddenmenu as well
Code:
su
mkdir /z
mount /dev/sda3 /z
(now maybe grub.conf sym links on your distro to /boot/grub/menu.lst lets check
ls -al /z/boot/grub/grub.conf
Anyhows it will be easier to edit that file using a graphical text editor...not sure whats available on your live cd
but put a # in front of hiddenmenu and save the file then reboot and cross your legs
O.K.
Thanks everyone. Windows Vista was not being repaired. I installed Windows 7. After that I followed instructions in post # 11 by aus9 to re-install the grub.
One common error that I would like to share:
Code:
root<space>(hd0,2)
setup<space>(hd0)
I first used these commands without spaces and I got the error:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.