# What do I do with this?

## Kas_

I have:

2 20gb IDE hard drives

1 1.5 tb IDE (i think) hard drive.

Problem:

I don't use Windows but I'm afraid to completely leave Windows. It's using my 1.5 TB drive. I need that space for other stuff. (videos, Gnome, KDE, pictures, documents)

To Do:

I want to put Windows 7 on one of the 20gb and Gentoo on the other one. I want them both to be able to access the files saved on the 1.5 TB. 

Right Now:

The 1.5 TB is truecrypted and running Windows 7.

One of the 20gb drives are running Gentoo. both drives are identical and I'm a little worried that I won't be able to tell them apart and might end up saving windows over my gentoo one. 

I have a:

AMD Athlon II x4 640

3 gb RAM

How do I do this? Do I need to unencrypt the 1.5 TB first? Also, would there be a problem with filesystems? How do I save my current stuff on the 1.5 TB? How do I format the 1.5 TB after I install windows on the 20gb? 

If this is a bad idea, please tell me. Thanks.

----------

## jpc22

Are you sure windows 7 with all the  updates will fit on a 20gb drive.

You should backup your data first. Linux  can read pretty much any filesystem unlike windows, so your filesystem choice will be limited to windows compliant ones like fat32 and ntfs.

You could add a label to your gentoo partition to identify it. and work with disk uuid instead of dev/sdx.

----------

## NeddySeagoon

Kas_,

Windows 7 will struggle on a 20G drive.  Leave it where it is but shrink its partition.  You can then use the unallocated free space as you wish.

You can move parts of your Gentoo there if you wish, e.g. /home, /usr/portage, /tmp, /var/tmp/portage which will free up space on your 20G Gentoo drive.  KDE and Gnome might even fit.

You can move your whole Gentoo install over if you want but thats more work than just moving a few parts.

For Windows and Gentoo to write to a common filesystem, you need to choose either FAT32 (vfat to Gentoo) or NTFS.   If you choose NTFS, you need FUSE support in your kernel and the ntfs-3g package.

----------

## Kas_

Yeah, actually, I was thinking it over and I should probably just move Gentoo to the 1.5 tb. Do I need to defrag and whatever? I think windows uses 2 partitions and gentoo uses 3 and the IDE drives only split into 4. So, partitioning could get kinda messy. I could use gparted but i think that will mess up windows. I do have the windows installation discs so it's not a problem if i mess up windows. I'll save my files first though. 

As for gentoo, what do i copy to save my current kernel configuration? I think i'll probably have to alter it because the hard drive is different.  Do I need to completely re-install everything or can i just kinda copy paste...probably re-install right? 

I think I'll save 1 of the 20gb and set that to vfat for saving files in between. 

If:

Rosetta Stone, Dreamweaver, Itunes (Songs included), Photoshop, Microsoft Office is probably what I'll have on Windows 

If:

Movies, Libre Office (powerpoint, documents,spreadsheets), Desktop Environments, Website backups, Apache2 is probably what I'll have on Gentoo

Then:

About how much space should I give to each of them? 

Thanks for your help.

----------

## NeddySeagoon

Kas_,

The kernel used to limit you to 15 partitions on  a SCSI device and 63 on an IDE device.  Now that the /dev/hdX drivers are depreciated and everything is SCSI, the limit may be 15 partitions but I have seen mored used.

You are limited to four primary partitions with an MSDOS disk lable and 255 with a GPT Disk Lable.

You may designate one of the primary partitions as an extended partition, where it just serves to reserve space. Further (logical) partitions are then created inside the extended partition.

Your kernel configuration is fine, provided your Gentoo can see the hard drive now.  You have drivers for the controller on the motherboard, not the hard drive.

You need your /usr/src/linux/.config file to preserver yor kernel configuration.

To migrate Gentoo, boot with system rescue CD, or any liveCD. make a dir called /mnt/old

Mount your existing Gentoo partitions there, taking care to use the -o ro option.  This stops you messing up later. 

Male a dir called /mnt/new and mount your new Gentoo space here, just like you were going to install Gentoo.

Now you can do

```
 cp -a /mnt/old/* /mnt/new
```

To tidy up, fix /etc/fstab and grub.conf to point to your new partitions.

Take care here - this will break Windows booting, install grub to the MBR

Fix Windows booting.  

Go into the BIOS to boot the new HDD first, if its not already set that way.

Boot into your migrated Gentoo.

----------

## Chiitoo

Teegrins!

 *NeddySeagoon wrote:*   

> Take care here - this will break Windows booting, install grub to the MBR

 

That made me feel like noting here, that if in some situation you are confronted with a situation where you can't or won't boot a SystemRescueCd or any other such to fix things the Linux way, and wanted to fix the Windows, there are at least a couple of useful tools for just that which are included in at least the Windows 7 disks (probably on Vista, too, as the Win7 one works to fix Vista installations too!).

Boot up with the CD, and go to the system recovery thing; I can't remember what it is called, but in any case, once you find the option to use the command line, check out the bootsect and bootrec commands.  These will allow you to install the Windows bootloader and such again (and can be used to get rid of that silly 100 MiB or so partition that w-seven creates, for example).

While some might think this to be off-topic, I felt like this being relevant as I have messed around with plenty of computers—not—my—own where recovering this kind of things was necessary.  This will effectively save you from the need of re-installing Windows.  ^^

And, I've used this knowledge plenty of times while doing multi-boot installs involving windoze and Linux, so it's related, yo!

----------

## NeddySeagoon

Chiitoo,

What you say is both correct and relevant.  Your process destroys grub though.

The problem arises from the fact that the MBR can contain at most one bootloader. Either the Windows one or one of the Linux ones.

Therefore, whichever bootloader is selected, it has to be able to boot all of your operating systems.

The  configurations are well documented.

----------

## Bones McCracker

One approach, since you're planning on using multiple disks, is to preserve the Windows MBR by installing GRUB on a different disk.  This requires you to set that other disk to be your boot disk (in BIOS).

You still create a GRUB entry to chainload the Windows bootloader.  The MBR isntalled by Windows is simply ignored (as it's no longer your boot disk).  This way, if you ever want to de-install Linux, you simply change the boot disk back to the one you installed Windows on, and the MBR is still intact, allowing you to boot Windows without GRUB and without going through any repair process.

----------

## jpc22

You could also install grub on the mbr of a usb stick.

----------

## Bones McCracker

 *jpc22 wrote:*   

> You could also install grub on the mbr of a usb stick.

 

Yes, if you had a reason to want to do that.

----------

## Chiitoo

 *NeddySeagoon wrote:*   

> Chiitoo,
> 
> What you say is both correct and relevant.  Your process destroys grub though.
> 
> The problem arises from the fact that the MBR can contain at most one bootloader. Either the Windows one or one of the Linux ones.
> ...

 

Heh, good point, which I failed to mention!  In the cases I went that way, the Grub was not intended to be preserved indeed.

For any install where multi-boot was the end result, Grub is used.

 *BoneKracker wrote:*   

> One approach, since you're planning on using multiple disks, is to preserve the Windows MBR by installing GRUB on a different disk.  This requires you to set that other disk to be your boot disk (in BIOS).
> 
> You still create a GRUB entry to chainload the Windows bootloader.  The MBR isntalled by Windows is simply ignored (as it's no longer your boot disk).  This way, if you ever want to de-install Linux, you simply change the boot disk back to the one you installed Windows on, and the MBR is still intact, allowing you to boot Windows without GRUB and without going through any repair process.

 

Another good point.  Just recently, I installed Mint to a friend's box to test some things out (and to try and convert them just a little bit).  I'm pretty sure that I told it to install the loader to a different disk.  I wasn't sure if it was possible to preserve the MBR just like you say, but I imagined it was worth a try, and then I'd find out.  In the end, when that disk was removed, Windows would not boot without repairs with them tools (and the Vista) I mentioned.

Granted, that's a pretty sure mixed with Mint, which I don't have too much experience yet.  Also Grub2.  Still, I'm thinking the Mint-installer might have been doing something it didn't tell me about.

Reminded me again of the things I like about Gentoo.   :Cool: 

----------

## Bones McCracker

Could be; I haven't personally set up a multiboot like this with GRUB2.  Or maybe you screwed up and did it wrong.   :Razz: 

In any case, good to know the tools to save yourself if you need to.

----------

## Chiitoo

 *BoneKracker wrote:*   

> Could be; I haven't personally set up a multiboot like this with GRUB2.  Or maybe you screwed up and did it wrong.  

 

Yeah, I'm thinking the latter myself, too.   :Cool: 

It was a really random experiment and I don't have the box here any longer.  Too bad my laptop doesn't have more than one disk (has Gentoo, Mint, and WinXP with Grub2).

I shall keep this in mind for something to test in the future!

----------

## cwr

The simplest approach is probably to put Gentoo on the second drive, with a partition readable by

Windows, and boot Gentoo (grub) via the Windows menu - it means another 5 seconds or so

of delay, but it means you don't have to mess with the main drive's MBR.

Adding stuff to the Windows boot menu is easy on XP and below, and not difficult otherwise.

Google is your friend here.

Will

----------

## Bones McCracker

That's an alternative, but I personally wouldn't say it's the simplest or choose to do it, in a multi-drive scenario.  However, that's what's great about Linux and Gentoo; you can do things the way that best suits your personal needs.

----------

## Herring42

If you are resizing partitions, be very careful resizing a truecrypt partition. In fact, I wouldn't do it at all, There is a very high risk of losing all your data.

Backup your files, create the new partitions, and then restore!

----------

## Kas_

Hey;

Thanks for all your answers. 

So I'll probably permanently decrypt the truecrypted drive. I really don't know what I'm going to do about the partitions but I'll probably just re-install windows or whatever, it's not really a big problem.

P1: /dev/sda1 100mb windows boot

P2: /dev/sda2 Windows root

P3: /dev/sda3 gentoo boot:(32 mb?)

P4 - Extended: /dev/sda4     <---- this get's split right...as in this does not count because it's split into /sda4 and /sda6 right? 

         --/dev/sda5 swap

        -- /dev/sda6 gentoo root

***Question: If currently the drive is called" /dev/sdc because I have 3 drives and it is the third, then if I got rid of the other 2, would the drive then be known as /dev/sda? Cause this might be a problem. ****

**On Dual-booting***would it be easier if I have windows installed first then partition the drive? It seems that way.

----------

## Herring42

 *Kas_ wrote:*   

> Hey;
> 
> Thanks for all your answers. 
> 
> So I'll probably permanently decrypt the truecrypted drive. I really don't know what I'm going to do about the partitions but I'll probably just re-install windows or whatever, it's not really a big problem.
> ...

 

I've a 50MB gentoo boot - grub take up a surprising amount these days, and I like having a few spare kernels around YMMV.

 *Kas_ wrote:*   

> 
> 
> ***Question: If currently the drive is called" /dev/sdc because I have 3 drives and it is the third, then if I got rid of the other 2, would the drive then be known as /dev/sda? Cause this might be a problem. ****
> 
> 

 

The way to get around this is to use UUIDs to reference your partitions.

dumpe2fs can be used to find them, or they are also displayed when you format a partition.

 *Kas_ wrote:*   

> 
> 
> **On Dual-booting***would it be easier if I have windows installed first then partition the drive? It seems that way.

 

Yes. Windows doesn't require a separate boot partition either.

I tend to install windows onto the whole disk, then resize the windows partition to suit, and install Linux on the rest.

----------

