Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 21 Feb 2018, 18:59
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Can't boot windows 7 after installing Grub4dos
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [33 Posts]   Goto page: 1, 2, 3 Next
Author Message
Ledster

Joined: 26 Aug 2006
Posts: 83
Location: Devon, England

PostPosted: Fri 12 Jan 2018, 16:57    Post subject:  Can't boot windows 7 after installing Grub4dos  

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?
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10052
Location: Charleston S.C. USA

PostPosted: Fri 12 Jan 2018, 18:11    Post subject:  

Quote:
Windows 7 on the second partition).


This should be the menu entry that boots Windows 7 on second partition sda2
Code:
title Windows (sda2)
uuid 56C672D0C672B03B
chainloader /bootmgr


Try changing the chainloader line to:
Code:
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:
chainloader /boot/bootmgr


Or maybe try to move the bootmgr file to just on sda2.

_________________
I have found, in trying to help people, that 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 Shocked

Last edited by bigpup on Sat 13 Jan 2018, 22:58; edited 1 time in total
Back to top
View user's profile Send private message 
Ledster

Joined: 26 Aug 2006
Posts: 83
Location: Devon, England

PostPosted: Sat 13 Jan 2018, 12:14    Post subject:  

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.
Back to top
View user's profile Send private message 
LateAdopter

Joined: 27 May 2011
Posts: 285
Location: Reading UK

PostPosted: Sat 13 Jan 2018, 14:06    Post subject:  

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.
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 372
Location: europa near northsea

PostPosted: Sat 13 Jan 2018, 14:38    Post subject:  

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.
Quote:
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.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10052
Location: Charleston S.C. USA

PostPosted: Sat 13 Jan 2018, 23:45    Post subject:  

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:
cat sda_mbr.bak > /dev/sda

press enter.

Now reboot and see if you can now boot into Windows.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10052
Location: Charleston S.C. USA

PostPosted: Sun 14 Jan 2018, 00:03    Post subject:  

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


Any specific details or it just did nothing??

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1452

PostPosted: Sun 14 Jan 2018, 00:26    Post subject:  

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

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.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10052
Location: Charleston S.C. USA

PostPosted: Sun 14 Jan 2018, 02:02    Post subject:  

Sailor Enceladus,

Help us out.
What menu entry, in Grub4dos, boots Windows 7 for you?
What is in the entry that works?

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1452

PostPosted: Sun 14 Jan 2018, 09:41    Post subject:  

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.
Back to top
View user's profile Send private message 
Philh

Joined: 17 May 2006
Posts: 134
Location: England

PostPosted: Sun 14 Jan 2018, 10:54    Post subject:  

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
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2195
Location: 500 seconds from Sol

PostPosted: Sun 14 Jan 2018, 12:33    Post subject: Perhaps an annoying workaround -- a Linux with Grub2  

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. Embarassed

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. Sad

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.php?p=462720#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.php?p=818727#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.php?p=975594#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
Back to top
View user's profile Send private message 
MrToad


Joined: 13 Dec 2007
Posts: 61
Location: East Devon, GB

PostPosted: Sun 14 Jan 2018, 12:47    Post subject:  

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
Back to top
View user's profile Send private message 
foxpup


Joined: 29 Jul 2016
Posts: 372
Location: europa near northsea

PostPosted: Sun 14 Jan 2018, 13:57    Post subject:  

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?
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 2960
Location: Tamworth UK

PostPosted: Sun 14 Jan 2018, 16:18    Post subject:  

Quote:
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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 3 [33 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0944s ][ Queries: 14 (0.0105s) ][ GZIP on ]