Howto Dual-Boot Linux Mint 5 and Windows

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
piratesmack

Howto Dual-Boot Linux Mint 5 and Windows

Post by piratesmack »


WARNING! IT IS RECOMMENDED TO BACK UP ALL DATA BEFORE CONTINUING. SOMETHING COULD GO WRONG AND YOU COULD END UP WITH A WIPED HARD DRIVE


As you can see from the title, this tutorial will explain how to set up a dual-boot with Windows and Linux Mint 5.
It will also explain how to uninstall Linux Mint and go back to a single boot in case you don't like it. This was tested with Windows XP and Vista, but should work fine with 95, 98, ME, 2000, etc. This tutorial assumes you already have Windows installed in a single boot, as is the case with most people wanting to switch to Linux.

The main reason I'm writing this is because I recommend Linux Mint to a lot of people over at Yahoo! Answers, and they usually ask me questions about dual-booting. Now I can just send them a link to this thread.

Let's get started :)

It is HIGHLY RECOMMENDED to defrag your Windows installation before continuing

OK first thing you're going to do (after backing up your data) is shrink your Windows NTFS partition to make room for some new Linux partitions. This can all be done from the Linux Mint 5 live CD:
-Boot from the LiveCD:
Image
-Choose Start Linux Mint
-Once the LiveCD loads up, go to MintMenu>Administration>PartitionEditor:
Image
-That will open up gparted, you should see a list of all partitions on your hard drive. Right-click your Windows NTFS partition and choose Resize/Move:
-Up at the top, you can adjust the size of the partition. Shrink the partition by about half (or however much you want to devote to Linux) by clicking the arrow on the right and dragging it to the left:
Image
-Once you've decided how much you want to shrink it by, click Resize/Move (just make sure the NTFS partition is still large enough to hold all the files you have on it.)
-Now click Apply to apply the changes you just made (This might take a while depending on how much you shrank the partition)
-gparted should now show an NTFS partion and unallocated space:
Image


You are now ready to install Linux Mint:
-Double-click the Install icon on the Linux Mint desktop
-Choose your language, then click Forward
-Select a city in your country and timezone, click Forward again
-Choose your keyboard layout, click Forward another time
-Now we're at the important part, the partioner. You want Linux Mint to use the unallocated space we freed earlier. The easy way to do this is to choose Guided - use largest continuous free space. You can also choose Manual and set up the partitions yourself, but that's for more advanced users.

Guided - use largest continuous free space (Easy way):
-Just choose Guided - use largest continuous free space and click Forward. The installer will automatically partition the unallocated space

Manual Partitioning (Harder, but better):
-Choose Manual and click Forward
-I'll try to explain this the best I can, there are many ways you can set up the partitions. You need a Minimum of a 4GB EXT3 partition with the mount point "/" and a 256MB Linux Swap partition. First, I'll explain some of the mount points:
/: This is called the ROOT directory. It contains all other directories (/home, /usr, /etc, /boot and so on)
/home: This is called the Home directory. It contains things like documents and hidden configuration directories for software you install. It is a good idea to have this directory on a seperate partition, because it allows you to reinstall/upgrade without losing important documents.
/usr: This directory is where software goes. /usr/local is where locally compiled software goes.
And the Swap partition is basically hard drive space that gets used as if it were RAM. (Kind of like a Windows page file)
So this is how I usually partition:
-1-2 GB Swap partition (About twice the size of your RAM is usually recommended)
-Around 6-10 GB Ext3 partition, with the mount point "/"
-Then I use the rest of the free space for an EXT3 partition with the mount point "/home"
If I had a partition layout like the one above and somehow screwed up my system, I could reinstall Linux Mint (Only formatting the "/" partition) and have a brand new system with all my old documents and software. Sorry, I'm not sure if I'm explaining manual partitioning very well, you could probably find a better explaination on Google.

-Now it will ask you for a username, password, and hostname... fill that out however you want and click Forward
-Next it will ask if you want to import any users or documents from other operating systems. Personally, I don't like to... but you can if you want. Click Forward
-Now it's ready to install, review the settings and click Install if they look good
-Setup will begin installing, wait for it to finish.
-Once it's done it will ask you to reboot, reboot and remove the CD. At startup, it should give you the choice of booting into Windows or Linux Mint. Test out both boot options If they both work: Congratulations, you have yourself a dual-boot:
Image


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IF YOU DECIDE LINUX MINT ISN'T RIGHT FOR YOU (How to Uninstall):


The first thing you need to do is restore the Windows bootloader. There are a few ways to do this, I prefer to use a program called ms-sys:
-Boot from the Linux Mint LiveCD
-Choose Start Linux Mint
-Once the LiveCD boots, download ms-sys_2.1.0-1_i386.deb from:
http://packages.ubuntu.com/gutsy/ms-sys
The download above is for Gutsy, there doesn't seem to be a Hardy version for some reason. But don't worry, the Gutsy version works fine
-Double-click the .deb package you just downloaded to open it with gdebi package installer, then click Install Package
-Once the package has finished installing, close gdebi
-Open a Terminal and run:

Code: Select all

sudo ms-sys -m /dev/sda
IMPORTANT NOTE: your hard drive may be something different than /dev/sda. Run sudo fdisk -l to find out. If it is something different, change the /dev/sda in the command above to suit your needs.


After you've restored the Windows bootloader, you'll have to delete the Linux partitions and stretch the Windows NTFS partition:

-Go to MintMenu>Administration>PartitionEditor
-Right-click the Linux-Swap partition and choose Swapoff
-Now right-click and delete the Linux-Swap, EXT3, and Extended partitions
-Right-click the NTFS partition, then choose Resize/Move
-Click and drag the right arrow all the way to the right side to fully extend the partition:
Image
-Click Resize/Move
-Click Apply
-Now reboot and everything should be back to the way it was

Hope this helped

If you have any questions about burning the LiveCD, booting from the LiveCD, etc please read the Linux Mint 5 User Guide, it's all explained there.
Last edited by piratesmack on Tue Dec 02, 2008 7:22 am, edited 3 times in total.
Fred

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by Fred »

piratesmack,

You did a very nice job with your instructions and the understandable way you laid it out.

I do have a couple of suggestions for you however. It would be good to read at least the first part of the below thread so people could get a better feel for some of the issues involved.

http://www.linuxmint.com/forum/viewtopi ... 90&t=11872

I have seen some sad situations brought on by attempting to use Windows tools to partition and resize with. I would recommend that users download and burn the latest stable release of the Live CD iso of Gparted, and use that to shrink their Windows partition and create partitions for their Linux install. The Link for this download is below and also a nice how-to for using Gparted.

http://sourceforge.net/project/showfile ... _id=271779


Gparted How-To

http://www.howtoforge.com/partitioning_with_gparted

I can't over stress how important it is to defrag your Windows install before attempting to shrink it, regardless of the tools you use. Not doing so puts you more at risk of loosing data and corrupting your Windows install.

I have heard that Windows Vista needs 30 - 40 Gig. to be safe. I don't know how true that is but I would never shrink a Windows install to less than the total size you expect it to grow to plus at least 20%. Windows does not like a full partition and will get very slow very fast as the partition fills up.

I would also suggest that you need at least 3 Linux partitions.

1.) A swap partition that is sized 1.5 to 2X your installed RAM, with the total of RAM plus swap not to exceed 4 Gig.

2.) A / partition of 8 - 12 Gig formatted to ext3

3.) A /home partition sized for the personal data you may have there. /home is where all the user's data resides. Format to ext3.

If you resize and make these partitions with the Gparted live cd you can use the manual partitioning option in the installer at install time and assign the mount points from the drop down menu. I think this is actually more understandable instead of trying to do too much at one time in the installer.

Just a few thoughts you might be able to use. :-)

Nice work just the same though.

Fred
piratesmack

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by piratesmack »

Fred wrote:piratesmack,

You did a very nice job with your instructions and the understandable way you laid it out.

I do have a couple of suggestions for you however. It would be good to read at least the first part of the below thread so people could get a better feel for some of the issues involved.

http://www.linuxmint.com/forum/viewtopi ... 90&t=11872

I have seen some sad situations brought on by attempting to use Windows tools to partition and resize with. I would recommend that users download and burn the latest stable release of the Live CD iso of Gparted, and use that to shrink their Windows partition and create partitions for their Linux install. The Link for this download is below and also a nice how-to for using Gparted.

http://sourceforge.net/project/showfile ... _id=271779


Gparted How-To

http://www.howtoforge.com/partitioning_with_gparted

I can't over stress how important it is to defrag your Windows install before attempting to shrink it, regardless of the tools you use. Not doing so puts you more at risk of loosing data and corrupting your Windows install.

I have heard that Windows Vista needs 30 - 40 Gig. to be safe. I don't know how true that is but I would never shrink a Windows install to less than the total size you expect it to grow to plus at least 20%. Windows does not like a full partition and will get very slow very fast as the partition fills up.

I would also suggest that you need at least 3 Linux partitions.

1.) A swap partition that is sized 1.5 to 2X your installed RAM, with the total of RAM plus swap not to exceed 4 Gig.

2.) A / partition of 8 - 12 Gig formatted to ext3

3.) A /home partition sized for the personal data you may have there. /home is where all the user's data resides. Format to ext3.

If you resize and make these partitions with the Gparted live cd you can use the manual partitioning option in the installer at install time and assign the mount points from the drop down menu. I think this is actually more understandable instead of trying to do too much at one time in the installer.

Just a few thoughts you might be able to use. :-)

Nice work just the same though.

Fred

Thanks for the suggestions.
I've had some bad experiences resizing Vista partitions with gparted, I've always had the partition go currupt on me. But I was using a much older version of gparted, and this was around the time Vista first came out so things have probably changed.

I redid the how to a bit following some of your suggestions, it still needs a little work
morty007

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by morty007 »

Question about the uninstall- Wouldn't it be easier to just boot the live cd, start gparted, delete the linux partitions and then reboot with the windows cd and then do a fixmbr?

That's what I did (as best as I can recall) a few weeks ago and it worked just fine.
User avatar
Pierre
Level 21
Level 21
Posts: 13192
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by Pierre »

2.) A / partition of 8 - 12 Gig formatted to ext3
Depends on the size of your HDD .. I use somewhat older drives, & so go for about 4 - 5 Gb.

( around here a 40Gb hdd is still Humgous !! ).

P.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Guest

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by Guest »

Ok, maybe I'm just retarded, but I went through everything, it said that it finished the installation, I told it to restart and it started up right back into Windows Vista. It didn't give me the option of which one to boot to... So how exactly do I set that up so that I can use linux?
AK Dave

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by AK Dave »

Guest wrote:Ok, maybe I'm just retarded, but I went through everything, it said that it finished the installation, I told it to restart and it started up right back into Windows Vista. It didn't give me the option of which one to boot to... So how exactly do I set that up so that I can use linux?
You're not retarded.

Vista is retarded.

The only thing that is more retarded than Vista is trying to USE that blight on the IT landscape.

Try this:
http://apcmag.com/the_definitive_dualbo ... bystep.htm
Guest

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by Guest »

Ok, I've tried this a bunch of times, but I went to the walkthrough recommended in the above post and followed it exactly word for word... Here's my problem I get Ubuntu installing it says it's done and needs to restart. When the computer restarts it does one of two things -- when I've tried installing Mint, it just goes right back into Vista and when I try installing Ubuntu it displays either "GRUB" or "GRUB 1.5" and then just sits there until I restart the computer and use the Vista install disk to repair the Vista Boot Loader. Vista recognizes that there's something there taking up space, but I can't start up in Mint or Ubuntu. So I delete the partition and try again... same thing every time. HELP!!!
piratesmack

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by piratesmack »

morty007 wrote:Question about the uninstall- Wouldn't it be easier to just boot the live cd, start gparted, delete the linux partitions and then reboot with the windows cd and then do a fixmbr?

That's what I did (as best as I can recall) a few weeks ago and it worked just fine.

You could do that, but not everyone has a Windows install disk

You could also just back up the mbr before installing with something like:

Code: Select all

dd if=/dev/hda of=mbr.bin bs=512 count=1
And restore withsomething like:

Code: Select all

dd if=mbr.bin of=/dev/hda bs=512 count=1
piratesmack

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by piratesmack »

Guest wrote:Ok, maybe I'm just retarded, but I went through everything, it said that it finished the installation, I told it to restart and it started up right back into Windows Vista. It didn't give me the option of which one to boot to... So how exactly do I set that up so that I can use linux?
Are you using Vista ultimate?
I vaguely recall hearing something about the Vista Ultimate bootloader having some stupid security feature that keeps the mbr from being overwritten. Could've been false information, though.
piratesmack

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by piratesmack »

Guest wrote:Ok, I've tried this a bunch of times, but I went to the walkthrough recommended in the above post and followed it exactly word for word... Here's my problem I get Ubuntu installing it says it's done and needs to restart. When the computer restarts it does one of two things -- when I've tried installing Mint, it just goes right back into Vista and when I try installing Ubuntu it displays either "GRUB" or "GRUB 1.5" and then just sits there until I restart the computer and use the Vista install disk to repair the Vista Boot Loader. Vista recognizes that there's something there taking up space, but I can't start up in Mint or Ubuntu. So I delete the partition and try again... same thing every time. HELP!!!

I'd try using lilo instead of grub as a bootloader
FedoraRefugee

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by FedoraRefugee »

Guest wrote:Ok, I've tried this a bunch of times, but I went to the walkthrough recommended in the above post and followed it exactly word for word... Here's my problem I get Ubuntu installing it says it's done and needs to restart. When the computer restarts it does one of two things -- when I've tried installing Mint, it just goes right back into Vista and when I try installing Ubuntu it displays either "GRUB" or "GRUB 1.5" and then just sits there until I restart the computer and use the Vista install disk to repair the Vista Boot Loader. Vista recognizes that there's something there taking up space, but I can't start up in Mint or Ubuntu. So I delete the partition and try again... same thing every time. HELP!!!
Sounds like Ubuntu doesnt like some hardware, such as video driver and in Mint the Grub is not being put in the MBR? In eiter case, I am dual booting Vista Ultimate and Mint with no problems here using the Mint Grub as the bootloader.

Edit: BTW, Vista (and XP) are too stupid to read ext3 :D

edit: Is Vista on a different drive? You want Grub on the MBR of the drive being booted.

edit edit: To Fred's comment in the second post about Vista needing 30-40GB, check this out. Vista (at least Ultimate, not sure about other versions) has a bug that the MS folks dont recognize as a bug! It seems there is a file in Windows called winsxs. This stupid thing saves redundant .dll files and other cruft from everything being installed. I partitioned 20GB for Vista on this laptop. It installed in 16 or so and I installed very few additional programs. Office, e-sword, avg, and a small handful of others. Over a few weeks I noticed my partition growing to the point where it was sitting at 19.5 and shooting warnings. I would clean things up and it would shrink back to 18 then grow again. Okay...So I resized my data partition and dragged 10GB over to Vista. Cool. For two weeks! :twisted: I have installed nothing else and NOW I am pushing 29.5GB!!! I finally had to compress the C drive to get it manageable but this is a temp solution. Looks like it wants 10GB more. But where does it stop? Does it stop growing? I like Vista, unlike most people. I always liked XP Pro and I find Vista Ultimate to be a strong, dependable, comfortable OS. Except for this problem.

edit edit edit: Also, very nice how-to Piratesmack.
71GA

Re: Howto Dual-Boot Linux Mint 5 and Windows

Post by 71GA »

Hello i did everything as u said. Now i have a problem and i get "error 17" at system boot... and pc stops. I dont even get in GRUB loader to choose between windows xp and linux Mint.

So what can i do to get back a menu from which i can choose Windows or Mint... During installation of Mint i didnt get option to choose where to put (on which partition) bootloader for mint... so probably problem is there... startup file for mint must be on wrong place. How can i specify where to put startup file for mint?


TY
Post Reply

Return to “Tutorials”