Thread: USB hard drive partitioning layout difficulty

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    3

    USB hard drive partitioning layout difficulty

    So, I have a new 500GB external hard drive, and I was posting to clarify that the things I was about to do to it weren't going to cause me any pain. The hard drive, as it is now, has the following in it:

    50MB - BootMagic, 5GB - Fedora, 6GB - Linux (I havn't decided)
    460GB - Data, 6GB - Windows in that order.

    Data is the only partition that has anything on it *edit

    It's only after formatting it as such, that I realized that:
    - My data must be in the first 2GB, as that is the only way my Xbox 360 can detect the movies on it.
    - Windows must be in the first 2GB, or else it won't allow me to install (I believe this is true, as I tried installing it and it wouldn't let me.)

    So, I was considering the following, and me, not knowing much about MBR's and such, need your help to determine if it will work.
    1. Delete "Windows"
    2. Make "Fedora" and "Linux" become "Windows"
    3. Install Windows
    4. Make empty space at the back, and create "Fedora" and "Linux" back there.
    5. Move "Windows" to the back. - as per my knowledge, this should screw up the MBR, making it unbootable at this point.
    6. Install Fedora and Linux - This should fix MBR, as GRUB will replace it, and it should be bootable, but only to the version of linux I install last. (right?)
    7. Install Boot Magic on Boot Magic, through the version of Linux that GRUB lets me boot to.

    Will this work? Can I make it so that I can use just GRUB to boot to all OS's, and not have boot magic? If you know anything else related to the MBR and what I'm trying to do that I've forgotten to ask, post that, too.
    Thanks...
    Last edited by FragerZ; 03-04-2008 at 03:02 PM. Reason: forgot stuff

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    My data must be in the first 2GB, as that is the only way my Xbox 360 can detect the movies on it.
    I am baffled by Microsoft's idiocy.


    I don't think Windows will boot if you move it to the back.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    I am currently struggling with this myself, but with Mac OS X instead of Windows.

    I believe that GRUB is capable of chainloading the NTLDR even if it is not within the first 2 gig. The standard Windows MBR is incapable of that, but that's why GRUB is nice. NTLDR itself has no such limitations, so if you can get NTLDR into memory, it should be able to boot, provided it can FIND the installation partition.

    All you would need is a tool to dump the LBA numbers of the NTLDR file so you can plug them into GRUB's chainloader command.

    I think it is a highly "unsupported" sort of thing to do. I'd hack around on it tonight and try to give you some answers but I don't have any space, nor do I have a Windows install disc.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    I've done this before, pretty much the exact same setup. It's since however changed, by coincidence I still have the drive layout

    Code:
    [root@neux zac]# fdisk -l /dev/sdc
    
    Disk /dev/sdc: 200.0 GB, 200048565760 bytes
    255 heads, 63 sectors/track, 24321 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0f54dfdf
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1   *           1       14701   118085751    7  HPFS/NTFS            media
    /dev/sdc2           14702       24320    77264617+   f  W95 Ext'd (LBA)  extended
    /dev/sdc5           14702       19800    40957686    7  HPFS/NTFS   Windows
    /dev/sdc6           19801       19994     1558273+  82  Linux swap / Solaris
    /dev/sdc7           19995       24320    34748563+  83  Linux   Linux
    I installed grub to the mbr, and chain loaded /dev/sdc5. In fact here is my grub.conf
    Code:
    default 0
    timeout 8
    
    title openSUSE 9.2
        root (hd0,6)
        kernel /boot/vmlinuz root=/dev/sda7 resume=/dev/sda6 splash=silent showopts
        initrd /boot/initrd
        
    title Windows XP SP1 Build 2600
        rootnoverify (hd0,4)
        chainloader +1
    
    title Failsafe -- openSUSE 9.2
        root (hd0,6)
        kernel /boot/vmlinuz root=/dev/sda7 showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
        initrd /boot/initrd
    You can remap Windows before you boot it so it thinks it's the root partition (as such) and will be mapped as C: otherwise it's mapped as E: or something.

    Now however, I have a /boot partition with the boot flag (with grub installed there) and use grub to chainload NTLDR.

    You can probably see, it *used* to be a mess

  5. #5
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CornedBee View Post
    I am baffled by Microsoft's idiocy.
    I agree with that.
    Anyway, Windows needs its boot files on the primary partition where you boot from. Then you can install it wherever. This works with XP and, indeed, I have done it more than once I think.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  6. #6
    Registered User Bajanine's Avatar
    Join Date
    Dec 2001
    Location
    The most peaks over 10,000 feet!
    Posts
    396
    As Elysia says you can create a primary partition up front and then extended logical partitions for your windows/linux partitions. Windows will install the necessary files it needs to boot in the primary partition and the rest of the os files into the extended partitions. I can confirm this works for Windows 2000, XP and Vista.

    Take a look at how disk 0 is laid out.

    Maybe a picture is better:
    Favorite Quote:

    >For that reason someone invented C++.
    BLASPHEMY! Begone from my C board, you foul lover of objects, before the gods of C cast you into the void as punishment for your weakness! There is no penance for saying such things in my presence. You are henceforth excommunicated. Never return to this house, filthy heretic!



  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    21
    I had a similar issue, tri-booting BSD, Linux, and Windows. Because BSD does not use MBR partitions to boot since it uses disklabel as well as wanting to be within the first 8 GB of the hard drive, Linux uses GRUB/LILO and MBR to boot, and Windows expected to be the first OS on the hard drive.

    I had to do a bunch of incredibly complex hard drive editing with blocks and geometry and stuff, carefully following this tutorial which took me about a few hours to get. I will never do such thing again; I would rather just put them on 3 separate boxes. I'd suggest that if you have the parts or the money to build some decent ones

  8. #8
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by guitarscn View Post
    I had a similar issue, tri-booting BSD, Linux, and Windows. Because BSD does not use MBR partitions to boot since it uses disklabel as well as wanting to be within the first 8 GB of the hard drive, Linux uses GRUB/LILO and MBR to boot, and Windows expected to be the first OS on the hard drive.

    I had to do a bunch of incredibly complex hard drive editing with blocks and geometry and stuff, carefully following this tutorial which took me about a few hours to get. I will never do such thing again; I would rather just put them on 3 separate boxes. I'd suggest that if you have the parts or the money to build some decent ones
    Hehe, that can be solved with the power of grub.

    * Install BSD to the first 8gb to partition 0
    * Install Linux to partition 1
    * Install Windows to partition 2
    * Install grub to the MBR or Linux partition
    * Use grub to chainload Windows NTLDR (Windows bootloader) off the Windows partition, using grub to 'remap' (using grub map) the partitions so Window's thinks it's first
    * Use grub to also chainload the BSD bootloader if required.

    Problem solved , BTW grub doesn't have to be installed on the MBR. Install it to whatever partition you want and give that partition the boot flag.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. "parking" hard drive in DOS?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 04-22-2002, 10:58 AM
  2. 'Installing' to hard drive and 'Saving' to hard drive
    By Leeman_s in forum C++ Programming
    Replies: 4
    Last Post: 04-17-2002, 02:37 PM
  3. Getting the hard drive serial number?
    By kes103 in forum Windows Programming
    Replies: 2
    Last Post: 01-18-2002, 03:03 PM
  4. Getting the hard drive serial number?
    By kes103 in forum C Programming
    Replies: 2
    Last Post: 01-18-2002, 01:43 PM
  5. read hard drive
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-20-2001, 05:38 PM