Need to boot Windows 7 from Grub rescue command prompt
Solution 1
1) Using rescue disk, boot ubuntu or any other unix flavour..
2) Give fdisk -l
command to see on which partition windows is installed.
3) Mount the /boot
partition of linux in /media
directory.
4) Give chroot /media
to change ur root to /media.
5) Open the /boot/grub/grub.cfg
file and edit it. Add the following lines if not present or if present modify it.
menuentry "Windows" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root 14445AFA445ADE54
chainloader +1
}
I am supposing that windows is present in /dev/sda2
and 14445AFA445ADE54
is the UUID of ur partition /dev/sda2`..You have to replace it with the UUID of ur windows partition.You can find that by
Go to /dev/disk/by-uuid
directory.
Do ls -l
.
You will output like this ..
lrwxrwxrwx 1 root root 10 Aug 1 20:16 14445AFA445ADE54 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 1 20:16 322C5AEB2C5AAA1D -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 1 20:16 7d41ed63-16cb-493c-91ce-02f7b3146fb6 -> ../../sda5
lrwxrwxrwx 1 root root 10 Aug 1 20:16 88e4dc0b-c986-4e1f-84a2-c09731555dec -> ../../sda7
lrwxrwxrwx 1 root root 10 Aug 1 20:16 c8ad3ea8-5467-4f22-803d-9584d32d8a79 -> ../../sda6
By matching the partition, you can find its corresponding UUID.
Reboot the pc. Now it shud work.
Solution 2
Try:
rootnoverify (hd0,1)
chainloader +1
makeactive
boot
In some systems, (hd0,0)
is a "system reserved" partition.
Related videos on Youtube
C.s.
Updated on September 18, 2022Comments
-
C.s. over 1 year
I booted my computer today and found the Grub rescue command prompt. I have been given this computer and it has Linux and windows 7 on it, but I have only ever used the windows section. I have no idea about Linux at all, and was startled by this "Grub" thing.
It won't let me do anything in the command prompt, and i can't boot windows. I have a netbook, so there's no CD drive on the computer. I need a way to get into windows 7 from this command prompt. With a little bit of searching (on my phone) I found a couple things to enter that are supposed to let me into windows. I tried this:
rootnoverify (hd0,0) chainloader +1 makeactive boot
That was the first sequence of things that didn't give me an error. But when I got to typing "boot" it told me the Bootmgr cannot be found...? I have no idea what this means. All I want to do is to be able to boot windows again, I don't care how, I just want access. Like I said, my computer doesn't have a CD drive, so I can't use a disk. Is there a way to fix this through the Grub command prompt? Any answers would be appreciated.
Thanks.
-
hanetzer about 8 yearschrooting to
/media
if you mounted/boot/
there may not work; its a fairly frequent practice in the linux world to have a separate/boot
from the main/
partition (which you need to chroot into). One can chroot into such a system without even mounting/boot