Windows & Linux with 2 HDDs...

Status
Not open for further replies.

faraaz

Evil Genius
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?
 

Satissh S

Youngling
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/sdax 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.
 

The Outsider

Beneath The Eyelids
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.
 

eddie

El mooooo
Chester said:
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 :)
 

praka123

left this forum longback
faraaz said:
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).

Chester said:
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 :)
 
Last edited:

Satissh S

Youngling
eddie said:
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 -> *www.freeos.com/articles/3921/
 
Last edited:

vish786

"The Gentleman"
Satissh S said:
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 -> *www.freeos.com/articles/3921/

thanks for sharing.
 

eddie

El mooooo
Satissh S said:
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 :)
 
OP
faraaz

faraaz

Evil Genius
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!? :D
 
Last edited:

vish786

"The Gentleman"
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.
 
Last edited:

Sykora

I see right through you.
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.
 
OP
faraaz

faraaz

Evil Genius
@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!
 

Desi-Tek.com

In the zone
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
sudo gedit /boot/grub/menu.lst
it will open menu.lst on gedit now scroll to the bottom and enter this

#windows boot info
title Windows
root (hd1,0)
savedefault
makeactive
chainloader +1
save it and than reboot
 
Last edited:

praka123

left this forum longback
@faraaz:at any time "info grub" is the better guide.
so u got 3 harddrives!you got a 30GB hdd?:confused:
@sykora is correct,windows always assumes to be on the first partition of the first hdd! :?
the workaround:
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 :-|
 
Last edited:
OP
faraaz

faraaz

Evil Genius
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...
 
Status
Not open for further replies.
Top Bottom