LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux / Win XP (https://www.linuxquestions.org/questions/linux-general-1/linux-win-xp-532458/)

maxcell 02-26-2007 02:17 AM

Linux / Win XP
 
I don't know if I'm posting this in the right category but... I have a laptop on which I have windows xp on, and I wanted to partition the drive and install Fedora. I wanted to keep my Windows Xp installation and just resize the partition and create a partition for linux. What would be a good method to this with? How well would something like Partition Magic work for something like this?

MS3FGX 02-26-2007 02:33 AM

This would probably be better off in Linux General I think.

You could use Partition Magic if you already have access to it, but you don't need to use it. You can use a liveCD that contains Parted, which is an open source tool to resize partitions.

In fact, the installation of Fedora might even provide you with the option to resize an existing partition. I don't know for sure as I have never used Fedora myself, but I am fairly sure I read somewhere that it could do that right in the installer.

billymayday 02-26-2007 02:39 AM

I don't think you can resize from anaconda (fedora install) from memory

b0uncer 02-26-2007 03:10 AM

I think it's quite possible. At least Ubuntu's installer will, if it detects there already are partitions on the harddisk, present the user with choices to format whole disk, resize a partition and use the new free space on it or do manual partitioning (there might be other options, but at least those), so I wouldn't be surprised if the newest Fedora Core installers did the same. Anyway, if the installer can't do it, you can always use a Linux live-cd and run Gparted or Qtparted (partitioning programs) to do the job. Effectively it's all the same if you just used Partition Magic, if you have access to it. As a sidenote I recommend you first use the Windows system tools to defragment the partition(s) you are resizing; I've never run into problems even if I have not defragmented the partition to be shrinked, but I read somewhere that a partition that has been used for long without defragmenting it could result in a data loss, big or small, when resizing it. Also I hope your XP is -- as it surely is -- on a primary partition, because those are easier to resize than extended ones I think.

You can safely start the Fedora installer and proceed to the stage where it starts asking about partitions and disk usage; if that screen presents you with a choice to resize a partition, you can continue with the installer method. If it does not (it only lets you format the whole drive or do manual partitioning, for example -- using manual partitioning can let you resize drives too, but if you're not keen to do this manually..), then you can just use Partition Magic or a Linux live-cd + Linux partitioning tools. If you choose to use an external partitioning program, whatever it is, just shrink (one of) the XP partition(s) using your program of choice, and leave the free space unpartitioned (even if PM lets you create partitions and format the space to ext3 or xfs or hfs or something other Linux uses, don't do it -- the installer will handle it, and may be better so; otherwise you could just as well do manual partitioning in the Fedora setup). Before using PM or Linux live-cd partitioning tools, consider if you want to defragment your partition(s); it does take time depeinding on the partition size (a long time, if the partition is some dozen gigabytes or even more), but like I said, if the partition has been in use for a long time without defragmenting, it just might be a good idea.

So, shortly: with PM or something else, shrink at least one of the partitions so that free space is left on the drive (remember to take enough space so your files won't fill up the partitions immediately, especially if you like movies and stuff :) ), leave it unpartitioned, boot the Fedora setup and when it comes to the partitioning stage, ask it to use the "largest free space" on the harddisk (I guess it says something like that). Make sure it's not formatting the whole drive, just use the free space. Then just go on installing it, the rest should be easy. You are asked, at some point, where you would like to (or if you would like to) install the Linux bootloader (GRUB, Grand Unified Boot Loader). It probably asks if you want to install it to the MBR (first 512 bytes of the harddisk) or to the beginning of a boot partition. Both methods work, but remember these things:

- if you install it to MBR, it probably works the first boot, without modifications, but overwrites Windows' bootloader so if you later want to remove Linux and have Windows bootloader back, you'll need to use (in XP's case) the Recovery Console, which may mean you need the setup discs to "fix" the MBR

- if you install the the first sector of a boot partition, your MBR (and Windows bootloader) stays intact which is good if you later want to revert, but you may have to (unless the setup does this for you) use Linux fdisk or something to set the boot flag to your /boot partition, to enable booting.

I've found it that oftenmost installing to MBR is "easier", but reverting in that case to a Windows-only install can cause pain (or then not; it depends). Actually before going into the installation, I would use a Linux live-cd (or if the setup lets you use a console login behind the setup and access your portable media where you can save stuff) and before doing the setup, make a backup of your MBR: this way if you happen to remove Linux some day you'll have a working Windows MBR backed up, and if something goes wrong when removing Linux' bootloader you can just put the backup back to the disk and enjoy. Using a live-cd (command-line command) it's done like this (you need to be root, or type 'sudo ' before this command to make it work):
Code:

dd if=/dev/hda of=/MBR-backup bs=512 count=1
dd if=/dev/hda of=MBR-backup2 bs=446 count=1

The first one copies the whole MBR to a file called MBR-backup (assuming your harddrive where your Windows is installed, is hda = primary (IDE) harddisk; for sata drives it's probably sda; change if needed). The second is just the same, except that only 446 first bytes are copied -- that is, only the bootloader part. The rest is partition information; if your partitioning setup changes later, you may not want to put the old (wrong) partition information in (though this can be easily fixed with XP's Recovery Console).

One would then later use the same procedure to put the backup back to the disk, using a Linux live-cd:
Code:

dd if=/MBR-backup of=/dev/hda bs=512 count=1
or if you used the second file, only the bootloader part, remember to change the bs=512 to bs=446. This thing, copying MBR to a file (and taking that file to a safer place, for example with a usb stick!), is not necessarily needed but it's like a "backup plan" if something goes wrong and you can't boot to your XP :)

That's a whole lot of text. Your original question was just if you would go about shrinking a partition with Partition Magic before installing Fedora, and the short answer is: yes, go on. Additional answer is: think if you want to defragment the partition to be shrinked first, and don't partition the new free space. The rest is just my thoughts that may (or may not) help you..

pixellany 02-26-2007 04:56 AM

Quote:

Originally Posted by maxcell
I don't know if I'm posting this in the right category but... I have a laptop on which I have windows xp on, and I wanted to partition the drive and install Fedora. I wanted to keep my Windows Xp installation and just resize the partition and create a partition for linux. What would be a good method to this with? How well would something like Partition Magic work for something like this?

Get the GParted live CD or the Knoppix live CD (which includes QTParted)
Backup important data first--and maybe de-frag also.

reddazz 02-26-2007 05:04 AM

Moved: This thread is more suitable in Linux General and has been moved accordingly to help your thread/question get the exposure it deserves.

maxcell 02-26-2007 10:49 AM

Thanks guys!
This was very helpful!
I'm gonna go ahead and try that this week...

Another question, I'm using fedora because I've just started taking a linux class this term and thats the distro we're using.. On my laptop I wanted to install beryl and make it look nice and use it as a primary OS. Are there any other distro you guys would recommend? I see that Ubuntu is very popular..

serafean 02-26-2007 11:12 AM

Ubuntu would be a good choice, but it all depends on you; on what you want to do with your PC. If you want full control; I'd recommend gentoo; or Linux from scratch. Debian has quite a reputation for being stable (Ubuntu is based on it. I suggest you try them one by one and find which one suits your needs.

maxcell 02-26-2007 11:50 AM

What are the major differences between them? Will only certain program run on one but not the other?

MS3FGX 02-26-2007 01:26 PM

A Linux program will run on any distribution, there is no difference (unless of course the program in question was specifically created for that distribution, like it's package manager or configuration utilities).

As for the specific differences between distributions, they are basically too numerous to list. Each one is slightly different than the others in a hundred different ways.

The best course of action would be to figure out which ones you are most interested in (say Ubuntu and Fedora) and make a topic on those distribution's respective boards asking what the advantages and disadvantages of that distribution are. Nobody will know better than the people actually using it on a daily basis.

I mean, I know the academic differences between Fedora and Ubuntu, and could explain them to you; but not having personally used Fedora and only putting limited time into Ubuntu, I don't think I could truly make a fair comparison.

pixellany 02-26-2007 01:41 PM

Quote:

Originally Posted by maxcell
Thanks guys!
This was very helpful!
I'm gonna go ahead and try that this week...

Another question, I'm using fedora because I've just started taking a linux class this term and thats the distro we're using.. On my laptop I wanted to install beryl and make it look nice and use it as a primary OS. Are there any other distro you guys would recommend? I see that Ubuntu is very popular..

Your answer is right here in front of you---use the distro that they use in the class.

When the class is over, then revisit the question.

maxcell 02-26-2007 05:39 PM

Thanks for all your replies! :)

I am running fedora on one of my computers at home for class.. I just thought maybe there was a distribution that would run better on a laptop or something.. But I'll play around with them and see which ones I'll like...



:newbie:


All times are GMT -5. The time now is 09:58 PM.