Results 1 to 23 of 23

Thread: Dual Boot How-to

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    10

    Dual Boot How-to

    I've also posted this over at the o/c forums. Figured someone over might get some use from it:

    Back when I first installed linux, I was most afraid of the dual boot setup, and didn't like the idea of possibly trashing my drive. After doing it, I realize how easy and straightforward the process really is. So I'm posting this info to guide our newbs out there and dispell your concerns about dual booting. (I assume we already have windows installed and working).

    Step 1: Partitioning

    OSes don't like to share partitions. In the case of Linux and a M$ OS, they need to be formatted with different filesystems. Generally linux uses ext2 or ext3, and windows uses either FAT32 or NTFS. Therefore, we need to set up different partitions for each OS. This is the most important step, and we must plan it out carefully, lest we need to wipe the drive later. Most of you will have one big partition occupying the whole drive, or at least the entire drive formatted with windows partitions. You have two options here: pay $70 for partition magic and resize your partitions, or start over. I personally choose to start over, but thats cause I have no money. If you want to try Partition Magic, heres some linkage:
    http://www.powerquest.com/partitionmagic/
    Now, lets figure out how much space we need for linux. We will want at least two seperate partitions, one root and one swap. The root partition is used to store the OS files, programs and possibly your data as well. The swap partition is similar to the windows swap file; it emulates RAM if your memory fills up. I've found that if you have a reasonably spacious drive, its nice to allocate about 10 gigs for linux, this way you will have plenty of room in the future.

    Now that we know how much space we need, lets open up some space on the drive. Either resize your current partitions with Partition Magic, or wipe the drive and make them anew. It is important that we leave the space we want to put linux on as unallocated space, in other words, in no partition at all. The partition will be created during the install.

    A quick note: The bootloader you chose (I will get to this later) may affect your partitioning plan. Some distros only include LILO (because GRUB is not 'officialy' stable). If you plan to use LILO, keep in mind it is unable to boot off over partitions located above the 1023rd cylinder (aprox the 8 gig mark).

    Another note: The filesystem you use for you windows partitions is also important. Linux can read and write FAT32 with no problem. However, it can only read NTFS (and usually requires a kernel recompile to do so). Keep this in mind if you wish to access your windows files from linux. (As far as I know, there is no way to see linux partitions from windows).

    Step 2: The Install

    Now, we have our partitions as we want them, and the area linux will go into is unallocated space. Its time to begin the install. Many distros boot off a cd, some off a floppy, inorder to begin the installion process. The "newbish" distros like Red Hat, Mandrake, etc have very user friendly installions. Red Hat even offers to partition automatically for you. You will need a root partition and a swap partition. Format your root partition in ext2 or ext3 (preferably ext3) and set the mount point to /. Format the swap in swap filesystem (there is no mount point for swap). Consult your distros documentation for more install info.

    Step 3: Bootloader

    At some point in the install, you will be asked to install a bootloader. Do some research beforehand on which one is best for you. Your choices will be either GRUB or LILO. I prefer GRUB because it has a few less restrictions than LILO, but either one will work. In the bootloader configuration, you will have to tell it which partitons you want to boot off of. For example, if my windows install is on my first partition (/dev/hda1/) and my linux install is on my second (/dev/hda2), I would have to give this information to the bootloader so that it knows what to do when you boot the machine. The newbish distros will have a very straightforward way of specifying these parameters.

    You also have to choose where to install the bootloader. Your choices generally will be either the partition where linux is installed, or the master boot record (MBR). You will usually want the MBR, so that it boots directly off of your linux bootloader.

    That's it. When the install completes and you reboot your system, you should see the linux bootloader. Check to make sure you boot into both windows and linux successfully. If you can, congratulations on a good well done. If you can't don't panic. If linux works but windows does not, you can probably fix the problem via the linux install. If windows works and linux doesn't, you may have to reinstall, hopefully finding and correcting the problem before. If windows does not work and you must get into windows for some reason, booting off a dos boot disk and running fdisk /mbr will erase the bootloader so you can boot straight into windows.

    Heres some general information:
    http://www.redhat.com/docs/manuals/...de/ch-grub.html
    http://www.linuxjournal.com/article.php?sid=4622
    http://www.acm.uiuc.edu/workshops/l...stall/lilo.html
    http://www.linuxgazette.com/issue38/veselosky.html
    http://linux902.tripod.com/dualboot-choosing.html
    http://www.techtv.com/screensavers/...3397093,00.html
    http://www.xminc.com/linux/WindowsXPGrubMandrake82.html

    If I've left anything important out, or there are any mistakes, please notify me and I will fix them. Hopefully this can help some of you out there.
    Athlon XP 1800+
    Asus A7V333
    Volcano 7 w/ temp probe mod
    Corsair XMS PC2700 2-2-2-5
    Gainward GeForce4 Ti4200
    Gentoo/ Debian sid/ Win XP Pro

  2. #2
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    Gave it a stickey for ya. Some good info there.

  3. #3
    X. I. P.
    Join Date
    Jul 2002
    Location
    Sioux Falls, SD U.S.A.
    Posts
    2,127
    Free disk partitioning and multiboot tools are available: <A HREF="http://www.ranish.com/">Ranish</A>, <A HREF="http://www.winimage.com/bootpart.htm">Bootpart</A>,
    <A HREF="http://diskman.no-ip.com/">Diskman</A>, <A HREF="http://www.zeleps.com/">zeleps</A>, <A HREF="http://www.geocities.com/SiliconValley/Haven/3190/zpart-ja.htm">zpart</A>,
    The plural of "anecdote" is not "data."

  4. #4
    Registered User
    Join Date
    Feb 2002
    Location
    Oklahoma
    Posts
    449
    ok i have a question what happens if you install the bootloader on the other harddrive not where your windows partition is?? I did that and now i get booted straight into windows
    So many tricks & so many lies
    Too many whens & too many whys
    Nobody's special, nobody's gifted
    I'm just me, warped & twisted



    MY HeatWare

  5. #5
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    It just bypasses it. And goes... "straight into windows"

  6. #6
    Registered User
    Join Date
    Feb 2002
    Location
    Oklahoma
    Posts
    449
    thanks for that tech info LOL umm after a format dangit i dont want linux
    So many tricks & so many lies
    Too many whens & too many whys
    Nobody's special, nobody's gifted
    I'm just me, warped & twisted



    MY HeatWare

  7. #7
    Registered User
    Join Date
    Feb 2002
    Location
    Oklahoma
    Posts
    449
    SMIZZZZZZZZZZ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Dude i am stuck in thiz linux with no way back into windows......I have it on a different partition but i want back into windows i need some boot configuration help!!!!!!!!!!!!!! I cannot format cuz i have things i cannot lose.... I know you can fix it for me
    So many tricks & so many lies
    Too many whens & too many whys
    Nobody's special, nobody's gifted
    I'm just me, warped & twisted



    MY HeatWare

  8. #8
    I am lame
    Join Date
    Dec 2001
    Posts
    1,952
    In Titan386's words:

    You need to open your /boot/grub/menu.lst file. Use root to do this. For example, to open it for editing with the text editor pico, this is what you would do:
    su
    type your root password. You are now root.
    pico /boot/grub/menu.lst
    This should open the file for you. Its possible your file is elsewhere, in which run a search for menu.lst to find its location. You need to add the folllowing lines to the bottom of the file:
    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1

    I'm assuming that XP is on the first partition of your primary master harddrive.

    Once you've added those lines, press ctrl x and hit enter serveral times to verify the promts it gives you. Then reboot and see if it worked.

    Here is my menu.lst file for reference. Mine boots from 4 different images, 3 different linux kernels, and windows xp.

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,1)
    # kernel /vmlinuz-version ro root=/dev/hda3
    # initrd /initrd-version.img
    #boot=/dev/hda
    default=3
    timeout=10
    splashimage=(hd0,1)/grub/splash.xpm.gz
    title Red Hat Linux (2.4.19)
    root (hd0,1)
    kernel /vmlinuz-2.4.19 ro root=/dev/hda3
    title Red Hat Linux (2.4.18-10)
    root (hd0,1)
    kernel /vmlinuz-2.4.18-10 ro root=/dev/hda3
    initrd /initrd-2.4.18-10.img
    title Red Hat Linux (2.4.18-3)
    root (hd0,1)
    kernel /vmlinuz-2.4.18-3 ro root=/dev/hda3
    initrd /initrd-2.4.18-3.img
    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1


    And this works great.

  9. #9
    Xtreme Member
    Join Date
    Mar 2004
    Location
    Curitiba - Brazil
    Posts
    100
    Oh my god, dont use this crapy grub man, use Lilo, oh it is so faster, better and easily to configure. It's waste of time try grub

    see ya
    PC:
    Core2Duo E6750 2.66 @ 3.53 Ghz (440 x 8) / Noctua NH-U12P / Asus P5K Deluxe / 2 x 2Gb DDR2 OCZ 800 @ 880 Mhz / Radeon HD4890 (GPU & GDDR) - 800 & 900 Mhz @ 930 & 1075 Mhz / WD Blue 640Gb @ 7200rpm / Seventeam 700W / CoolerMaster 690 / 6 x SickleFlow CoolerMaster 120mm / LG W2353V 23" Full HD / Panasonic Viera Plasma 42" Full HD.

    Storage:
    Atom 330 / Intel D945GCLF2 / 2Gb DDR2/ PCI 4 x Sata / 3x 1 Tb Samsung / 1x 500 Gb Seagate.

    Notebook:
    HP DM4 1075Br - Core I5 430M / Radeon 5450 1Gb / 4Gb DDR3 / 500Gb @ 7200rpm / 14".

  10. #10
    Registered User
    Join Date
    Feb 2002
    Location
    Oklahoma
    Posts
    449
    actually grub works pretty smoothly i have found... but in my installing Slackware 9.1 I found that LILO isnt that hard to use if you just do it... I know have slackware and xp dualbooted and done it all by accident
    So many tricks & so many lies
    Too many whens & too many whys
    Nobody's special, nobody's gifted
    I'm just me, warped & twisted



    MY HeatWare

  11. #11
    Xtreme Enthusiast
    Join Date
    Apr 2004
    Location
    Berkeley, CA
    Posts
    609
    Originally posted by Demon_Hunter
    Oh my god, dont use this crapy grub man, use Lilo, oh it is so faster, better and easily to configure. It's waste of time try grub

    see ya
    GRUB actually has many desireable merits, such as the fact that it loads its cconfiguration from a file on a partition.

    Originally posted by Smizack
    In Titan386's words:

    You need to open your /boot/grub/menu.lst file. Use root to do this. For example, to open it for editing with the text editor pico, this is what you would do:
    su
    type your root password. You are now root.
    pico /boot/grub/menu.lst
    This should open the file for you. Its possible your file is elsewhere, in which run a search for menu.lst to find its location. You need to add the folllowing lines to the bottom of the file:
    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1

    I'm assuming that XP is on the first partition of your primary master harddrive.

    Once you've added those lines, press ctrl x and hit enter serveral times to verify the promts it gives you. Then reboot and see if it worked.

    Here is my menu.lst file for reference. Mine boots from 4 different images, 3 different linux kernels, and windows xp.

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,1)
    # kernel /vmlinuz-version ro root=/dev/hda3
    # initrd /initrd-version.img
    #boot=/dev/hda
    default=3
    timeout=10
    splashimage=(hd0,1)/grub/splash.xpm.gz
    title Red Hat Linux (2.4.19)
    root (hd0,1)
    kernel /vmlinuz-2.4.19 ro root=/dev/hda3
    title Red Hat Linux (2.4.18-10)
    root (hd0,1)
    kernel /vmlinuz-2.4.18-10 ro root=/dev/hda3
    initrd /initrd-2.4.18-10.img
    title Red Hat Linux (2.4.18-3)
    root (hd0,1)
    kernel /vmlinuz-2.4.18-3 ro root=/dev/hda3
    initrd /initrd-2.4.18-3.img
    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1


    And this works great.
    You will also have to appropriatly change this to fit your configuration.

  12. #12
    Registered User
    Join Date
    Apr 2004
    Location
    Eksjoe sweden
    Posts
    30
    hey gay
    Im gay




    First Rig::

    Cpu: Intel Pentium 4 2.4 @ stock
    Ram:512mb 333mhz Corsair
    Graphics: Radeon 9600xt @ stock
    Harddrive: 1x40 1x120=160gig
    Burner:Lg 52/43/52
    monitor: Samsung Syncmaster 959NF
    mouse: Logitech mx500
    Keyboard:Keytronic

  13. #13
    XS_THE_MACHINE
    Join Date
    Nov 2004
    Location
    Long Island
    Posts
    4,678
    Just to make sure, u can dual boot with 2 linux OS's, 1 windows & 1 linux, or two windows right? It doesnt have to be anyweird combination does it?
    Last edited by [XC] moddolicous; 06-26-2005 at 04:26 PM.
    "Victory is always possible for the person who refuses to stop fighting"

    clicks to save kids

  14. #14
    XS News
    Join Date
    Jan 2005
    Posts
    1,115
    Quote Originally Posted by moddolicous
    Just to make sure, u can dual boot with 2 linuxOs's, 1 windows & 1 linux, or two windows right? It doesnt have to be anyweird combination does it?
    You can do it any way.

    I'd rather much use GRUB.

    And Windows can detect Linux partitions. Only if the Linux partitions are ext2. But that would require a driver to be installed in Windows...

  15. #15
    Registered User
    Join Date
    May 2005
    Location
    AArhus, Denmark
    Posts
    35
    it's a lot easier if you want dualboot, to start with windows.. cuz it tend to overwrite mbr

  16. #16
    XS_THE_MACHINE
    Join Date
    Nov 2004
    Location
    Long Island
    Posts
    4,678
    Alrite, I'm gonna try linux on my box downstairs, so can I have a few questions.
    1: I can load linux now after a windows install, or should I do it before a windows install.
    2: I'm trying gentoo (I know, not for a beginner) so I downloaded the x86 version and it had 1 670mb iso and one 60mb iso. Which do I boot from?
    3: Is it true that I have to make a swap drive or something (a partition of my hard drive for files & stuff).
    If I think of anything else I'll post here. Thanks for your help.
    "Victory is always possible for the person who refuses to stop fighting"

    clicks to save kids

  17. #17
    Xtreme Gentoo User
    Join Date
    Mar 2004
    Location
    England
    Posts
    2,468
    My guide to booting Windows using GRUB:

    1. Install your Linux distro as you normally would. Preferably on a second volume, rather than another partition.

    2. Install Windows on the second disk.

    3. Open grub.conf (or menu.lst, depending on your installation)

    4. Add this entry:
    Code:
    title Microsoft Windows
    rootnoverify (hd1,0)
    make-active
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainload +1
    Now, the first line, creates an entry in GRUB. The second line, sets the partition to boot from, without verifying what filesystem it contains, otherwise NTFS filesystems throw out an error. Since Windows will crash and die if it isn't the primary active partition, the next 3 lines set the root to active, then map the root to hd0, fooling Windows into thinking it is the first active partition. The final line executes the first block on the partition, loading the Windows bootloader.

    5. Reboot, when GRUB loads, you should be able too boot into Windows using this new menu entry.

    Note: If you want to have Windows as a partition on the same disk as Linux, just remove the map commands, and change the root accordingly.


    PS: moddolicous, use the 60MB one, imo. The 700MB one contains a stage and a portage snapshot, which is convenient, but oh so out of date. You don't need a swap drive, you need a partition. Just RTFM word by word, then you can't go wrong.
    Last edited by masterofpuppets; 07-30-2005 at 02:46 AM.

  18. #18
    Xtreme Addict
    Join Date
    Nov 2004
    Posts
    1,550
    THANKS!! this helped me A LOT too

  19. #19
    Registered User
    Join Date
    Jan 2007
    Posts
    5
    Umm... Why didn't you use the built in partitioner, built in to almost all Linux distros, its usually safer, faster, and easier than doing it separately with another program.

  20. #20
    Xtreme Member
    Join Date
    Apr 2007
    Posts
    127
    I have a box dedicated to Linux.

    Dual boot was just got too boring after a while. I got bored one day and now I guess you could classify it as a Hendeca(11)-Boot system

    There are still a few i just havent gotten around to adding yet, i think i have all of the following

    XP
    Fedora Core 6
    Ubuntu 6.10 (need to upgrade)
    PCLinuxOS 2007 RC3
    Mandriva 2007
    Sabayon 3.3
    Slackware 11.0
    simplyMEPIS 6.4
    Debian
    Vector
    Knoppix

    Waitin on SuSE 10.3

    Thats on like 2 Hard Drives

  21. #21
    Registered User
    Join Date
    Oct 2006
    Posts
    1
    hey gay

  22. #22
    Xtreme Addict
    Join Date
    Jan 2004
    Location
    somewhere in Massachusetts
    Posts
    1,009
    okay, I could really use some help here. I knew I wanted Linux eventually (and maybe vista) so I originally setup my computer as such

    160gb SATA HD (sda)
    -80gb Windows XP, NFTS
    -40gb blank for Vista
    -40gb blank for linux

    500gb SATA HD (sdb)
    -500gb NTFS (had some large files at FAT32 couldn't hold and decided I'd rather deal with not being able to write in Linux)

    then I installed XP (a few months ago), recently I got around to Linux (Ubuntu 7.04, 32-bit) and using the LiveCD installer did the following

    -deleted the linux and vista partitions
    -made a 1024mb Swap partition
    -made a 79gb ext3 Linux partion that I installed Ubuntu on
    -tried to install nvidia drivers, had to rebuild the kernel, kind of messed everything up (gksudo opened blank files so I couldn't alter anything)
    -re-installed Ubuntu (deleted & reformatted the linux partion, still ext3)
    -gksudo now works! edited menu.lst as perscribed above such that:

    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1

    aaaaand, it says starting system after I select it in Grub and then... nothing, it just hands there saying "starting system"

    so, did I do something wrong or is my Windows toast? I can still see all the files thru Ubuntu so I'm thinking Windows is still fine, it's just pissy that it's not the 'main' OS on the HD. Any ideas about what I can do to fix it? I really need to get back to Windows for schoolwork (probably a dumb time to start messing with this, but ehhh, too late)

    thanks

  23. #23
    Registered User
    Join Date
    Jun 2008
    Posts
    34
    Quote Originally Posted by Attitudx View Post
    SMIZZZZZZZZZZ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Dude i am stuck in thiz linux with no way back into windows......I have it on a different partition but i want back into windows i need some boot configuration help!!!!!!!!!!!!!! I cannot format cuz i have things i cannot lose.... I know you can fix it for me
    You could put in your windows install disk, start up in recovery mode and run the command FIXMBR from the command line. Should repair your MBR and let you boot back into windows. You would have to reinstall your linux bootloader, though as this would no longer allow you to boot into linux

    ------------------------------------------------------
    Main Rig
    PSU - Corsair TX750W
    Board DFI LP LT x48 T2R
    CPU - E8400 4.0 Ghz 9 x 445
    Cooling - AC Freezer 7 - 36 idle 58 under load
    Mem - 2X Corsair XMS2 2GB DDR2-800 (OC to 890)
    OS -Vista Home Premium X64/Ubuntu8.04
    GPU - VisionTek 900241 Radeon HD 4850 512MB
    HDD - 2X Western Digital Caviar SE16 640GB 7200 RPM RAID 0
    Case - Antec 900


Bookmarks

Bookmarks

Posting Permissions

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