On Sun, 06 Feb 2005 17:19:00 +0100, Heinz Sporn <[EMAIL PROTECTED]> wrote: > Hi, > > if you need room for a Gentoo installation I recommend tools like > Partition Magic for Windows. The naming scheme depends on the current > number of partitions and types. After you booted a Gentoo Live CD use > fdisk or better cfdisk to get a list of partitions and the corresponding > Linux device names. > > Am Sonntag, den 06.02.2005, 15:51 +0100 schrieb Fredrik Lundgren: > > Thanks to Benjamin Sobotta and James Rushton for their answers. I now > > find that I don't > > know how to prepare my disk so Windows XP is kept intact and room is > > made for Gentoo. How do I know where Windows XP is mounted (always > > /dev/hda6 or ...)? > > > > Fredrik > > > > ----- Original Message ----- > > From: "Fredrik Lundgren" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, February 06, 2005 3:13 PM > > Subject: [gentoo-user] "Gentoo Linux and Windows XP on the same hard > > disk on the same computer" > > > > > > > Hello, > > > > > > I'm using Win XP and would like to install Gentoo on the same > > > computer, > > > so I can choose between Gento Linux or Win XP when the computer is > > > started. I haven't found out how to do this in the "handbook". Have I > > > missed som > > > information or could you point me to the instructions to achieve this > > > behavior with GRUB? > > > > > > Sincerely Fredrik Lundgren > > > > > > > > > > > > -- > > > gentoo-user@gentoo.org mailing list > > >
Here's some basic information: 1. If you bought a computer with WinXP installed, most likely (99.99%) the disk was formatted as a single NTFS partition. In order to put linux on the box, you need to free up some space. WinXP in its great wisdom (NOT) puts the Windows Swap file right in the middle of the partition, and that file is marked as unmovable, so with all the tools I'm aware of, you will only be able to get half of the space (starting right after the swap file) free for use as new partitions for Linux. There are some hints about eliminating the swap partition to allow the NTFS partition to be shrunk to a smaller size, but I did not have any success with this approach. 2. In any case, the first thing to do is to defrag the WinXP partition using the standard windows procedure. Some of the procedures to split the disk will complain if you haven't done this. 3. Once the split has been done (various procedures, I used ntfsresize on the Knoppix disk), the WinXP partition will be smaller and marked for a full filesystem check the next time you boot WinXP, so don't be surprised by a l-o-n-g boot of WinXP. 4. Once you have free space available, use fdisk from a bootable linux cdrom (Gentoo LiveCD, Knoppix, etc.) to make the space available, i.e. 'fdisk /dev/hda' assuming you have an IDE disk. Note that you can play with the free space and change things until you get it right: nothing is changed on the disk until you issue the 'w' command. You can issue the 'p' command at any time to show you the results. At the start, your disk should look like this (sizes will differ) Device Boot Start End Blocks Id System /dev/hda1 * 1 5070 40724743+ 7 HPFS/NTFS What you want is something like this (my layout, your sizes will differ, and not that I don't use a /boot partion). Device Boot Start End Blocks Id System /dev/hda1 * 1 5070 40724743+ 7 HPFS/NTFS (C: WinXP) /dev/hda2 5071 5320 2008125 c W95 FAT32 (LBA) (D: transfer) /dev/hda3 5321 9964 37302930 5 Extended /dev/hda5 5321 5445 1004031 82 Linux swap / Solaris /dev/hda6 5446 7183 13960453+ 83 Linux (my / partition) /dev/hda7 7184 7682 4008186 83 Linux (my /home partion) /dev/hda8 7683 9052 11004493+ 83 Linux (another linux / partition) /dev/hda9 9053 9964 7325608+ 83 Linux (another linux / partition) First create a small primary FAT32 partition. This will be used to transfer files between WinXP and Linux. Linux cannot be used (currently and reliably) to write to an NTFS partition! Command 'n' then select primary, then accept the starting cylinder location then select +???M (pick a few hundred megabytes or ?). Then command 't' and set the partition type to 'c'. Next setup the remaining space as an extended partition Command'n' then extended then hit enter twice to use all remaining space. You now have hda1, hda2, and hda3 as in the example above.. Now you can add your linux partitions as logical partitions carved out of the extended partition space. Note that the following partitions for linux use may be in any order you prefer. Linux doew not care. a. Now create a linux swap partition. I suggest 1 or 2 G. Command 'n' then select logical, then hit enter to accept the starting cylinder location, then enter '+1024M' or '+2048M'. Then command 't' and set the partion type to '82' for swap. Now you should have hda1, hda2, hda3, and hda5 as above (the first partition carved out of the extended partition is 5). Now decide how you want to carve up the remaining space. Gentoo recommends a /boot partition and a / (root) partition as minimum. Most people like to have a /home partition as well. I don't use /boot, so you won't see it in my example. b. If you want /boot (per the Gentoo recommendations), command 'n', then select logical, then hit enter to accept the starting cylinder location, then enter '+20M' (or your choice). You now have hda1, hda2, hda5, hda6 (for /boot). You don't need to reset the partiion type any more, since type '83' is the default c. Next create the / (root) partition. Command 'n', then select logical, then hit enter to accept the starting cylinder location, then enter '+10240M' (or your choice) to create a 10G partition. An extremely large Gentoo install my run to 10G. I've used 13G for my / partition, and I have currently 9G used. You can get by with only 3-5G, but I would recommend starting big. Now you have hda1, hda2, hda3, hda5, hda6, and hda7. d. Next create a /home partion, if you want it. I use 4G for mine, but you may want to keep scads of pictures and/or MP3 files, so make it as large as you want. Next command 'n', then select logical, then hit enter to accept the starting cylinder location, then enter '+10240M' (or pick a size or hit enter if you want to use all the remaining space). Now you have hda1, hda2, hda3. hda5, hda6, hda7, and hda8. If you didn't use all the remaining space for hda8, you can continue to create additional partitions. To see what is left, command 'n', then select logical, then hit enter twice. When you issue 'p', you will see that hda9 has the remining space on your disk. Check your work. If you don't like the results, you can delete what you have done working backwards from the list of partitions. You can remove anything except hda1!!! Then work through the procedure again until you get it right. e. When you have an acceptible layout, issue 'p' and record your work so that you have a written record of which partion is which. Then command 'w' to write your new partition table to the disk. 5. Note that you have created (if you followed my example) an unformatted FAT32 partition, so when you next boot WinXP, format that disk as FAT32 (don't accept the NTFS default!!!). 6. Now your linux partitions are ready for use. Just follow the handbook. Your partitions of concern are as follows (or whatever you chose to do). hda1 - WinXP hda2 - extra FAT32 hda5 - swap hda6 - /boot hda7 - / hda8 - /home HTH, -- Collins -- gentoo-user@gentoo.org mailing list