You are not logged in.
I've just installed Arch Linux and have gotten my desktop environment working, and now I'm looking to be able to go back into my Windows 7 install, but this doesn't work.
I've done several edits of my menu.lst in the grub bootloader in hopes of finding a solution by trial-and-error, and the closest I've come is a "file not found" error when I booted to the partition windows is installed on.
I have also scoured the forums and wiki for a fix, to no avail.
My windows install is on /dev/sda2.
Here is my menu.lst:
# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
...
# (0) Arch Linux
title Arch Linux
root (hd0,6)
kernel /vmlinuz26 root=/dev/sda5 ro
initrd /kernel26.img
# (1) Arch Linux
title Arch Linux Fallback
root (hd0,6)
kernel /vmlinuz26 root=/dev/sda5 ro
initrd /kernel26-fallback.img
# (2) Windows
title Windows
rootnoverify (hd0,1)
chainloader +1
I read about there being a separate partition that windows 7 creates when booting, but I do not have this partition, nor have I ever, I am positive.
Given this menu.lst, I get a "file not found" error (but not with a number).
Can this be repaired?
Last edited by JasonSage (2010-06-14 16:55:24)
Offline
Change this
# (2) Windows
title Windows
rootnoverify (hd0,1)
chainloader +1
to this
# (2) Windows
title Windows
rootnoverify (hd0,0)
chainloader +1
Grub hard drive numbers are 0-based.
P.S I think that should be the problem if you have done the installation correctly. If that does not work, post the output of the following 2 commands
sudo fdisk
and
df -h
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
My windows install is on /dev/sda2. That's hd0,1. hd0,0 is the system recovery partition that shipped with the computer. Ironically, I CAN boot to that, but if I went through with the process it would replace my windows install with XP and I would lose all my data (it is a full system restore).
fdisk -l :
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe3ebe3eb
Device Boot Start End Blocks Id System
/dev/sda1 1 7 56196 6 FAT16
/dev/sda2 * 8 13612 109282162+ 7 HPFS/NTFS
/dev/sda3 13613 19452 46909800 5 Extended
/dev/sda5 13613 18475 39062016 83 Linux
/dev/sda6 18476 18961 3903763+ 83 Linux
/dev/sda7 18962 19452 3943926 83 Linux
df -h :
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 37G 3.0G 32G 9% /
udev 10M 224K 9.8M 3% /dev
shm 500M 0 500M 0% /dev/shm
/dev/sda7 3.8G 21M 3.5G 1% /boot
/dev/sr0 168M 168M 0 100% /media/ARCH_201005
Last edited by JasonSage (2010-06-14 17:13:42)
Offline
When Windows 7 installed, bootmgr was probably installed to the MBR and not to the partition itself. So when you overwrote the MBR with grub, Windows no longer became bootable. What exactly is the error message when trying to boot from (hd0,1)?
Offline
My windows install is on /dev/sda2. That's hd0,1. hd0,0
Bah !! I must have missed that in your first post.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
When Windows 7 installed, bootmgr was probably installed to the MBR and not to the partition itself. So when you overwrote the MBR with grub, Windows no longer became bootable. What exactly is the error message when trying to boot from (hd0,1)?
The error is "error: file not found".
Offline
As far as I remember, Windows always has to be on the first partition.
Blog .:. AUR .:. Wiki Contributions
Registered Linux User #506070.
Offline
gamewolf wrote:When Windows 7 installed, bootmgr was probably installed to the MBR and not to the partition itself. So when you overwrote the MBR with grub, Windows no longer became bootable. What exactly is the error message when trying to boot from (hd0,1)?
The error is "error: file not found".
Sorry didn't see that in your first post. So it seems that grub is not even able to reach windows at all. If it was there would be a "bootmgr not found" or no error at all. Based on what I found from google, you need to use your Windows 7 cd to repair the MBR, then reinstall GRUB from a livecd. Not exactly sure how it helps, but others got it to work.
Good luck.
Last edited by gamewolf (2010-06-14 17:58:16)
Offline
I'll try that, but I'm curious... wouldn't that be the same as having windows installed on the machine already and then installing arch linux and grub, as the case is?
Hmm, I was previously using Grub with Ubuntu and dual booting with windows. So my mbr had already been edited for Ubuntu and Arch Linux failed to preserve the windows entry in the already edited mbr, and restoring the mbr and reinstalling grub would service to allow a dual boot AND remove any Ubuntu leftovers in the mbr.
Very nice, I'll try this and report back.
Offline
Did you try booting from sda1 or are you assuming you know what will happen?
I don't mean any offense; I only ask because I was myself surprised to find that some laptops boot from the "recovery partition" for normal operation. The recovery partition apparently has a chainloader that loads the real installation. I have a friend who has such a machine; the boot flag was on the recovery partition and the GRUB menu had to be pointed to that partition. It threw me for quite a loop.
When you installed Ubuntu, did the installer see one or two Windows partitions?
Edit: By the way, your GRUB settings don't get stored on the MBR. The MBR only houses the actual boot loader and information about where to find the settings on the drive.
Last edited by Trent (2010-06-14 18:09:25)
Offline
# (2) Windows title Windows rootnoverify (hd0,1) chainloader +1
I just noticed that you did not have the makeactive directive in your config. Add that and see if that helps.
Last edited by gamewolf (2010-06-14 18:10:19)
Offline
One thing that you can try is to boot the win7 install dvd, fixmbr, and then reinstall grub to mbr. That have worked for me a couple of times when I've had similar trouble. (with vista tho, not win7)
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Did you try booting from sda1 or are you assuming you know what will happen?
...
When you installed Ubuntu, did the installer see one or two Windows partitions?
Why would I try sda1?
Ubuntu showed one windows partition.
I just noticed that you did not have the makeactive directive in your config. Add that and see if that helps.
I did try this in my trial-and-error adventure earlier, it did not work.
One thing that you can try is to boot the win7 install dvd, fixmbr, and then reinstall grub to mbr. That have worked for me a couple of times when I've had similar trouble. (with vista tho, not win7)
Indeed, this was the very first step I took. I inserted my Windows 7 dvd, but it would only install windows. I think this is because my Windows 7 copy is an upgrade. There was no way for me to restore my MBR.
Fortunately, I have a 98 SE disc laying around from when I had to rewrite my MBR with XP, so I figured I'd give it a try. I popped it in, got to the prompt, and typed fdisk /mbr.
Now wouldn't you know it, I restarted the machine and, lo and behold, I get a single grub error this time: "error: file not found" and it gives me a grub> rescue prompt. Only these two lines.
After much thought, I inserted my Arch Linux netinstall disc and tried to reinstall grub, but I had no network connection at that point. Instead of completely reinstalling Arch Linux, I went straight to grub and used the setup (hd0) command in the grub prompt to rewrite the MBR on that hard disk.
Restarted, I now have all the options, but windows still gives me the "error: file not found" report.
Now what?
Offline
Below the Install WIndows in the bottom left corner there should be Restore or something similar. its not big and obvious.
Offline
Below the Install WIndows in the bottom left corner there should be Restore or something similar. its not big and obvious.
Really? Haha, I must've missed it, I'll have another look.
Offline
I would say the easiest way to get your windows partition back is to use Super Grub Disk, Have saved me a couple of times and does it all automagically
Here is the link: http://www.supergrubdisk.org/
Just follow the menus and you should be good to go.
Linux user #498977
With microsoft you get windows and gates, with linux you get the whole house!
My Blog about ArchLinux and other stuff
Offline
I tried the automatic repair and restart AND tried to diagnose and repair startup problems, and neither worked. I have access to a command prompt there, but didn't use it.
Any recommendations?
(@655321 I'll have a look)
Offline
In the command prompt, run bootrec.exe /fixmbr and then bootrec.exe /fixboot. That should take care of it.
Offline
JasonSage wrote:# (2) Windows title Windows rootnoverify (hd0,1) chainloader +1
I just noticed that you did not have the makeactive directive in your config. Add that and see if that helps.
^^ This
You should have
title Windows
rootnoverify (hd0,1)
makeactive
chainloader +1
Offline
@SiC - We covered that in post #11
EDIT: You're right though, he should add makeactive when he's done reinstalling grub.
Last edited by gamewolf (2010-06-14 19:57:12)
Offline
Excellent, those two commands restored the mbr and I am now booted into windows, and all I have to do now (should be) is download a live CD that I can install grub from (my archlive netinstall CD failed to do so), or at least give me the internet access I need to do so. I should be back in a little while with a perfect dual boot. Thanks folks!
(I will mark this as [solved] if it is so.)
Last edited by JasonSage (2010-06-14 19:59:47)
Offline
No problem. Hope it all works.
Offline
Ugh, and I'm now having trouble finding a way to install grub remotely. Does anybody know how?
Offline
--root-directory=mountpoint
Last edited by demian (2010-06-15 08:09:39)
no place like /home
github
Offline
Ugh, and I'm now having trouble finding a way to install grub remotely. Does anybody know how?
http://wiki.archlinux.org/index.php/Gru … stallation
+
http://wiki.archlinux.org/index.php/Change_Root
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline