You are Here:
Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.



Dual boot Win/Lin on separate HDs with a switch - bypass Grub?

Author (Read 332 times)

0 Members and 2 Guests are viewing this topic.

 

lintek

  • New to Forums
  • *
  • 15
    Posts
  • Country: us
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit
I installed a dual boot system with Windows 7 on one HD and Linux Lite on another.  Grub allowed me to choose which OS I wanted at bootup.  Since then I installed a Hard Drive switch so I can turn off the drives I am not currently using. 

And now I can't boot up to windows if I have the Linux drive off because the boot order points to Grub first (I assume).

How can I deal with this?  (Sorry - newb)

Thanks
 


Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #1 on: August 16, 2019, 03:20:26 AM »
 

DeepThought

  • Forum Regular
  • ***
  • 151
    Posts
  • Country: wales
  • Reputation: 30
  • Linux Lite Member
    • WKDfm Radio | WKDfm Chat

  • Linux Lite: 4.2 64bit

  • CPU: AMD Turion(tm) 64 x 2 Mobile Technology TL-60

  • MEMORY: 4Gb

  • VIDEO CARD: ATI RS480
It sounds like grub was installed to the mbr of your linux hdd and controls all boot functions.
You will need to recover the windows bootloader on the windows hdd.
Hope this website helps in that:

Code: [Select]
https://www.nextofwindows.com/how-to-manually-troubleshoot-and-repair-windows-7-bootloader
Don't forget to switch off your linux hdd before following the instructions to repair the mbr on the windows hdd :)
Owner and DJ at WKDfm Radio ( www.wkdfm.co.uk )
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #2 on: August 16, 2019, 04:21:00 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 827
    Posts
  • Country: gb
  • Reputation: 80
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core T7100@1.8GHz (2cores) on a Dell Latitude D630

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM965/GL960 Integrated Graphics Controller
To repair windows bootloader ...
- remove the HDD which has LL installed on it
- insert Win7 installation DVD & then boot from it
- choose option "repair your computer"  (it searches for Windows installation)
- select OS to repair
- next go to the Windows command prompt, you should then see the prompt: 
Code: [Select]
X:\sources>after the prompt type:
Code: [Select]
bootrec /fixbootthen the prompt will appear again, this time type:
Code: [Select]
bootrec /fixmbr
- press shutdown
- then boot up Windows (make sure you don't boot into the Win7 DVD)

You will now no longer have the grubscreen (as grub partition gone), but your windows bootloader is fixed & restored.

- turn off computer & put your LL HDD back in the machine.

You will now need to reinstall GRUB 2, deleting any old or  corrupted files in the process:

- insert your LL installation DVD & boot into LL from it (i.e. LL in the live environment)

For arguments sake, lets assume LL's root is installed on the partition /dev/sdb1, and Windows OS installed on the HDD designated /dev/sda (if you don't know or are unsure of the /dev/sdx designation of either Windows or LL, check it using gparted from your LL DVD to check - just type gparted into LL's menu search box):

So using terminal from your Live DVD, type:
Code: [Select]
sudo mount /dev/sdb1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
 
Reboot, select LL boot option from your PC's Settings.
When in LL update the grub (so it finds Windows OS), by typing following in terminal:
Code: [Select]
sudo update-grub
When you reboot you should then see both Windows & LL listed on the grubscreen.

Hope this helps - this has happened to me before with LL/Win7 dual-boots!

Have a good day
Mike




 
Last Edit: August 16, 2019, 07:34:35 AM by m654321
Linux user since 2014. Below: 64bit OS installed in Legacy mode on MBR (msdos/ext4) formatted SSDs, except the pi which uses a micro SDHC card:
2017 - Raspberry pi 3B (4cores) ~ Arm710@1.2GHz - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ i3-3110M - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom N455@1.66GHz - Manjaro (tried LL3 series but lagged)
2008 - Asus X71Q (2cores) ~ Intel T3200@2.0GHz - LL4.4/Win8.1 dual-boot (LL working beautifully)
2007 - Dell Latitude D630 (2cores) ~ Intel T7100@1.8GHz - LL3.8/Win8.1 dual-boot (LL really zippy!) - my daily driver  :-)
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #3 on: August 16, 2019, 08:08:39 AM »
 

trinidad

  • Gold Level Poster
  • *******
  • 972
    Posts
  • Country: us
  • Reputation: 175
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
i/e ... When you use a hardware switch you can't install a grub bootloader with both disks running because that would make one disk sda1 and the next one sdb1. When using such switches with MBR both disks would be sda1, or if your board allows you must combine the disks but I have not had much success with Windows/Linux dual boot doing that, only Linux/Linux.

TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #4 on: August 16, 2019, 11:01:21 AM »
 

lintek

  • New to Forums
  • *
  • 15
    Posts
  • Country: us
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit
Just to clarify - nothing was damaged as far as Grub.  If I Switch both HDs ON then it boots to Grub, I choose an OS, and it boots fine.

My goal is to: (before the computer is turned on)  Choose the current OS by switching that HD ON and leaving the other off.  Then have the computer boot to the OS that is turned ON.

Are there settings in "Grub Customizer" that might allow this?  Or maybe a fresh install of Linux with the other HD turned off?
Last Edit: August 16, 2019, 11:50:40 AM by lintek
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #5 on: August 16, 2019, 12:52:12 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 827
    Posts
  • Country: gb
  • Reputation: 80
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core T7100@1.8GHz (2cores) on a Dell Latitude D630

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM965/GL960 Integrated Graphics Controller
Just to clarify - nothing was damaged as far as Grub.  If I Switch both HDs ON then it boots to Grub, I choose an OS, and it boots fine.
Okay, sorry I misunderstood - I thought your Window's bootloader & Grub needed repairing, following on from DeepThought's comment.

Quote
My goal is to: (before the computer is turned on)  Choose the current OS by switching that HD ON and leaving the other off.  Then have the computer boot to the OS that is turned ON.
I'm not familiar at all with a hard drive switcher - I assumed you meant choosing the HDD drive from the PC's boot settings. What advantage does it confer, over the usual method of choosing your OS from the onscreen grublist when booting. TC mentions that a hard drive switcher & Grub are incompatible & gives reasons, so maybe better to drop the HDD-switcher as it just seems to over-complicate things ...

Quote
Are there settings in "Grub Customizer" that might allow this?  Or maybe a fresh install of Linux with the other HD turned off?
I would stay away from that app - my experience of it in the past is that it's pretty buggy and can really mess up things - I don't use it anymore.
Last Edit: August 16, 2019, 12:55:06 PM by m654321
Linux user since 2014. Below: 64bit OS installed in Legacy mode on MBR (msdos/ext4) formatted SSDs, except the pi which uses a micro SDHC card:
2017 - Raspberry pi 3B (4cores) ~ Arm710@1.2GHz - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ i3-3110M - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom N455@1.66GHz - Manjaro (tried LL3 series but lagged)
2008 - Asus X71Q (2cores) ~ Intel T3200@2.0GHz - LL4.4/Win8.1 dual-boot (LL working beautifully)
2007 - Dell Latitude D630 (2cores) ~ Intel T7100@1.8GHz - LL3.8/Win8.1 dual-boot (LL really zippy!) - my daily driver  :-)
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #6 on: August 16, 2019, 01:22:10 PM »
 

lintek

  • New to Forums
  • *
  • 15
    Posts
  • Country: us
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit
This is the HD switcher I was talking about.  Basically it is an on/off switch for each of the internal Hard Drives.  I use it to keep my backup disconnected when not in use, and was hoping to do the same with the unused OS.

https://www.amazon.com/gp/product/B00TZR3E70/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #7 on: August 16, 2019, 03:08:13 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 827
    Posts
  • Country: gb
  • Reputation: 80
  • Linux Lite Member, 'Advocate' & Donator

  • Linux Lite: 3.8 64bit

  • CPU: Intel Core T7100@1.8GHz (2cores) on a Dell Latitude D630

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM965/GL960 Integrated Graphics Controller
This is the HD switcher I was talking about.  Basically it is an on/off switch for each of the internal Hard Drives.  I use it to keep my backup disconnected when not in use, and was hoping to do the same with the unused OS.
https://www.amazon.com/gp/product/B00TZR3E70/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1

Many thanks for clarifying with this link. 
So, why don't you keep your dual-boot system on a single drive (keep it as /dev/sda) instead of the two OS on two different drives? That way I think your back-up drive will always be /dev/sdb whether it's switched on or not.  Even better, why not have your backup drive as an external USB drive (instead of an internal drive), that way you can simply unmount and eject it when not needed and this wont affect the /dev/sdx designation of your dual-boot drive ...

See what TC thinks - I'm pretty sure he'll know
Last Edit: August 16, 2019, 03:13:46 PM by m654321
Linux user since 2014. Below: 64bit OS installed in Legacy mode on MBR (msdos/ext4) formatted SSDs, except the pi which uses a micro SDHC card:
2017 - Raspberry pi 3B (4cores) ~ Arm710@1.2GHz - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ i3-3110M - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom N455@1.66GHz - Manjaro (tried LL3 series but lagged)
2008 - Asus X71Q (2cores) ~ Intel T3200@2.0GHz - LL4.4/Win8.1 dual-boot (LL working beautifully)
2007 - Dell Latitude D630 (2cores) ~ Intel T7100@1.8GHz - LL3.8/Win8.1 dual-boot (LL really zippy!) - my daily driver  :-)
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #8 on: August 16, 2019, 04:01:31 PM »
 

lintek

  • New to Forums
  • *
  • 15
    Posts
  • Country: us
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 4.4 64bit
...So, why don't you keep your dual-boot system on a single drive (keep it as /dev/sda) instead of the two OS on two different drives? That way I think your back-up drive will always be /dev/sdb whether it's switched on or not...

Kinda funny you mentioned that.  Actually I just broke my external drive OUT of its' box so that I could mount it internally and run it off the switch (LOL)!  (Wanted to clear away some of the stuff around my PC and had already ordered the switch, so I decided internal was the way to go.

I'm not sure if I tried it yet, but in my mind, if I set the Boot order to:
1) Windows HD
2) Grub
3)Linux HD

Then if the Windows HD is not present (turned OFF) it should move on to the next HD which would be the Grub partition.  I will test it this evening.
 

Re: Dual boot Win/Lin on separate HDs with a switch - bypass Grub?
« Reply #9 on: August 16, 2019, 08:35:23 PM »
 

firenice03

  • Rockin' the FREE World
  • Platinum Level Poster
  • **********
  • 1105
    Posts
  • Country: us
  • Reputation: 220
  • Linux Lite Member

  • Linux Lite: 4.4 64bit

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880
...So, why don't you keep your dual-boot system on a single drive (keep it as /dev/sda) instead of the two OS on two different drives? That way I think your back-up drive will always be /dev/sdb whether it's switched on or not...

Kinda funny you mentioned that.  Actually I just broke my external drive OUT of its' box so that I could mount it internally and run it off the switch (LOL)!  (Wanted to clear away some of the stuff around my PC and had already ordered the switch, so I decided internal was the way to go.

I'm not sure if I tried it yet, but in my mind, if I set the Boot order to:
1) Windows HD
2) Grub
3)Linux HD

Then if the Windows HD is not present (turned OFF) it should move on to the next HD which would be the Grub partition.  I will test it this evening.

Going to throw out a MAYBE...
Is this UEFI??  - Probably not and may not work in same fashion..
But on my kangaroo - I have Windows on the internal and LL running from a SDcard.
If I have "ubuntu" selected in uefi bios - I get normal grub...
If I set windows boot manager I will only get windows normal boot process....

Might be kinda what you'd want but system may not be....
LL 4.4 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL 4.4 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL 4.4 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL 3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express
RETIRED LL 2.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA
Running Linux Lite since LL2.2
 


Tags:
 


Linux Lite 4.6 RC1 has been released. See the Release Announcements section for more information.