LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partition and Dual Boot (https://www.linuxquestions.org/questions/linux-newbie-8/partition-and-dual-boot-507402/)

Ziad87 12-04-2006 11:30 AM

Partition and Dual Boot
 
Hello, I have a couple of questions relating to dual booting and installing a Linux distribution. This is the first time I attempt to install or even use Linux distribution so please bear with me.

I currently have 2 SATA hard disks each having a single NTFS partition. The first hard disk is 200 GB and houses the Windows XP installation. While the second disk is 250 GB and contains all of my media.

I would like to know how to do the following:

1) Resize my Windows XP partition (I downloaded Partition Magic already).
2) Create a new partition (on the same hard disk with the XP
installation) in order to install the Linux distribution.
3) Dual boot Windows XP and the chosen distribution.

The problem is that I do not know how to perform any of the steps above. Therefore, any help would be appreciated. If someone has any links to tutorials (with pictures and full descriptions preferably), that would be of great help.

Thank you.

camorri 12-04-2006 12:25 PM

Make sure you have a backup of any files that are critical first. You need to do some work with windoze first. Clean up any unnecessary files, and run defrag, and chkdsk first.

There are several steps to creating space for your linux system. With Partition Magic, you need to shrink the windoze partition by the amount of space you want for linux. Since you have a lot of disk space, consider about 10 gig for a /. This is where the system goes. Add on some space for a swap, about double the amount of ram you have. The other partition you will need is /home. This is where your files go.

Make sure the linux space is after the windoze partition. PM allows you to move things around. If you want, you can create and format the linux partitions with PM. The other option is to partition and format the free space during the install. Most linux distros provide the tools during the install phase.

For the dual boot, during the linux install it will give a chance to install grub. Install it to the MBR ( master boot record ). The grub installer will detect your windoze installation, and update the MBR so you will get a menu at boot time, and you can choose which OS you want. You can set either as default. Set the default to the one you will boot most often. You can adjust a timer in seconds on how long to wait for input ( selecting OS ) and booting the default.

Other things to consider, if you have files on that second drive that you would like access to from both OS's, ( mp3's video etc ) consider making a fat32 partition for sharing files. Linux can read NTFS, but writing is still experimental, and I would not recommend some one new to linux to use any of the write options.

Ziad87 12-04-2006 12:32 PM

Thank you camorri, that is exactly what I wanted to know. I guess I will just stick to the installer's own partition and dual boot utilities since I am still new to this.

kaiser_suse 12-04-2006 02:21 PM

1) Before resizing the Windows partition, backup all your irreplaceable files from the first hard drive to the second one and defragment the first one, just to be safe. Back it up to external storage to be even safer. I don't have Partition Magic (I use Partition Commander or qparted) so I don't know its details or features. Resize the Windows partition according to the Partition Magic documentation. How much space to reserve for Linux depends on how you will use it. My guess is about 50 GB should give you plenty of room to play with. Give it more if you want to do media editing in Linux. Keep in mind that currently most distros can read NTFS partitions fine, but cannot write to them. I have at least 1 FAT32 partition on my multi-boot machine for transfers between OSes.

2) Create an extended partition in the free space. You could create another primary partition, but putting Linux on an extended partition gives you more flexibility in creating the partitions to be used by Linux. Linux requires at least 2 partitions: one root partition (contains all the system files, installed software, and user directories) and one swap partition (virtual memory). I prefer to use at least 3: root (system and software), swap, and one for user files (/home). If Partition Magic can format Linux partitions (e.g. ext2, ext3, ReiserFS) go ahead and format the new partition using ext2 or ext3, or simply leave it unformatted. Most distros will detect existing Linux partitions during installation and give you the option to install over the existing Linux partitions or in an unused partition.

3) If you are installing one of the major graphical-oriented distros like Fedora, Mandriva, or SuSE, the graphical installation screens will walk you through each step, including partitioning and setting up GRUB or LILO to multi-boot any other OSes. I know SuSE and Mandriva will automatically detect your Windows partition(s) and make Windows one of the boot choices and automount your Windows partitions when you boot into Linux. By default, they make Linux the default boot selection (the OS that boots when you don't make a selection within some time delay), but they give you the option of making the other OS the default selection. The graphical installation also lets you repartition the space you set aside (break it up into several logical partitions within the extended partition) and define mount points for each of the logical partitions. A mount point specifies the partition that contains the files and subdirectories that belong to a specified directory. An extended partition can be subdivided into several logical partitions which you can use for the mount points and swap partition(s). In this case, the extended partition you created in step 2 should show up as hda5, where hda = 1st IDE hard drive, 5 = 1st logical partition in extended partition (numbers 1-4 are reserved for primary partitions, hda1 is Windows system partition aka C:\). SATA drives might show up as sda, sdb, etc.
Here is the most basic partitioning scheme for any Linux system:
hda5 or sda5: swap partition, as a rule of thumb, should be twice the size of installed physical RAM.
hda6 or sda6: remaining space for / or root directory which contains everything else.
You can change the order so that / comes before swap.

Bansheex 12-04-2006 03:08 PM

This is good info. I have been wanting to do the same thing. Just to make sure I have in right, do I put the Mandriva disks in at bootup? Another question is I have Mandriva loaded on a seprate drive and have to shut down and change drives when I want to run a different OS. Is there a way to have it boot to the second drive (Mandriva) or do you have to do a duel boot off the same drive.

Thanks,

Don

kaiser_suse 12-04-2006 05:32 PM

Quote:

Originally Posted by Bansheex
This is good info. I have been wanting to do the same thing. Just to make sure I have in right, do I put the Mandriva disks in at bootup? Another question is I have Mandriva loaded on a seprate drive and have to shut down and change drives when I want to run a different OS. Is there a way to have it boot to the second drive (Mandriva) or do you have to do a duel boot off the same drive.

Assuming you are multi-booting Windows and Mandriva, make the drive containing Windows the first drive in both cable connection to the motherboard (primary master) and BIOS setting, since Linux is far more flexible in where it is installed than Windows.

Assuming your BIOS is capable of booting CDs or DVDs, set the device boot order in your BIOS setup so that the CD or DVD drive comes before the hard drive(s). Insert the first Mandriva disk and reboot. As you go through the graphical installation routine, you have the option of selecting the drive(s) that you want to install on and/or overwriting existing Linux partitions. You should choose "expert mode" when you reach the disk partitioning part of the installation routine. This way, you can choose to keep your existing Mandriva partitions and reformat only selected partitions. Assuming you kept /home on a separate partition, select all of the old Linux partitions for reformatting except the one containing /home so that you have a fresh install. One of the main reasons for keeping /home in its own partition is so that you can reinstall Linux or install a new distro without touching your personal files and settings, which are always kept in /home. Your second IDE hard drive should show up as hdb. If you have 2 SATA or SCSI drives, they might show up as sda and sdb. sdb1 would be the first primary partition on the second SATA drive. Linux is very flexible on where its partitions are located. You could even install a distro to use partitions across multiple hard drives. Optimal partitioning schemes could be another thread unto itself.

When you reach the point in the installation where you setup GRUB or LILO, it will automatically include the Windows system located on your primary master drive along with your fresh installation of Mandriva in the list of OSes. You will be given the option of installing GRUB or LILO to the master boot record (MBR). You want to install it to the MBR of the primary master or first drive, not the second one where Mandriva is located. If you install it to the MBR of the second drive, you will have to change drive order to boot Mandriva. After completing the install routine, you should now be able to boot either OS at startup without changing drive order or additional boot disks.

Bansheex 12-05-2006 10:45 AM

Thanks, I will give that a try. I got it to work last night on one drive with win xp (both os's on one drive) until I did something wrong. Now when I go to boot in Linux, I get a logon and password screen instead on the gui. When I enter the logon namd and password, I get what looks like a command line prompt. Can I fix this? I want it to come up in Gnome

Don

camorri 12-05-2006 01:14 PM

At the command line, try the command 'startx' ( without the quotes ). That should start the gui. Let us know if it does not start with any errors or conditions you get.

Bansheex 12-05-2006 01:25 PM

Ok thanks, I will try it when I get home.

Bansheex 12-05-2006 06:54 PM

It worked. Is there a way to get it back to normal or do I have to do this every time? Also I like it to come up in Knome insted of KDE Is there a way to fix this, or would a reload be better?

Thanks

Sorry for hi jacking you thread Ziad87

btmiller 12-05-2006 07:46 PM

It sounds like the machine has been set to boot in runlevel 3 instead of 5 (I don't use Mandriva, but I think the runlevels are the same as Red Hat). Open the /etc/inittab file in a text editor (you will need to have root privileges) and change the line that says:

id:3:initdefault:

to

id:5:initdefault:

There will probably a comment somewhere in /etc/inittab to the effect that run level 3 is for full multi user mode with no X Windows (the GUI) and run level 5 starts the GUI on boot. To be on the safe side, please make a back up of the /etc/inittab file before modifying it in case something gets screwed up.

camorri 12-06-2006 09:17 AM

Quote:

Is there a way to get it back to normal or do I have to do this every time? Also I like it to come up in Knome insted of KDE Is there a way to fix this, or would a reload be better?
Did btmiller's suggestion work for starting x ?

As far as which desktop to start, yes you can select one as default, if you have more than one installed. Most distros will run the last one started, unless you change it at logon time. Take a look at the statup menus, you should see the option.

What distro are you running?

Bansheex 12-06-2006 10:43 AM

I just reloaded it and it works fine.

I want to thank all that replied. This is a great fourm.

As soon as i get more comfortable with this OS, I think I will dump Windows and just use it on my laptop.

Don

pixellany 12-06-2006 11:23 AM

Quote:

Originally Posted by Bansheex
I just reloaded it and it works fine.Don

Congratulations!! We like this kind of newbie.

Above of course is the universal cure for computer issues, except--for Windows-- it would read as follows:

"I just reloaded it and it works as well as it ever did."

At least with Windows2000, the folklore says that you need to re-install at least once per year. I've found this to be true. Never seen ANY evidence that it applies to Linux.

Now that you have gotten more answer than you wanted..........;)

bluecog6 01-09-2007 08:44 PM

This has been a very useful thread.

I want to dual boot my windows machine with openSuSE 10.2 (btw I'm brand spankin' new to Linux). I have SO MUCH crap on my computer that I cannot (at this point) reasonably justify switching to Linux wholesale.

Q1: is there any reason for me to believe that I would NOT be able to use kaiser_suse's advice and toss in a 2nd HDD, install openSuSE on it, install GRUB on the MBR of my primary (Windows) drive, and call it good?

Q2: does anyone specifically know whether the openSuSE installer allow you to choose where GRUB is installed?


All times are GMT -5. The time now is 05:15 AM.