You are not logged in.

#1 2015-04-18 01:51:36

jl2014
Member
Registered: 2013-06-17
Posts: 14

[Solved]dual boot windows 7 and arch linux

I have successfully installed arch linux dual boot with the original win7 on my PC. If I only use linux, then the system works well. The problem is that once I boot into Win7 then after reboot, the linux boot manager will stop working and the system always boots into windows automatically. My guess is Win7 automatically repair the boot loader.

My current solution is whenever I have finished using Windows, I'll boot with my linux USB installation, and run "gummiboot --path=/boot install". Afterwards, linux will work fine. But I believe there must be a better solution. Any help will be appreciated.

I have UEFI board by the way.

Last edited by jl2014 (2015-04-19 17:35:57)

Offline

#2 2015-04-18 12:37:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: [Solved]dual boot windows 7 and arch linux

Have you tried the recommendations in Menu_does_not_appear_after_Windows_upgrade on the archwiki gummiboot page ?

(I realise you haven't done that upgrade, but those recommendations look like they are worth a try).


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2015-04-18 12:56:26

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]dual boot windows 7 and arch linux

I have a laptop that always boots the Windows bootmanager automatically and the only solution I found was to rename the /boot/Microsoft folder (to /boot/hidden) and create a gummiboot menu entry to boot Windows manually:

# /boot/loader/entries/windows.conf
title    Windows
efi      /hidden/Boot/bootmgfw.efi

(The above path may not be 100% correct as I don't have access to the machine ATM)

EDIT: I think it's /boot/EFI/Microsoft/Boot/bootmgfw.efi (omit the leading /boot for the windows.conf as all paths are read relative to the ESP).

Last edited by Head_on_a_Stick (2015-04-18 16:37:23)

Offline

#4 2015-04-18 13:08:52

dcdriving
Member
From: United Kingdom
Registered: 2015-01-20
Posts: 70

Re: [Solved]dual boot windows 7 and arch linux

I second HoaS.  I didn't have the savvy to do that though as I was just experimenting with ubuntu but grub created two entries for windows 7, one of which always booted the boot manager and I had to remember to avoid it at all costs and use the other.  I think there is also some bloatware from some manufacturers such as dell that comes with windows that runs on startup and tries to repair any issues with the boot without telling you.

Offline

#5 2015-04-18 18:17:20

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [Solved]dual boot windows 7 and arch linux

If you go into your bios, check to see what your options are for your boot order.
I just did an install myself of arch onto a win7 machine.  I found that the system was resistant to changing from the windows boot manager.  I ended up using refind-efi rather than gummiboot before it would change.  Also, I don't remember the setting off the top of my head, but in my acer system, there was an option that took out the boot manager option (both linux and windows) and set the option to be the drive.

Not sure if that will help, but it's worth a peek.


Knute

Offline

#6 2015-04-18 23:52:53

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

Thanks for all your help first! I have tried Head_on_a_Stick's suggestions as the first step. Here is what I did. I have created :

$ cat /boot/loader/entries/windows.conf 
title 	Windows
efi	/EFI/hidden/Boot/bootmgfw.efi

The window boot path was :

/boot/EFI/Microsoft/Boot/bootmgfw.efi

and I changed

/boot/EFI/Microsoft

to

/boot/EFI/hidden

After reboot, I clicked 'Windows' option on the linux boot manager. Below are the error messages:

Windows failed to start. 
... ... 
File: \EFI\Microsoft/Boot/BCD
... ...
Info: An error occurred while attempting to read the boot configuration data.

Any idea what goes wrong?

I'll try other suggestions soon. Thanks all of you again.

Last edited by jl2014 (2015-04-19 00:03:33)

Offline

#7 2015-04-19 00:08:47

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]dual boot windows 7 and arch linux

Change the folder name back to "Microsoft" and create a directory at /boot/hidden then move the Microsoft folder into that directory and change the path in windows.conf accordingly.

I tried it with a Windows 10 system, version 7 must do things slightly differently. This may not work at all if more files need to be read from a particular path after the Windows bootmnager has loaded.

Make a backup of the Microsoft folder, just in case©

Offline

#8 2015-04-19 01:16:25

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

Although you have warned about doing a backup, I still messed it up ...
Somehow when I copy/backup the folder, the subfolder was not copied. Now under Microsoft folder, I did not back up Boot subfolder. Windows cannot be booted any more.

I guess I'll have to do a factory restore first?

Offline

#9 2015-04-19 01:23:02

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]dual boot windows 7 and arch linux

jl2014 wrote:

Although you have warned about doing a backup, I still messed it up ...
Somehow when I copy/backup the folder, the subfolder was not copied. Now under Microsoft folder, I did not back up Boot subfolder. Windows cannot be booted any more.

I guess I'll have to do a factory restore first?

Yes I think so.

I'm really sorry about that, I should have told you to back it up in my first post.
hmm

Offline

#10 2015-04-19 01:30:07

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

My PC is about one month new. Nothing really important. I'll get back here when I get it done.

Offline

#11 2015-04-19 16:47:57

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

I found out that I did not explain the question clearly.

The linux boot manager works fine.It is also set as default manager as expected. I can enter both linux and windows at my choice. 

However, I may occasionally still need to use Win7. I can choose to run windows from linux manager. The problem is once I reboot out from Windows. Then the system will not detect linux boot manager any more. Instead will run win7 automatically. It must be win7 automatically repaired the boot manager.

Offline

#12 2015-04-19 16:56:25

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [Solved]dual boot windows 7 and arch linux

Did you check your bios options?  My guess is that the bios is going back to the windows boot manager, rather than staying on the linux boot manager.  Unless you set up the windows boot manager to have an option for booting linux, you may want to look into your bios options, as I previously suggested.


Knute

Offline

#13 2015-04-19 17:40:06

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

Thinking about it again, I realized the issue is really the startup auto recovery function of Win7. After googling on this issue, I disabled the startup recovery. Then everything backs to normal.

Thanks for all your input!

Offline

#14 2015-04-19 17:45:35

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

When I did my first archie installation, I had similar issue. It always boot into windows automatically. Later, I found out my problem was when I modified the loader.conf, I forgot to uncomment

#timeout 5
Head_on_a_Stick wrote:

I have a laptop that always boots the Windows bootmanager automatically and the only solution I found was to rename the /boot/Microsoft folder (to /boot/hidden) and create a gummiboot menu entry to boot Windows manually:

# /boot/loader/entries/windows.conf
title    Windows
efi      /hidden/Boot/bootmgfw.efi

(The above path may not be 100% correct as I don't have access to the machine ATM)

EDIT: I think it's /boot/EFI/Microsoft/Boot/bootmgfw.efi (omit the leading /boot for the windows.conf as all paths are read relative to the ESP).

Last edited by jl2014 (2015-04-19 17:48:03)

Offline

#15 2015-04-20 06:48:07

c3kay
Member
From: New Zealand
Registered: 2015-04-19
Posts: 61

Re: [Solved]dual boot windows 7 and arch linux

I've just spent the afternoon working through this exact issue - after gummiboot, grub and syslinux all got 'fixed' by Windows 7. The solution for me was to install rEFInd through Windows using these instructions. It looks like as long as Windows is a party to modifying the bootloader, it'll preserve changes. If it's done outside - mine was done in Arch and through live USB - then it tries to fix it.

Offline

#16 2015-04-21 02:04:33

jl2014
Member
Registered: 2013-06-17
Posts: 14

Re: [Solved]dual boot windows 7 and arch linux

The method I used:

Idea : Disable auto recovery of Windows 7.

Inside Win7 : go to run -> search 'cmd' (rigrt click, open as administrator) -> type in

 bcdedit /set {default} recoveryenabled No 

Done!

c3kay wrote:

I've just spent the afternoon working through this exact issue - after gummiboot, grub and syslinux all got 'fixed' by Windows 7. The solution for me was to install rEFInd through Windows using these instructions. It looks like as long as Windows is a party to modifying the bootloader, it'll preserve changes. If it's done outside - mine was done in Arch and through live USB - then it tries to fix it.

Last edited by jl2014 (2015-04-21 02:46:53)

Offline

Board footer

Powered by FluxBB