Find the answer to your Linux question:
Results 1 to 8 of 8
Aloha, To install Fedora Core 4 I took my windows XP 80gig HDD out and put in a fresh 80gig drive and installed Fedora Core 4. Both are setup as ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Sep 2005
    Location
    Wahiawa, Hawaii
    Posts
    125

    Linux on one HDD WinXP on the other


    Aloha,
    To install Fedora Core 4 I took my windows XP 80gig HDD out and put in a fresh 80gig drive and installed Fedora Core 4. Both are setup as master drives as only one is in at a time. Now I want to put the WinXP HDD back in with the Fedora HDD. I know that the Fedora Drive needs to be slave because of Windows quirk about boot sector being on first drive. Advice needed though on how I can get up and booted and install Grub on the WinXP drive and configure it to do multi-boot. Any help is appreciated.
    Mahalo,
    Edward
    GNU/Linux is a powerful Free OS. Fear is a powerful motivator. Freedom is sweet. Fear GNU/Linux. Savor Freedom.

  2. #2
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    This should be very easy. Leave Linux where it is. XP can be slave drive or master drive on 2nd ribbon cable, it doesn't matter. Add following section to your /boot/grub/grub.conf file:
    Code:
    title    Windows XP
    root (hd1,0)
    map (hd1) (hd0)
    map (hd0) (hd1)
    chainloader +1
    boot
    The 'map' commands cause XP to think it is the first drive. If I haven't made an error, (I'm not at my Linux machine at the moment) this is the same scriptthat I have in my system with XP which boots from another drive using Grub.

    Make sure that the jumper is at the right place on your XP drive when you install it. Note that while Linux names drives hda through hdd for the 4 IDE connectors, whether or not it is a CD or HD, and independant of the total number of drives connected, Grub names only hard drives and names the boot drive (hd0) and the next one (hd1). This is the case even if hdc is the boot drive as it is in my system. My XP drive at hda is called (hd1) by Grub.

    Don't believe this cruft: read the next post:
    /IMHO
    //got nothin'
    ///this use to look better

  3. #3
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817
    Quote Originally Posted by drakebasher
    If I haven't made an error, (I'm not at my Linux machine at the moment) this is the same script that I have in my system with XP which boots from another drive using Grub.
    .................................................. .There is an error, but here's the real deal:
    Code:
    title    Windows XP
        rootnoverify (hd1,0)
        map (hd1) (hd0)
        map (hd0) (hd1)
        makeactive
        chainloader +1
        boot
    Note the "rootnoverify" on the 'root' line and also the added line "makeactive". Note again that in my system I have set the BIOS to boot to the second hard drive (hdc). That's the first drive Grub sees, so it gets named (hd0), so in this case:
    • (hd0) = /dev/hdc
      (hd1) = /dev/hda
    /IMHO
    //got nothin'
    ///this use to look better

  4. #4
    Linux Newbie
    Join Date
    Sep 2005
    Location
    Wahiawa, Hawaii
    Posts
    125

    A Tale of two hard drives

    Aloha.
    I installed the second hard drive with windows xp on it and setup grub.conf accordingly. Linux boots great but windows goes into a recovery console. Weird! I noted that the hard drive is split into two partitions and one of the two appears to be a recovery partition. Does partitioning affect the way that hd1/hd0 are numbered? Also, the XP drive is a slave the linux is mnaster on same ide cable. Could that be affecting it?
    Mahalo
    Edward
    GNU/Linux is a powerful Free OS. Fear is a powerful motivator. Freedom is sweet. Fear GNU/Linux. Savor Freedom.

  5. #5
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Re: A Tale of two hard drives

    I don't think the slave/master situation is the problem. But we'll see. The 2 partitions on the XP drive should be (hd1,0) and (hd1,1). Try changing the line
    Code:
    rootnoverify (hd1,0)
    ...to...
    rootnoverify (hd1,1)
    You can do that experimentally (one time try) like this:

    When you see the Grub menu for Linux or XP, highlight XP and then press 'e' for edit. You'll see the "script" for booting Windows. scroll up/down to highlight the line with 'rootnoverify' on it and press 'e' to edit. You'll get that line only which you can edit as you like and then (as the instructions will tell you) press 'enter' to accept the change and then 'b' to boot.

    That change will not be written to the file so after you have proven it you can make it permanent by editing it in Linux.
    /IMHO
    //got nothin'
    ///this use to look better

  6. #6
    Linux Newbie
    Join Date
    Sep 2005
    Location
    Wahiawa, Hawaii
    Posts
    125

    Rockin'

    Dude, you rock. Changed that to hd1,1 and everything is totally cool. Windows XP slave Linux Master and both boot. I also setup the ntfs module and can actually read the drvie now but have to be root to do so. When I try as normal user it says I have no permission. I can't change that since it is read-only?
    Mahalo.
    Edward
    GNU/Linux is a powerful Free OS. Fear is a powerful motivator. Freedom is sweet. Fear GNU/Linux. Savor Freedom.

  7. #7
    Linux Guru
    Join Date
    May 2004
    Location
    forums.gentoo.org
    Posts
    1,817

    Re: Rockin'

    Quote Originally Posted by Hiko
    Dude, you rock.
    ................................
    ................................ Sometimes I get lucky.
    That you can only access the drive as root I think is a permissions issue and can be changed in the 4th column of your /etc/fstab file. Wish I could say exactly what you should have there: I think 'noauto,users,ro' will do if you don't want it mounted automatically, or if you do, maybe just 'ro' for "read only" (you don't want write-permissions on an ntfs filesystem!). Of course, you will need to be root to edit your /etc/fstab file.
    /IMHO
    //got nothin'
    ///this use to look better

  8. #8
    Just Joined!
    Join Date
    Dec 2005
    Posts
    2
    Quote Originally Posted by Hiko
    Dude, you rock. Changed that to hd1,1 and everything is totally cool. Windows XP slave Linux Master and both boot. I also setup the ntfs module and can actually read the drvie now but have to be root to do so. When I try as normal user it says I have no permission. I can't change that since it is read-only?
    Mahalo.
    Edward
    Well, I can mount my ntfs-partitions as user. My /etc/fstab looks like this:
    Code:
    ...
    /dev/hdf1      /mnt/C      ntfs   ro,user,noauto,umask=000,utf8   0      0
    /dev/hdf5      /mnt/E      vfat   rw,user,noauto,umask=000,utf8   0      0
    Don't know if the umask and utf8-parts are necessary with the vfat partition but they are needed with ntfs filesystem.
    By using vfat on the secondary Windows partition you can write to the disk both from Windows and from Linux. That's just great!

    Mikko Saarinen

    P.S.

    I have the same situation that my Windows is in the slave drive and now I would like to re-install it. Can it be done just like that or does the Windows installer want to put itself into the primary disk?
    If that is the case can I trick the installer with Grub using the same map-command, or is it saver to remove my Linux disk during the installation (don't want to end up in a situation where the Windows forcefully installs itself on top of my Linux disto )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •