Can't boot windows 7 after installing Grub4dos

Using applications, configuring, problems
Message
Author
Ledster
Posts: 88
Joined: Sat 26 Aug 2006, 15:33
Location: Devon, England

Can't boot windows 7 after installing Grub4dos

#1 Post by Ledster »

I don't use windows much these days (just the odd game or prog that won't run in puppy). Got fed up with firing up from cd all the time, so decided to install/use grub.
Fired up Tahrpup 606 and ran grub4dos, but I made one mistake (I think!). I did not tick "Do not rewrite the existing boot record".
Fired up the box (Intel quad core i5, 4 Gigs ddr3 memory, ATI Radeon HD5750 graphics, ITb hard disk with 4 partitions - Windows 7 on the second partition).
All pups run fine from grub menu - windows does not. It hangs at opening splash screen. If I wait it finally crashes to a bsd with a load of text which shuts down before you can read it.
I assume my troubles are the boot record so have searched on the web and found loads of "solutions" none of which worked.

A couple I tried:
1 Windows 7 original disk and ran automatic repair Windows - did nothing
2 Windows repair and select dos prompt and ran "bootrec.exe /FixMBR"
3 Windows repair and select dos prompt and ran "bootrec.exe /FixBoot"

None worked - but had to reinstall grub to get linux back.

Windows section of menu.lst:

# Windows
# this entry searches Windows on the HDD and boot it up
title Windows\nBoot up Windows if installed
errorcheck off
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
find --set-root --ignore-floppies --ignore-cd /io.sys
chainloader /io.sys
errorcheck on

Windows section of menu-advanced.lst

title Windows (sda1)
uuid CE3E73A23E7381EF
chainloader /bootmgr

title Windows (sda2)
uuid 56C672D0C672B03B
chainloader /bootmgr

None work.

I am totally out of my depth. Can any one help me recover?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

Windows 7 on the second partition).


This should be the menu entry that boots Windows 7 on second partition sda2

Code: Select all

title Windows (sda2)
uuid 56C672D0C672B03B
chainloader /bootmgr
Try changing the chainloader line to:

Code: Select all

chainloader +1
If that does not work.

In Puppy.
Look on both sda1 and sda2 and see if you can find the bootmgr file to see what drive it is on.

Depending on what partition it is on depends on which menu entry you play with.

That original chainloader line may be correct, but it is looking for bootmgr just on partition sda2.
So if you find it inside a folder.
That line needs to say that.
Eaxample:
on sda2 bootmgr is inside folder boot.

So the chainloader line would need to be:

Code: Select all

chainloader /boot/bootmgr
Or maybe try to move the bootmgr file to just on sda2.
Last edited by bigpup on Sun 14 Jan 2018, 02:58, edited 1 time in total.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Ledster
Posts: 88
Joined: Sat 26 Aug 2006, 15:33
Location: Devon, England

#3 Post by Ledster »

Thanks for the reply Bigpup. Unfortunately no luck.

First
bootmgr is already present in root of sda1 & sda2

Then
tried chainloader +1 in both - fail
tried chainloader /bootmgr in both - fail
Used blkid to check uuid's - both ok

Looks like this is now a linux computer only!

I'll try any more ideas suggested/found, but I am not optimistic. I'll stick with puppy.

LateAdopter
Posts: 361
Joined: Fri 27 May 2011, 17:21
Location: Reading UK

#4 Post by LateAdopter »

Presumably windows 7 was installed with UEFI and GPT...
If the MBR is written then the windows would boot from MBR but you have it installed for UEFI so it would fail

I don't think grub4dos can boot GPT.

To get windows working you would need to put back the special MBR sector that indicates that the device is partitioned using GPT.

Windows does not support combo partitioning with MBR and GPT on the same device. In that case it takes the MBR.

Note: This is my understanding, but I don't use UEFI or windows 7!

EDIT: when grub4dos is installed it saves a backup copy of the previous MBR. If you can find that it should be possible to restore it.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#5 Post by foxpup »

I am thinking along the same lines as LateAdopter. Except, uefi does not use nor need MBR, I think.

Can you look if your boot installation is on sda1? And if you find bootmgr.efi there, probably under EFI/Microsoft/Boot? Then your windows is installed for efi and grub4dos can not boot that. (Grub2 can.)
In that case, you should check that sda1 still has the boot,esp flag; you can do that with gparted. Also, you may have to check in your bios that uefi boots before legacy.
Got fed up with firing up from cd all the time, so decided to install/use grub
Best way I know to accomplish that is how Fatdog does it: with refind and grub2.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#6 Post by bigpup »

Grub4dos config should have made a bakup of the original MBR.

Look on sda1 and see if you see this file.
sda_mbr.bak

If Yes.

To restore the old Windows MBR.

Boot up Tahrpup 6.0.6
In a console type

Code: Select all

cat sda_mbr.bak > /dev/sda
press enter.

Now reboot and see if you can now boot into Windows.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

Then
tried chainloader +1 in both - fail
tried chainloader /bootmgr in both - fail
Any specific details or it just did nothing??
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#8 Post by Sailor Enceladus »

@LateAdopter: I thought the UEFI and GPT stuff started with Windows 8, but now you got me curious... :)

On my dad's Windows 7 laptop, I think sda1 was fat32 and sda2 was ntfs. I shrank sda2 by 10GB in Windows, then used that space to make an ext4 partition in GParted, then put puppy on sda3. Windows 7 and Puppy live together with grub4dos now.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#9 Post by bigpup »

Sailor Enceladus,

Help us out.
What menu entry, in Grub4dos, boots Windows 7 for you?
What is in the entry that works?
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#10 Post by Sailor Enceladus »

Hi bigpup,

I haven't seen my parents since Christmas but I think it was the exact same as first one Ledster posted that checks for bootmgr, ntldr, io.sys. I might have refined it later once I knew which one it checks for. It sounds to me like Ledster's problem with Windows 7 is that the OS is actually corrupt though, and that grub4dos finds the file it needs to start it ok. I once had to boot Windows 7 into safe mode to fix it after, I think this was the video I followed (though I think this problem sounds somewhat different) https://www.youtube.com/watch?v=vEyxD6ZG-jI . Your sda_mbr.bak comment seems like a good thing to try first.

Philh
Posts: 150
Joined: Wed 17 May 2006, 13:26
Location: England

#11 Post by Philh »

On my windows 7 machine
fdisk -l /dev/sda gives
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x86f8a5bf

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 409599 407552 199M 7 HPFS/NTFS/exFAT
/dev/sda2 409600 941191167 940781568 448.6G 7 HPFS/NTFS/exFAT
/dev/sda3 941191168 976560127 35368960 16.9G 7 HPFS/NTFS/exFAT
/dev/sda4 976560128 976771071 210944 103M c W95 FAT32 (LBA)

So its a dos mbr and boot is sda1
Both of these boot windows ok

title boot hp hard drive sda1
uuid 0C3893D33893B9E2
chainloader +1

title bootmgr hp hard drive sda1
uuid 0C3893D33893B9E2
chainloader /bootmgr

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Perhaps an annoying workaround -- a Linux with Grub2

#12 Post by mikeslr »

Hi Ledster,

Some time ago, trying to wean my wife off Windows, I tried Puppy from a USB-Key. All went well. So, without asking, I installed it to her hard drive with Grub4dos, effectively locking her out of Windows 7. :oops:

By trial and error, I eventually came up with this workaround. I partitioned sda2 and installed LinuxMint to the now, 4th partition. That installation automatically installed Grub2 which, in doing so, automatically created a listing for Windows. Actually two listings.

She never uses LinuxMint, and has yet to forgive me. :(

There may be possibilities for exploring such a workaround without having to first resize sda2. You didn't mention which Puppy you are running. But, I've created SFSes of Unetbootin under both Tahrpup64 and Xenialpup64. Running unetbootin from either, I can install Major Linux distros to a USB-Stick. One of the boot options these USB-installed distros usually provide is 'Boot Windows". [I've used Ubutu and Debian spin-offs. Don't know about others].

If Windows can be booted via Grub2 on a USB-Key, you could later resize sda2 and waste a small part of your Terabyte hard-drive on a Linux Distro you may never use.

Since my escapade, norby009 has pretty-much perfected LICK, http://murga-linux.com/puppy/viewtopic. ... 720#462720, but I'm not sure how you could make use of it if you can't access Windows. Don't know if it will run under Wine.

However, Ted Dog, published "No-format install for UEFI based machines Win8 & MacTel", http://murga-linux.com/puppy/viewtopic. ... 727#818727. Although intended for use with UEFI computers and its grub.cfg does not include a listing for booting Windows, it is easily installed to a USB-Key and grub.cfg can be edited to include such listing.

While searching for the link to the above package, I ran across this post by Dryfalls, http://murga-linux.com/puppy/viewtopic. ... 594#975594: "Had a chance to use a newish laptop with win10 to test my wifi setup. Only works if your puppy (or whatever) is on a usb drive or stick with uefi. Go into windoz settings panel and tell it to rebuild. click usb (where your linux is plugged in) and windoz will think you have its own rebuild hooked up. It properly turns itself off and gives full control over to the usb drive/stick. It's like it was never there. No fussing with the bootloader is necessary." That might also work for Windows 7.

Last thought, if you can install either Hirens or FalconsFour's BootCD to a USB-Key, http://www.hirensbootcd.org/ or http://falconfour.com/category/bootcd/ to a USB-Key [perhaps via Unetbootin], you could similarly try to have windoz rebuilt, and be provided with other tools for handling mbr mess-ups.

mikesLr

User avatar
MrToad
Posts: 62
Joined: Thu 13 Dec 2007, 22:58
Location: East Devon, GB

#13 Post by MrToad »

Hi folks, I've had issues booting an ext4 partition with grub4dos, and eventually came across this post, which you may find helpful:

http://www.murga-linux.com/puppy/viewtopic.php?t=111376

I don't know what type of partition Windows 7 runs on, but if it's a 64-bit partition then something other than grub4dos would be required to boot it.

Best regards,

MrToad

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#14 Post by foxpup »

Ledster wrote:bootmgr is already present in root of sda1 & sda2
So not a uefi install, but a legacy install of windows7 ?
Is that normal: bootmgr on 2 partitions?

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#15 Post by Burn_IT »

I don't know what type of partition Windows 7 runs on, but if it's a 64-bit partition then something other than grub4dos would be required to boot it.
What's a 64bit partition??
"Just think of it as leaving early to avoid the rush" - T Pratchett

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

Burn_IT wrote:What's a 64bit partition??
Read the link provided by MrToad above.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#17 Post by bigpup »

If it was a 64 bit format problem, seems he would be getting errors about that.
But he did not answer this question yet!
Quote:
Then
tried chainloader +1 in both - fail
tried chainloader /bootmgr in both - fail


Any specific details or it just did nothing??
WHAT IS THE SPECIFIC MAKE AND MODEL OF THIS COMPUTER????
Who knows, they could have some kind of strange install of Windows 7 on this thing.

As stated by others. Those menu entries should be working for Windows 7 boots with Grub4dos boot loader.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#18 Post by Burn_IT »

Windows would not install on such a partition.
"Just think of it as leaving early to avoid the rush" - T Pratchett

Ledster
Posts: 88
Joined: Sat 26 Aug 2006, 15:33
Location: Devon, England

#19 Post by Ledster »

@bigpup

Tried "cat sda_mbr.bak > /dev/sda"
Did not seem to do much and windows still won't boot. Should it be "cat /dev/sda1/sda_mbr.bak > /dev/sda" ?
Windows still won't boot and grub had stopped working. Back to a cd boot and run grub config again. Grub now works.
What does "cat" do in this case? My linux bible O'Reilly's "Linux in a nutshell" implies it only copies files "on standard output" - whatever that is!
In answer to your query I only seem to get randomly either a hang at the opening logo (the flag with 4 different coloured corners) or the "windows did not shut down properly - choose repair or start normally". Normally goes to the hang screen, the other goes to the fixit screen and nothing there helps.

@sailor enceladus & foxpup

My computer is 7 years old and has a good old fashioned BIOS - definitely no UEFI. I also would be interested in your grub4dos menu that works.

For interest sda1 and sda2 are both NTFS. sda3 is too but is only used for back up. sda4 is ext3 for my linux stuff.

Just noticed there are some more posts here since I wrote this. Will look in detail tomorrow & respond then . Thanks every one for your input.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#20 Post by bigpup »

Tried "cat sda_mbr.bak > /dev/sda"
Did not seem to do much and windows still won't boot. Should it be "cat /dev/sda1/sda_mbr.bak > /dev/sda" ?
Windows still won't boot and grub had stopped working. Back to a cd boot and run grub config again. Grub now works.
That indicates that sda_mbr.back, is probably corrupted or it really was not the original Windows mbr.

Having to redo Grub4dos config put a usable mbr for Grub4dos back on the hard drive.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

Post Reply