 |
21-06-2007, 11:10 PM
|
#1 (permalink)
|
|
Evil Genius
Join Date: Oct 2004
Location: Bangalore
Posts: 692
|
Windows & Linux with 2 HDDs...
Hi, I recently purchased an extra HDD with the idea that I would dedicate one drive for Linux and one for Windows exclusively. This way, I had a lot of flexibility to use Linux exclusively and only switch to Windows when I needed to play the odd game or use Nokia PC Suite etc for my phone.
Now, the problem is when I installed my new HDD, it wouldn't let me boot to Sabayon, so I fiddled with my HDD arrangements (its all SATA) so it booted into Windows. I then formatted my new drive (160 GB) to NTFS and transferred all my data to it. Once I verified that my data was backed up, I removed the 160 GB drive and fully formatted my regular drive. Once it was clean, I installed Sabayon on the main drive (300 GB) and then transferred all my data to my main drive from the 160 GB drive.
NOW my problems started...I removed my linux drive (because I couldn't boot otherwise) and then installed Windows on my 160 GB drive. Now I thought that my work was done. When I rebooted, only Windows was loading and no amount of fixing brought me to the GRUB screen. So then I removed my Windows drive...which lets me load Linux fine.
NOW the problem is I can only ever use ONE drive at the same time. If I want to use Windows, I have to manually disconnect the Linux drive and vice versa.
How do I set up my system of 2 HDDs to dual-boot properly so I can choose to boot into Linux or Windows as I choose?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
21-06-2007, 11:40 PM
|
#2 (permalink)
|
|
"The Gentleman"
Join Date: Sep 2006
Posts: 1,434
|
Re: Windows & Linux with 2 HDDs...
i dont understand ur problem completely dude.
__________________
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
- Dijkstra
|
|
|
21-06-2007, 11:41 PM
|
#3 (permalink)
|
|
Alpha Geek
Join Date: Mar 2005
Location: Chennai , India
Posts: 693
|
Re: Windows & Linux with 2 HDDs...
So you installed Sabayon(gentoo) on sda and Windows on sdb right ?
Boot into knoppix or some rescue livecd and mount all your linux partitions from the main drive, ie /dev/sda the 300 GB one in /mnt.
Use swapon to enable swap space, if you have using swapon /dev/sda x or the swap file.
Mount the /proc and the /dev to your sabayon parititions.
Code:
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
Now chroot into your gentoo insatllation.
Code:
chroot /mnt /bin/bash
env-update
source /etc/profile
append the following to /boot/grub/menu.lst
Code:
title=Windows
rootnoverify (hd1)
makeactive
chainloader +1
then run grub (if you donot have a floppy use grub --no-floppy to avoid it probing for one), when it drops you into the grub shell, do the following.
Code:
root (hd0,0) ;; assuming your root partition is here
setup (hd0)
quit
now unmount all your partitions along with the root partition at last and swapoff the swap space and reboot.
This should hopefully, let you boot both windows and sabayon.
__________________
Call it Emacs,
Love it or Leave it.
|
|
|
22-06-2007, 12:00 AM
|
#4 (permalink)
|
|
Wise Old Owl
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
|
Re: Windows & Linux with 2 HDDs...
Please post ur problem correctly in an understandable manner.
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
|
|
|
22-06-2007, 12:17 AM
|
#5 (permalink)
|
|
Beneath The Eyelids
Join Date: Aug 2006
Posts: 289
|
Re: Windows & Linux with 2 HDDs...
i would recommend keeping the OSes on a single drive and use the other drive/drives only for data storage, atleast thats what i do.
|
|
|
22-06-2007, 01:00 AM
|
#6 (permalink)
|
|
El mooooo
Join Date: Jan 2006
Location: India
Posts: 1,414
|
Re: Windows & Linux with 2 HDDs...
Quote:
|
Originally Posted by Chester
i would recommend keeping the OSes on a single drive and use the other drive/drives only for data storage, atleast thats what i do.
|
If you have the resources...it is much better to do what he is doing
__________________
Windows users shouldn't get to use the real computers. They know just enough to be dangerous.
|
|
|
22-06-2007, 01:07 AM
|
#7 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Windows & Linux with 2 HDDs...
Quote:
|
Originally Posted by faraaz
NOW the problem is I can only ever use ONE drive at the same time. If I want to use Windows, I have to manually disconnect the Linux drive and vice versa.
How do I set up my system of 2 HDDs to dual-boot properly so I can choose to boot into Linux or Windows as I choose?
|
U need to put GRUB into the MBR of first hdd where windows is installed.for that u may boot into sabayon and fix grub and ask GRUB to put into ur MBR of first hdd(or ur windows hdd).
Quote:
|
Originally Posted by Chester
i would recommend keeping the OSes on a single drive and use the other drive/drives only for data storage, atleast thats what i do.
|
Yes.I follows the same with full access to the partitions.and the partitions are all ext3
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
Last edited by praka123; 22-06-2007 at 01:07 AM.
Reason: Automerged Doublepost
|
|
|
22-06-2007, 09:38 AM
|
#8 (permalink)
|
|
Alpha Geek
Join Date: Mar 2005
Location: Chennai , India
Posts: 693
|
Re: Windows & Linux with 2 HDDs...
Quote:
|
Originally Posted by eddie
If you have the resources...it is much better to do what he is doing 
|
Well.. i think it depends isn't it?  (wow with that much space) A MUCH better solution IMHO is to use lvm.
Here is a primer on lvm -> http://www.freeos.com/articles/3921/
__________________
Call it Emacs,
Love it or Leave it.
Last edited by Satissh S; 22-06-2007 at 09:46 AM.
|
|
|
22-06-2007, 10:56 AM
|
#9 (permalink)
|
|
"The Gentleman"
Join Date: Sep 2006
Posts: 1,434
|
Re: Windows & Linux with 2 HDDs...
Quote:
|
Originally Posted by Satissh S
|
thanks for sharing.
__________________
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
- Dijkstra
|
|
|
22-06-2007, 11:43 AM
|
#10 (permalink)
|
|
El mooooo
Join Date: Jan 2006
Location: India
Posts: 1,414
|
Re: Windows & Linux with 2 HDDs...
Quote:
|
Originally Posted by Satissh S
Well.. i think it depends isn't it?  (wow with that much space) A MUCH better solution IMHO is to use lvm.
|
I was replying about having two operating systems on one hard drive or on two different hard drives. Not regarding the management of partitions
__________________
Windows users shouldn't get to use the real computers. They know just enough to be dangerous.
|
|
|
22-06-2007, 08:54 PM
|
#11 (permalink)
|
|
Evil Genius
Join Date: Oct 2004
Location: Bangalore
Posts: 692
|
Re: Windows & Linux with 2 HDDs...
Hmm...sorry if my problem was confusing...I have two hard drives (sda & sdb).
SDA has Sabayon, SDB has XP. I was only able to boot SDA or SDB...never both together.
@Satissh: I tried your method, when I did so...all I got was a black screen with the following msg:
Windows
rootnoverify (hd1)
makeactive
chainloader +1
...and that's it. Nothing happens...
PS: I've got them on different hard drives because of two reasons which are interlinked -
1) Linux runs on one partition only, correct? I read this on some hi-funda Linux tips site. They recommended installing Linux on one BIG partition. Earlier, I was trying it out generally on a small 30 GB partition, but I felt comfortable shifting totally to Linux. So I transferred all my music, videos, documents and other such data to Linux so that I wouldn't have space constraints and I didn't have crippled functionality in software such as Amarok.
2) Keeping them separate lets me transfer my Windows hard drive to another computer when I need to (I do this to transfer music and videos from my friends and also to take my data with me)...and I still am able to use Linux on my home computer)...
Edit: DUDES!!! If I press F8 while my computer boots up, I am given a choice of which device I want to boot first...and it shows BOTH my hard drives!! Hehe...I didnt know this till now! Great...now I've set it up so that Linux boots by default and when I want to play games, I can just re-boot to Windows by pressing F8 during startup...
Its a little messy, but what the hell!?
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
Last edited by faraaz; 22-06-2007 at 10:55 PM.
|
|
|
23-06-2007, 11:26 AM
|
#12 (permalink)
|
|
"The Gentleman"
Join Date: Sep 2006
Posts: 1,434
|
Re: Windows & Linux with 2 HDDs...
use fdisk -l and paste output here,
they can know d problem well. it might help .
i too have 2 sata disk... one for windows and other for linux.
offtopic: how much did u pay for ur ATI x1650 256 MB card, and from where did u buy (did u buy from s.p.road)
to which nvidia card is this ati card equivalent? coz i know 7600GT == x1600.
__________________
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
- Dijkstra
Last edited by vish786; 23-06-2007 at 11:26 AM.
Reason: Automerged Doublepost
|
|
|
23-06-2007, 11:44 AM
|
#13 (permalink)
|
|
I see right through you.
Join Date: Sep 2005
Location: Chennai
Posts: 597
|
Re: Windows & Linux with 2 HDDs...
I guess that what you're doing when pressing F8 is to get into BIOS and change the boot order? That's not exactly advised, though it works. You should try to fix GRUB.
If Windows is installed on the second hard drive, then grub won't handle things well natively, because Windows always thinks it's installed on the first hard drive.
You need to add the following lines to the windows entry of your menu.lst :
Code:
map (hd1) (hd0)
map (hd0) (hd1)
Then point your bios to GRUB, and see if you can boot windows.
__________________
I didn't make the world, I only try to live in it.
http://lucentbeing.com
-- Sykora --
|
|
|
23-06-2007, 03:55 PM
|
#14 (permalink)
|
|
Evil Genius
Join Date: Oct 2004
Location: Bangalore
Posts: 692
|
Re: Windows & Linux with 2 HDDs...
@Vish: As requested...here is my fdisk output...
faraaz@localhost ~ $ su
Password:
localhost faraaz # fdisk -l
Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 36481 292929210 8e Linux LVM
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 3916 31455238+ 7 HPFS/NTFS
/dev/sdb2 3917 19456 124825050 f W95 Ext'd (LBA)
/dev/sdb5 3917 19456 124825018+ 7 HPFS/NTFS
Disk /dev/sdc: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 10 80293+ 0 Empty
/dev/sdc2 * 11 3648 29222235 c W95 FAT32 (LBA)
localhost faraaz #
@sykora: I already tried what you said. I'd looked it up in google search, looking for dualboot and grub configuration as search terms. The pages I found were relevant to fedora, but the hd numbers and stuff were the same.
You know, I managed to get USB working in XP as a guest host on VirtualBox...so now the only reason I need Windows for is gaming, and that too for games which need hardware accelaration and a card based T&L engine. Most of my regular games which I play over and over like Baldurs Gate, Commandos, Fallout & Icewind Dale work through the VM on Linux. Also, Oblivion works through WINE on my computer. I even installed Nokia PC Suite on my Linux through the VM which is pretty awesome. I don't need my XP partition at all now.
But I'm hanging on to it, just in case!
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
|
|
|
23-06-2007, 05:25 PM
|
#15 (permalink)
|
|
In The Zone
Join Date: Oct 2006
Location: Mumbai
Posts: 365
|
Re: Windows & Linux with 2 HDDs...
go to bios menu in 1st boot option select the drive on which u have installed linux save the setting and reboot now it will boot from linux drive and load grub
now boot into ubuntu and open terminal
and enter this command
Quote:
|
sudo gedit /boot/grub/menu.lst
|
it will open menu.lst on gedit now scroll to the bottom and enter this
Quote:
#windows boot info
title Windows
root (hd1,0)
savedefault
makeactive
chainloader +1
|
save it and than reboot
__________________
Dhiraj Thakur
thakur.dheeraj(@)gmail.com
Last edited by Desi-Tek.com; 23-06-2007 at 05:40 PM.
|
|
|
23-06-2007, 05:54 PM
|
#16 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Windows & Linux with 2 HDDs...
@faraaz:at any time "info grub" is the better guide.
so u got 3 harddrives!you got a 30GB hdd? 
@sykora is correct,windows always assumes to be on the first partition of the first hdd! 
the workaround:
Quote:
4.2.6 DOS/Windows
-----------------
GRUB cannot boot DOS or Windows directly, so you must chain-load them
(*note Chain-loading:. However, their boot loaders have some critical
deficiencies, so it may not work to just chain-load them. To overcome
the problems, GRUB provides you with two helper functions.
If you have installed DOS (or Windows) on a non-first hard disk, you
have to use the disk swapping technique, because that OS cannot boot
from any disks but the first one. The workaround used in GRUB is the
command `map' (*note map:, like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
This performs a "virtual" swap between your first and second hard
drive.
|
source:Grub manual
so add below entry as root or run(alt+f2):
Code:
kdesu kate /boot/grub/menu.lst
and add below at a new line at the last:
Code:
title Windows XP on 160GB hdd
root(hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
will work;else post the o/p.we can try getting ur Grub to work with Windows
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
Last edited by praka123; 23-06-2007 at 06:31 PM.
|
|
|
23-06-2007, 07:08 PM
|
#17 (permalink)
|
|
Evil Genius
Join Date: Oct 2004
Location: Bangalore
Posts: 692
|
Re: Windows & Linux with 2 HDDs...
30 GB is my iPod...it was plugged in when I ran fdisk...
I'm leavin for a movie right now...I'll go fiddle with this and get back to ya'll...
__________________
Roses are #FF0000, Violets are #0000FF...All of my base are belong to you!
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|