PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 24, 2012, 06:08:54 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: [SOLVED] Adding a windows HD to an existing PCLOS installation  (Read 404 times)
jabster
Full Member
***
Offline Offline

Posts: 76


« on: January 09, 2012, 08:23:02 AM »

Hi.

So I've been happily running PCLOS as my sole OS for some time now, but now, alas, have the need to install & run windows. Unfortunately there is no linux version of Duke Nukem Forever. Sad

So I bought a cheap refurbished 40G SATA HD and dusted off my ancient XP-Pro CD. I unplugged my primary drive (PCLOS), and installed XP on the second drive. I then plugged my primary drive back in, booted into PCLOS, and used PCC to add a windos entry to Grub. My bios is currently set to use the PCLOS drive as the main HD.

When I reboot into windows, I get an unknown file system error and windows does not boot. Linux continues to boot up with no problems.

What I've found online for dual-booting involves dual booting from one HD, or situations where windows is already installed, and a second linux drive is being added.

So, before I totally screw things up.....

PCLOS: /dev/sda (5 partitions)
Windows: /dev/sdb (1 partition)

The boot device in Grub is currently set to sda. If I change that to sdb, and set the Bios to make sdb the primary drive, will I then be able to dual boot back and forth with no problems? Any other steps I'd need to make?

Thanks,
John
Logged
Old-Polack
Administrator
Hero Member
*****
Online Online

Posts: 9694


----IOFLU----


« Reply #1 on: January 09, 2012, 10:31:58 AM »

Hi.

So I've been happily running PCLOS as my sole OS for some time now, but now, alas, have the need to install & run windows. Unfortunately there is no linux version of Duke Nukem Forever. Sad

So I bought a cheap refurbished 40G SATA HD and dusted off my ancient XP-Pro CD. I unplugged my primary drive (PCLOS), and installed XP on the second drive. I then plugged my primary drive back in, booted into PCLOS, and used PCC to add a windos entry to Grub. My bios is currently set to use the PCLOS drive as the main HD.

When I reboot into windows, I get an unknown file system error and windows does not boot. Linux continues to boot up with no problems.

What I've found online for dual-booting involves dual booting from one HD, or situations where windows is already installed, and a second linux drive is being added.

So, before I totally screw things up.....

PCLOS: /dev/sda (5 partitions)
Windows: /dev/sdb (1 partition)

The boot device in Grub is currently set to sda. If I change that to sdb, and set the Bios to make sdb the primary drive, will I then be able to dual boot back and forth with no problems? Any other steps I'd need to make?

Thanks,
John

You need to keep /dev/sda as the boot drive, You also need a proper Windows stanza in your /boot/grub/menu.lst. Try this;

title Windows
    rootnoverify (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1

Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5690


I don't do Windows


« Reply #2 on: January 09, 2012, 06:38:59 PM »


You need to keep /dev/sda as the boot drive, You also need a proper Windows stanza in your /boot/grub/menu.lst. Try this;

title Windows
    rootnoverify (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1



Jabster,

The reason you need to do it the way old-polack has shown is that Windows expects to be the first drive in the chain. In other words, Windows expects to be on /dev/sda or (hd0). The two map lines old-polack is showing trick Windows into "believing" it is on the first drive. hd0 becomes hd1 and vice versa while Windows is running.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
johnmart
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 741


Make Love Not War


« Reply #3 on: January 09, 2012, 10:47:55 PM »

djohnston, thanks for that bit of explanation on the function of those map lines. I think I read it before, but this time I got it.  Grin
Logged

Acer Aspire, Intel core2 2.20GHz, ‎Graphics nVidia ‎G98M [GeForce G 105M], 2gb ram, Wireless Intel Link 5100

Why, any 5 year old child could understand this.
Somebody bring me a 5 year old.
Groucho
CaptainSarcastic
Full Member
***
Offline Offline

Posts: 167



« Reply #4 on: January 10, 2012, 01:09:34 AM »

Another easy workaround is to use the one-time BIOS boot menu instead of letting it run GRUB off the drive.  The function key varies machine to machine, but I've run dual-boots using this method quite a bit in the past.
Logged
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5690


I don't do Windows


« Reply #5 on: January 10, 2012, 02:40:51 PM »

djohnston, thanks for that bit of explanation on the function of those map lines. I think I read it before, but this time I got it.  Grin


You're welcome, johnmart.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
longtom
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 3221


Satellite Station Africa


« Reply #6 on: January 11, 2012, 01:18:02 AM »


You need to keep /dev/sda as the boot drive, You also need a proper Windows stanza in your /boot/grub/menu.lst. Try this;

title Windows
    rootnoverify (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    makeactive
    chainloader +1



Jabster,

The reason you need to do it the way old-polack has shown is that Windows expects to be the first drive in the chain. In other words, Windows expects to be on /dev/sda or (hd0). The two map lines old-polack is showing trick Windows into "believing" it is on the first drive. hd0 becomes hd1 and vice versa while Windows is running.


So - THAT is what it does.  My word .... Easy - once you know it.  Thanks for the explanation!!
Logged

Regards longtom

PCLinuxOS LXDE 32bit
2.0 Celeron, 1263MB Ram,
Nvidia FX5200 Ultra,
SiS900 PCI Fast Ethernet
jabster
Full Member
***
Offline Offline

Posts: 76


« Reply #7 on: January 13, 2012, 08:39:10 PM »

Im back finally.

Old-polack, thanks for the instructions.

DJohnston, thanks for the explanation. Looking at the grub lines, I pretty much figured that was what was going on. Figured it had something to do with windows needing to be first, so I was kind of on the right track at least.

All is working well now, and Duke is all outta gum.  :-)

Cap'n,  I didn't see that option during boot.

Thanks all,
John
Logged
djohnston
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 5690


I don't do Windows


« Reply #8 on: January 13, 2012, 08:43:41 PM »

Solved? That's great. Please edit the title of your first post in this thread and add the word Solved so that others, in the future, can find this solution. Thanks.
Logged

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM