LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Install Linux with XP (https://www.linuxquestions.org/questions/linux-newbie-8/install-linux-with-xp-470292/)

Glacophane 08-02-2006 11:43 PM

Install Linux with XP
 
Ive been wanting to try linux for a long time so I finally downloaded suse 10 and want to dual boot with XP. I read that to do this you need to partition a space for linux in fat, but my hd is partioned in ntsf. Im very new to this and am a little confused. Can I put linux on a second hard drive that doesnt have an OS on it and use it with XP or do I have to put both on the same hard drive?

Also some of the tutorials I read say to start with a fresh install of Xp but I may sound lazy but I dont want to have to completely reformat my hd. If anyone can point me to a very useful tutorial it would be greatly appreciated.

b0uncer 08-03-2006 12:03 AM

There are already threads about this...search, people, search.

Anyway, you don't need to reformat your drive. And you cannot install Linux on FAT filesystem; you'll need something else, with a new distribution like SuSE that would be ext3 probably.

If you plan to install on another harddisk, skip the following..

What you need to do is resize your ntfs drive - that can be done using a Linux LiveCD that has partitioning software on it. For Ubuntu installers the CD contains both installation and LiveCD, and partitioning software. SuSE is, as far as I know, not a LiveCD so you'll need to download one to do the partitioning job (unless you have PartitionMagic or some other Windows software that can resize ntfs partition to create free space). If you plan to use LiveCD, try PuppyLinux 2, it has GPartEd onboard (I've heard), an easy-to-use program which can resize your Windows ntfs partition smaller so Linux fits in too.

If you plan to use another harddrive, you must know this: to make the bootloader able to boot both operating systems, the harddisk has to be connected to the primary IDE cable (and if you do this with SATA or something, you better find out how that works); that means, if you have a harddrive and a CD/DVD-drive on the same IDE cable, you need to deattach the CD/DVD drive and plug it to a secondary IDE cable, so you can put your second harddisk on the primary IDE cable under/over the other harddisk. This is needed to get the bootloader work properly.

Now after you've either installed another harddisk or repartitioned your ntfs drive (there are lots of information about this; google for gparted and you'll find docs), just put the Linux installation disc in. I'm not sure if SuSE offers to install onto the free space you've created aside the ntfs (if you use a second harddisk, just choose it to be completely formatted), but if it does, use it. If not, then partition manually - again, there are lots of information, just search. Basically you need a boot partition (mount point /boot) the size of a hundred megabytes or so, the installer should warn you if it's too small (don't try to make it too big either), a swap partition (no mount point; type SWAP) which is double as large as the amount of your RAM (just a fancy "rule", make it 512 or 1024MB) and then a root partition (mount point /) the size of what's left on the disk.

When you are asked about the bootloader (be it LiLO or GRUB, probably the latter one), choose to install it onto the MBR. It should add your Windows automatically to the list, but that can easily be made by hand (again lots of information is found here, just search) if SuSE doesn't do that. And that way you're fine..if you need to remove Linux or just want the Windows bootloader back, you'll need to enter the XP's rescue console (whatever; press F8 at boot or if that won't bring it, use the XP install/rescue disc) and run fixmbr which overwrites Linux's bootloader. But probably you don't want to do this..

I encourage you to use the search tool since there really are lots of information, threads, ideas and answered questions about "Windows XP and Linux Dual Boot".

EDIT: since I've seen Ubuntu be able to install itself dual-booting with Windows XP, painlessly, in 15-20 minutes, and SuSE claims to be "user-friendly", I could think it can install itself dual-booting with your XP without problems.

There are basically two problems when installing dual-boot systems:
1) partitioning - the easiest way to create free, unpartitioned space for Linux (on the same HD as Windows) is to resize the Windows (ntfs) partition, using GPartEd/QPartEd/whatever program can do it. A good option is another harddisk if you can afford..
2) bootloader - make sure the installer of Linux detects Windows or make sure you know how to add Windows' entry to the bootloader config later. And if you're planning to reinstall Windows' bootloader, keep a Linux rescue disk available..

If SuSE really is "user-friendly", in the manner Ubuntu Linux is, then you should be OK.

stevesk 08-03-2006 12:12 AM

Welcome! First of all, if you have only one HD and it has a NTFS partition and it occupyes all the HD space, you have 2 options:

- resize it.
- back-up your data, create a partition with less size and reinstall Windows.

The first one is VERY DANGEROUS and I personally don't recommend.

Secound of all, if you have 2 HDs probably you have a "C:\" and a "D:\", both of them occupying 100% of the 2 hard drives, and the first one has the "windows" folder, correct? So what you can do is to move everything you have in D:\ to C:\, make it CLEAN! (yes, 0Kb occupied ;) ). If you have not enough size on your HD to do that, bah...uninstall some games! ;)

The next step is to partition your 2nd HD. You will lose ALL data on it, but at this step you shouldn't have anything more on D:\, ok? Ok. So, let's say you have a HD with 50GB. And you have only one partition (D:\) which is a vfat or a NTFS with 50GB (the whole HD). You will need to create basically two partitions for Linux, one of them is 'swap' and another is 'root' (/).

So you may do two things, in the 50GB example:

- Delete your current Windows partition (losing all data on it).
- Make a Windows partition with less size (like 25GB)
- Make a Linux Swap partition which its size is the double amount of your RAM (but if you have more than 512MB of RAM, keep it in 1024MB anyway.
- Make a Linux root partition ocuppying the rest of HD

So after all you will have 25GB of Windows partition to move your data back (but remember, you will have to format it through windows. It can be NTFS or FAT32 but I recommend the secound one.

Or you can simply make the whole HD in Linux partitions. It is up to you how you want to split it and the amount of size you want to give to each O.S. When formatting the Linux partitio, try to use "reiserfs" if you can because thats the best. If you don't have this option, "ext3" goes well. If you want to use only one linux distribution, all the partitions may be primary and not extended.

So, inside Linux installation you will be able to install a boot loader. Install it on MBR (/dev/hda). Done! You will have the two O.S. installed.

In other words, Linux can be installed anywhere, in your first HD, secound, third, etc. you only need to give space for it and install the bootloader during linux installation in MBR (/dev/hda).

DeusExLinux 08-03-2006 01:12 AM

...or if you have access to programs like partition magic, you can just resize the Windows partition in Windows, and give yourself a fresh blank partition to install Linux on. (although the above advice is both great advice).

A lot of installers will actually take the time and resize the NTFS partition for you. I've never had an issue with the nftsresize, but I can't say that I'm even close to being heavily experienced in this area. I've done it once or twice, and always without error, but I've heard some horror stories so use that at your own risk.

I do beleive that SuSE's installer will partition the HD for you (I think it did a few versions ago, but I've forgotten). Most of the "user-friendly" distros will do this for you.

Also, you can have multiple partitons on your drive of varying file-system types. RIght now, Windows resides on it's NTFS partition, and Linux on it's good ol' ext3. Personally, I used partition magic to just shrink the ntfs partition and create an ext3 one for my linux (as well as a swap).

b0uncer 08-03-2006 01:26 AM

Quote:

- resize it.
- back-up your data, create a partition with less size and reinstall Windows.

The first one is VERY DANGEROUS and I personally don't recommend.
I disagree. I don't see anything "very dangerous", not even "dangerous" in that. I've done it myself many many times, always without an error. With GPartEd however I suggest doing one operation at a time (like if you wanted to resize an ntfs partition and then create a new partition X, don't do them both and then "save changes", but first resize, then "save changes", then create a partition, then "save changes" again - this way it just seems to work better).

It might have been dangerous back in the 12th century, but nowadays I think it's quite safe. Everything can happen, yes, so I don't give a perosnal guarantee, but I'd recommend resizing the partition over backing data up and creating a whole new one. It's just much less work.

If you feel unsure, you should run the Windows disk defragment tool before the resizing. This way the data is gathered better (so it's not in fragments) and it may prove to be a bit safer way, but I've done this without defragmenting a few times, no problems. Defragmenting takes some time on big harddisks but if you're OK with it, go ahead - always better be sure :)

EDIT:
Quote:

Personally, I used partition magic to just shrink the ntfs partition and create an ext3 one for my linux (as well as a swap).
I'd use Partition Magic too if it's available and does the job (sometimes Linux tools have proven better for me..) Though I wonder how many of these Linux users who use Partition Magic with their Windows really have bought it.. :)

oskar 08-03-2006 10:32 AM

Yes, resizing is not dangerous if you know how to recover a wrecked mbr (;
Anywho.
Backub, defrag, see that you have enouth space left on the harddisk and let the suse installer do the rest.
The install program is able to do resizing.
It will set up grub, and you will be able to set in yast which operating system should be started as default, you'll have a couple of seconds to choose which one you want to start.

defragging before resizing is important!


All times are GMT -5. The time now is 10:53 PM.