LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 07-12-2012, 02:04 AM   #1
prioryjim
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Rep: Reputation: Disabled
Grub won't load windows after 2nd HDD removed


I have had a PC with windows vista installed, it has worked OK for a while.
I added a second disk drive and install Debian on this.
Part of the install was about grub details.
After I had completed the install the system would not offer windows as an option and would only boot into Debian.
I used a command osprobe (or similar) which fixed this and I could select windows in the initial grub menu.
All OK so far I could select windows or Linux.

I removed the second hard disk which I guess had the grub details on it.
When booting it goes into grub rescue mode.
I could reconnect the 2nd hard drive and things would be OK.
Questions.
1) Is there any way to get grub to boot windows with only the original hard drive and windows partition ?
2) Is there a rescue mode command I could type, I can inspect the grub config files on the 2nd disk ?

Thanks Jim
 
Old 07-12-2012, 02:14 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,607

Rep: Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243Reputation: 1243
I think it is not a problem with grub, but a problem with the windows itself. Usually windows unable to find the boot partition if the order of partitions changed (especially if you deletes a partition or removes a disk). But it also depends on the location of the windows system drive (c:\)
 
Old 07-12-2012, 03:10 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,206

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
On the contrary, Vista is probably o.k., but the Debian install over-wrote the MBR of the original disk.
Quote:
1) Is there any way to get grub to boot windows with only the original hard drive and windows partition ?
1) Is there a rescue mode command I could type, I can inspect the grub config files on the 2nd disk ?
1) Not worth the effort - you would have to find a partition for grub, or use something like grub4dos.
2) Boot Debian and use the applicable grub recovery commands to install to the second disks MBR. Might be grub-install and update-grub - check the Debian doco.
Then pull the second disk out, boot the Vista install/recovery CD and get into recovery centre, and recover the MBR .

Then the box should boot as normal without the second disk, and the second disk should boot if installed and selected as the boot disk from the BIOS.
 
Old 07-12-2012, 04:12 AM   #4
prioryjim
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Yes vista ( and Debian ) are OK if the second disk is installed.
So I think you mean.

1) Using the Vista recovery disk re install the MBR on the first disk. this will be the default one the BIOS picks.
And hence Vista will boot without any reference to grub.

2) Then in Debian install grub to the second disk MBR. Then I would need to select which disk to boot from in the BIOS i.e. F12 on my DELL PC.

Any pointers to further details on how to do 1)

Thanks
Jim
 
Old 07-12-2012, 04:36 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,206

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
When in doubt, refer to technet.
 
Old 07-12-2012, 05:06 AM   #6
prioryjim
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Re backup:
I have most personal items backed up.
But Vista has had a few years of installing apps and browsing the internet.
So although I have a virus scanner I wouldn't trust it at all for any financial process.
Hence trashing it might be a bonus!
Any secure transactions I always boot from a Linux CD and go directly to the site.
Hopefully this should ensure no viruses assuming CD is clean.
Will try recovery at weekend when I get some time.
 
Old 07-12-2012, 08:59 AM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,526
Blog Entries: 2

Rep: Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022Reputation: 4022
If you need help to recover the bootloader have a look here: http://www.linuxquestions.org/questi...rtitions-4060/
 
Old 07-12-2012, 09:17 AM   #8
prioryjim
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Look like what I need.
Thanks
Jim
 
Old 07-14-2012, 02:46 AM   #9
prioryjim
LQ Newbie
 
Registered: Jul 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Took off 2nd disk and used Vista CD.
Worked perfectly and Vista now boots OK from 1st drive.

Re connected 2nd drive ( with Debian already on it )
Used Debian install disk and booted into rescue mode.

It seemed to want to reinstall OS but by going back I found a menu of things to do.
From the options there was "install grub" "install lilo"
Selected grub but it went into format drives again.
As my Debian was brand new I eventually capitulated and let it reformat drive.
But aborted at grub install as grub want to use the 1st drive.

Messed around trying to get just grub or lilo but again it always wanted to format drives.

Gave up and did a full re-install of Debian from CD.
But again it wanted to use grub and put it on 1st drive, skipped grub.
It then looked like it was installing grub but must not have cause Vista still booted.

Then ran rescue from CD and tried lilo from menu. Again format drives.
Eventually by going back and forth I got to a lilo install, and selected /dev/sdb
Lilo tried to install but said it had failed.
But it must have worked cause when selecting 2nd drive in boot menu lilo booted into Debian OK.

So in conclusion... problem solved thanks to all.
But Debian rescue menus seem a bit strange.

Thanks again
Jim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 5.7 partition problem -- VolGroup00 removed, 2nd HDD ... oneclick Linux - Server 7 12-25-2011 06:09 AM
XP on 1 HDD,Linux on 2nd HDD,remove ,other won't launch Dark Templar Linux - Newbie 3 05-07-2006 11:03 AM
GRUB won't load Windows Norab Linux - Hardware 1 08-19-2005 01:33 PM
Removed Second HD with Dual-Boot RH9/XP Box; Now Grub Won't Load MadFunk Linux - General 1 01-05-2004 06:29 PM
1st HDD = RH9.0 (grub) ... How do I modify grub when adding 2nd hard disk ? Onyx^ Linux - Software 1 09-05-2003 09:16 AM


All times are GMT -5. The time now is 04:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration