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

#21 Post by Ledster »

@mikeslr
Sounds like your method is my best bet. I'll give it a try in the next few days (busy time at the moment). Does grub2 see 32 bit puppies?

@foxpup
Yes, bootmgr is on both sda1 & sda2 - I have no idea why.

@bigpup
Computer is a Mesh Elite ATX 750 - came with Win 7 pre-installed. Spec as my first post.

Good job I hardly use Windows these days. Getting it back is a challenge now so I shall keep trying!

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

#22 Post by mikeslr »

Hi Ledster,

No. Grub2 does not automatically see Puppies, by which I assume you mean Puppies that are Frugally installed. But, if my flaky memory serves, it wasn't able to automatically see a Full Install Puppy either.

I never use Full installs, but on a couple of occasions I've set them up just to do some 'exploring'. I sort of remember Grub2 not recognizing it on one of those occasions.

Frugally installed Puppies can be added to a Grub2 Menu thru custom configuration. But my recollection is that I was advised to either never allow Grub2 to update, or before allowing it to update to copy the Puppy Menu Stanza somewhere safe so that it would be easier to include it when customizing the updated Grub2.

If you check the " "No-format install..." thread I linked to in my prior post, you'll find examples of Stanzas for Puppies under Grub2. Searching the Forum will provide others. Just plug a couple key words into https://cse.google.com/cse?cx=015995643 ... #gsc.tab=0.

I've used Grub2 once on an IBM Thinkpad T42 after installing Manjaro. It's one of perhaps two Linux Distros grub4dos doesn't recognize. But the above complications were too much for my simple tastes. When I had to replace my desktop and my new-to-me computer came with Windows 7, I chose an easier workaround.

Having more than one USB-ports, after frugally installing Puppy to a folder on the hard drive, [create folder, mount ISO, copy files into folder] I booted a Puppy on a USB-Key. From it, I ran grub4dos, selecting a 2nd USB-Key as the location for it to install and write Menu.lst, but allowing it to search all drives for operating systems. I then edited that Menu.lst, deleting the stanza for the Puppy on the USB-Key I had booted from. I configured my computer so that booting from a USB-Key has priority over booting from the hard-drive. The 'boot' Key, itself, does not have an OS on it. It exists only to enable booting Puppies from their folders on the hard-drive.

As I almost always run Puppies, I leave the 2nd USB-Key plugged in when booting up. Only if I have some reason to boot into Windows do I remove it, placing it on the top of the desktop for easy access later.

Grub4dos together with Menu.lst only occupy about 15 Mbs. So a small USB-Key is all that is needed. However, you'll want it to have at least the speed of USB-2. As USB-Keys do wear out, and as Murphy's Law is always to be respected, I have a backup to that USB-Key "just in case".

It may seem like a lot of wasted storage, as I ended up with two 8 Gb Keys not otherwise being used. But I was able to buy three of them for $10. An hour of my time is worth more than that.

On a Laptop, you may want to and be able to, use an SD card rather than a USB-Key; the advantage being that it doesn't stick out.

mikesLr

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

#23 Post by bigpup »

Quote:
Then
tried chainloader +1 in both - fail
tried chainloader /bootmgr in both - fail


Any specific details or it just did nothing??
The specific step by step details of what happens could be a clue to solving this!!!!!


Not sure if you tired this to get the Windows boot back to the Windows way of booting.

boot your system using Windows installation CD or via USB flash drive
go to "repair your system"
use command prompt (Troubleshoot ► Advanced Options ► Command Prompt)
type bootrec /fixboot then hit enter
type bootrec /fixmbr then hit enter
exit

I wonder if just doing type bootrec /fixboot then hit enter would help with Grub4dos problem? :idea:

That fixmbr is going to redo the mbr the windows way and put Windows boot loader in it.
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)

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

#24 Post by foxpup »

Ledster wrote:@foxpup
Yes, bootmgr is on both sda1 & sda2 - I have no idea why.
That confuses me ... and maybe grub4dos also. Can you try changing the name of one of them (to bootmgr.BAK or something), perhaps preferably the one in sda2?

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

#25 Post by Ledster »

@bigpup

You asked for details of what happens. Not much really!

1 The original menu.lst for windows:-
begin
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
end
boots as far as the splash screen (the windows 4 colour flag) and just hangs. No messages at all.

Windows sda1 & sda2
UUID xxxxxxxxxxxx
chainloader +1
As above - hangs at the splash screen, no messages

UUID xxxxxxxxxxxx
chainloader /bootmgr

both sda1 & sda2 UUID versions boot to the "Windows failed to start" screen.

start windows normally gives same as above.
Launch startup repair gives the usual options none of which help.

Using windows dvd:
Command prompt and bootrec /fixboot doesn't do anything. All as above with grub not affected.

Command prompt and
type bootrec /fixboot then hit enter
type bootrec /fixmbr then hit enter
then reboot - grub gone & hangs at windows splash screen.
cd start & run grub4dos, restart and back to normal - windows still hangs, but grub is fine.

@ foxpup
Tried that - no change.

To be continued!

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

#26 Post by foxpup »

Ledster wrote:To be continued!
Hmmm, running out of ideas. Some to try:
- Is anyone else actually booting windows7 with grub4dos? How?
- Did you look if the boot flag is on sda1? I suppose that is where grldr and menu.lst are. Are they?
- Have you been in your bios and does your bios 'see' windows, and grub4dos? What can you boot from there?
- Have you tried putting grub4dos on a fat32 usb stick and booting from there?

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

#27 Post by mikeslr »

Hi foxpup,

Just to complete the picture, although I installed grup4dos to a Fat32 formatted USB-Key in order to boot into Puppies without having to mess with Window 7's boot mechanisms, and with the expectation that I would remove the Key before booting into Windows 7, on occasion I have booted into Windows 7 via Grub4dos-Menu.lst on the Key.

The relevant menu.lst stanza is:


# Windows
# this entry searches Windows on the HDD and boot it up
title Windows\nBoot up Windows if installed
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
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


However, as indicated, I never tried to install grub4dos to the hard-drive. So it never had a chance to screw things up.

Completeness also requires that I mention that I did install Linux Mint Sarah, allowing its grub2 to control booting when the Key is absent. So my experience is that grub2 easily boots Windows 7 whether or not grub4dos has managed to screw things up, while grub4dos will work from a USB-Key at least if Windows boot mechanism otherwise functions.

mikesLr

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

#28 Post by foxpup »

Hi mikeslr

I am on a uefi windows 10 machine and I used to do the same as you: boot from fat32 usb with grub4dos on it and the kernels and inits of all the Puppies I booted that way. I did have a menu entry for windows 10, but I do not know whether I have ever used it and if it worked.
But this is what I had in menu.lst:

Code: Select all

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
Now I have installed refind on my SSD harddisc and that can boot most 64bit Puppies. I also took bootx64.efi from slackware, which is in fact grub2 binary. I chainload it also from refind and this can boot every Puppy, 32bit also. The grub binary can not boot 32bit if it is not chainloaded by refind!
This is more or less how fatdog also boots.

This is in the grub.cfg for booting windows 10 from grub2:

Code: Select all

menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --id='windows' {
	insmod part_gpt
	insmod fat
	set root='hd0,gpt1'
     #search --no-floppy --fs-uuid --set=root D837-503E
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
I also tried other binaries for grub2 and for some of them I needed the "search"-line that is not needed here and commented out.

Refind can boot windows from the refind.conf file. The entry is this:

Code: Select all

menuentry "Windows" {
    loader \EFI\Microsoft\Boot\bootmgfw.efi
}
Refind can also look for and find windows without help from this config.

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

#29 Post by bigpup »

Windows 10 and Windows 7 are different.
Do not start trying to fix Windows 7 based on what Windows 10 does.
UUID xxxxxxxxxxxx
chainloader /bootmgr

both sda1 & sda2 UUID versions boot to the "Windows failed to start" screen.

start windows normally gives same as above.
Launch startup repair gives the usual options none of which help.
I assumed Windows 7 started OK before you installed Puppy and Grub4dos.

The above info indicates there is something wrong with the Windows 7 install.
The above info shows that Grub4dos is starting the Windows boot process.
Launch startup repair gives the usual options none of which help.
That is the statement that says something is very much wrong with Windows install.
Could actually be missing the needed repair files on the hard drive or missing Windows actual operating system files.

Could you try to run this Windows startup repair by doing it from a Windows 7 disc?
https://www.lifewire.com/how-to-perform ... -7-2626170
Important Note:

If you want the Startup Repair to work properly, you must remove any flash drives or other USB storage devices, like external hard drives, from your computer before running the tool. Due to the way some computers report the storage space on USB connected drives, the Windows 7 Startup Repair may incorrectly report that it found no problems when in fact there may actually be an issue.

This will or should delete Grub4dos, but you can always redo it after you actually get Windows 7 to boot.
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

#30 Post by bigpup »

I know the above is going back to stuff you said you tried in the first post.

I am starting to wonder if you got Windows broken when you did any partitioning on the drive. :idea:

Was the drive always partitioned with 4 partitions?
Did you do some partitioning as part of installing Puppy?
If yes.
What did you do exactly?
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

#31 Post by Ledster »

Just to clear up a couple of things:

Startup repair has been run from the install dvd several times with no joy.

No partitioning was done prior to this problem. The partitions have been unchanged for several years.

Windows was working ok right up to the time I ran grub4dos.

Must admit I am beginning to have doubts it's an mbr problem, but I don't know of any way to find out other than what I've tried already.

It's a damn good puppy linux computer now!

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

#32 Post by bigpup »

Startup repair has been run from the install dvd several times with no joy.

That is the really strange part of this.
Startup repair is all about fixing just this type problem in Windows.

The Windows startup repair options should be able to change it back to Windows boot loader.

About mbr.
What Grub4dos config does is replace the Windows boot loader, that is in the mbr, with the one for Grub4dos.
That boot loader is only what boots the computer to a boot menu.
The actual files that boot the operating system are on the hard drive.
For Windows that is the bootmgr file.
BOOTMGR eventually executes winload.exe, the system loader used to continue the Windows boot process.
https://www.lifewire.com/windows-boot-m ... gr-2625813
Not sure how, but I think the actual Windows install got messed up.

Maybe Winload.exe is missing or corrupted. :idea:
Winload.exe Related Errors

If winload.exe has been corrupted or somehow deleted, Windows likely won't work as it should, and may display an error message like one of these:

Windows failed to start. A recent hardware or software change might be the cause
Again.
If you get this far in the Windows boot process, Grub4dos is booting Windows.
UUID xxxxxxxxxxxx
chainloader /bootmgr

both sda1 & sda2 UUID versions boot to the "Windows failed to start" screen.

start windows normally gives same as above.
Launch startup repair gives the usual options none of which help.
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
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

restores the MBR of hard drive to its original DOS/Win state

#33 Post by mikeslr »

Hi All,

I'm "late to the party" and about to take a break so haven't read this thread from the beginning. But having just read rcrsn51's post here, http://murga-linux.com/puppy/viewtopic. ... 653#980653 thought it might be pertinent to this problem.

"This is ms-sys from here. It restores the MBR of a hard drive to its original DOS/Win state. Use it to remove the Grub4Dos bootloader.

For example:
Code:
ms-sys -m -w /dev/sda #write an XP boot record
ms-sys -7 -w /dev/sda #write a Win7 boot record

Use with care.

Remove the fake .gz extension."

Link and applications are available on the cited thread,

mikesLr

Post Reply