Jump to content
Compatible Support Forums
Sign in to follow this  
shazamtwix

FedoraCore 5 dual-boot on a multi-partitioned 2nd HD

Recommended Posts

OK guys -- I know this topic has been whipped to death over the past months. I have held off on posting, opting instead to review all possible relevant threads. Unfortunately, none of them have addressed my particular problem, and I am still stuck.

 

The problem, to begin with, is, of course that I have installed FC5 to a second hard drive, and am only booting into XP, which is installed on my primary HD. I tried danleff's (the guy's a genius) solutions, including installation of grub, but it has not solved the problem.

 

First, some preliminary info: I am working off of a self-built computer (my very first).

 

Two facts that may be relevant:

 

1. I already had my secondary HD formatted to NTFS file system for XP. Since it is a rather cavernous 300 gb IDE drive, I opted to create a new 40 gb partition on the disk just for housing Linux. So when I try to switch my HD loading order on the BIOS, of course no Linux system files are found, cos ooops they're on the second partition of the secondary hard drive, rather than the beginning of the drive (this makes sense, right?).

2. Due to cord-length issues, when putting my new machine together, I had to plug the IDE cable for my HDs into the secondary IDE controller of my motherboard (Doh!). So instead of referring to my HDs as hda and hdb, I must use terms of hdc and hdd. Is this somehow related to the problem?

 

Next: As mentioned, I successfully installed Linux on the second partition of hdd. It looks, however, like files were written to a tiny partition (master boot, perhaps?) that Linux created, which was sandwiched between my XP partition and the Linux partition that I created (using QTParted from the Knoppix tools disc). This confounds me, because even though I told Linux to run a default installation, I also told it explicitely to install grub to the MBR on hdc (the primary hard drive). Thus I am thoroughly confounded.

 

Finally: I think this is pretty much all of the relevant info as far as hardware and the installation process go. As I said, I attempted danleff's fix of recovering the boot loader. After booting into FC5's recovery mode, I typed chroot /mnt/sysimage, and got a prompt reading: sh-3.1#. The following is a transcript of what I attempted next:

 

sh-3.1# grub-install /dev/hdc

/dev/hdd2 does not have any corresponding BIOS drive

 

After that, I rebooted, and XP loaded as usual. I would appreciate any input you kind folks might have into my situation.

 

Thanks so much,

 

Michael

Share this post


Link to post

Try the following command, once you are in chroot;

 

grub-install --recheck /dev/hdc

 

This tells grub to recheck the drives and partitions and install the bootloader for grub on /dev/hdc.

 

Of course, make sure that the boot order in the bios is correct, as when Fedora was installed originally.

 

See my article page on the subject, located here.

 

The small /boot partition is normal with a "default" option installation. Just the grub referencce files can be here. when you run the recheck command, the actual MBR will be written to hdc, which then references the actual grub files that it needs on the /bbot partition.

 

If this does not work, post back, as you are experiencing the "grub-bug" that I spoke about in the article.

 

The link to the total article is here.

Share this post


Link to post

Danleff:

 

You are a gentleman and a scholar, sir. It looks like the problem has been fixed and grub is up and running. I am now going to reboot and attempt to run my first ever session of FC5. Very excited.

 

My thanks.

 

Michael

Share this post


Link to post

Hi again, folks. I'm back with another question.

 

As I am using two operating systems, and had installed XP prior to FC5, my XP partitions are all in NTFS format. As I have read and learned, one may effectively read NTFS paritions, but not write to them under linux. And of course, on the flip side XP can neither read nor write to my ext3 linux partition.

 

I have two hard drives: hdc, which is an 80 gb and only holds my XP OS and hdd, a 300 gb, of which 260 are devoted to XP and 40 to FC5 (of course on a separate partition). At installation, FC5 also created a small partition for the /boot directory, which caused those fun headaches mentioned before.

 

I would like to create a new FAT32 partition of approx. 10gb on either of the two drives in order to freely move files back and forth to both operating systems. But when I try to run QTParted to resize either drive (I have tried this operation on both), I am confronted by a mystifying error message. I have attached a screen shot.

 

Anyone have any advice? I sure would appreciate it.

4-drivepartition_thumb.jpg

Share this post


Link to post
Quote:
As I am using two operating systems, and had installed XP prior to FC5, my XP partitions are all in NTFS format. As I have read and learned, one may effectively read NTFS paritions, but not write to them under linux. And of course, on the flip side XP can neither read nor write to my ext3 linux partition.


Techically, your comments are correct. However, Puppy Linux has apparently added NTFS read and write support in their new version. I have not tried that feature yet.

There is a program that can at your ext2 and ext3 partitions in Windows, but this is not, in my opinion, effective.

Are you using qtparted or gparted? Qtparted can't resize NTFS volumes, but gparted is supposed to be able to do this.

The question that I can't answer yet, is if you can manipulate Logical Volume Managment (LVM) volumes, which is what Fedora installs by default. Yes, you have one small ext3 boot partition for holding the grub boot reference files (it has to be), but the rest is LVM.

This is why it is good to have a plan before you decide to commit to a partitioning scheme on a system. I always make sure that I leave empty spcae at the end of my drives, just for this reason. Of course, Fedora takes what it wants, unless you manually partition during the installation process.

PartitionMagic for Windows will resize your first drive, if you wish. The second drive...this is a good question. I am also looking at another free utility for Windows to see what it will detect and modify. It's called 7tools Partition Manager.

I honestly don't have much experience with LVM to recommend a course of action here. Perhaps a new article in the near future?

Share this post


Link to post

danleff --

 

Thanks again, as always, for your insights. I guess I didn't realize just how in the dark I was about FC5's use of hard drive space. When preparing to install FC5, I followed the instructions laid out in the Fedora 5 Bible, by Christopher Negus.

 

He said that my hard drive would have to be partitioned to make room for FC5 prior to installation. Because NTFS is my XP filing system, Negus recommended downloading and running the Knoppix Tools CD, and then using QTParted to resize the NTFS partition prior to installing. I followed all of these steps exactly as laid out. I repartitioned my 300 gb xp drive to 260 gb, leaving 40 for FC5.

 

At this point, I would like to make an extra partition that is FAT32 so that both FC5 and XP can read and write to it... but now it seems that you're telling me the partition was not necessary to begin with and Linux will just take the room it needs? I'm not sure I entirely understand, to be honest. I realize that I'm a VERY wet behind the ears when it comes to all things linux-related... For example, I had thought that the file system FC5 used was called ext3. I now see that is an incorrect notion.

 

I have to admit: I'm pretty thoroughly confused at this point. Is that partition that I originally created just empty unformatted disk space? If so, I suppose I could just make that a FAT32 partition... although admittedly I don't know how to do this blush

 

Well... if it's of any help at all, you can find below the contents of my two HDs, gleaned from fdisk -l:

 

[root@localhost ~]# fdisk -l

 

Disk /dev/hdc: 80.0 GB, 80000000000 bytes

255 heads, 63 sectors/track, 9726 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/hdc1 * 1 9725 78116031 7 HPFS/NTFS

 

Disk /dev/hdd: 300.0 GB, 300069052416 bytes

255 heads, 63 sectors/track, 36481 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/hdd1 1 31257 251071821 7 HPFS/NTFS

/dev/hdd2 * 31258 31270 104422+ 83 Linux

/dev/hdd3 31271 36481 41857357+ 8e Linux LVM

 

Disk /dev/dm-0: 40.7 GB, 40735080448 bytes

255 heads, 63 sectors/track, 4952 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Disk /dev/dm-0 doesn't contain a valid partition table

 

Disk /dev/dm-1: 2080 MB, 2080374784 bytes

255 heads, 63 sectors/track, 252 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

It just doesn't seem to make sense. I successfully partitioned hdd using QTParted before installing FC5. It should follow that I can use QTParted again to make another partition. But I have tried on both HDs, and all I get is that mysterious error message.

 

I very much appreciate any further advice you might have to offer.

 

-Michael

Share this post


Link to post

Let's take a look at what happened. You have two hard drives in the system. You pre-formatted some space (resized NTFS) and made a linux partition on the second hard drive, correct?

 

OK, now you install Fedora. However, if you accept all the default options during the installation, this is what happens.

 

Fedora, by default erases all linux partitions on the drive and makes it's own default setup, which includes a small /boot partition and an LVM partition. Take a look at my article here, paying close attention to Figure 4.1. What does that say at the partitioning section by default?

 

Remove Linux partitions on selected drive and create default layout.

 

So now, you have a default Linux setup of your partitions as such;

 

Device Boot Start End Blocks Id System

/dev/hdd1 1 31257 251071821 7 HPFS/NTFS

/dev/hdd2 * 31258 31270 104422+ 83 Linux

/dev/hdd3 31271 36481 41857357+ 8e Linux LVM

 

 

Now there is no more room on the drive to make any additional changes. So, qtparted can't resize the LVM volume. There is no room left to make additional partitions at the end of the drive. Fedora has used all the available room on the drive, once it trashed your pre-configured Linux partition.

 

You do not want to try and make a partition at the beginning of the drive, or between the NTFS and Linux LVM volume, as this will change the logical order of the partitions and cause grub to fail. Grub is configured to boot the system with your old partitioning scheme.

 

The logical thing to have done, is to origionally make the primary NTFS partition just small enough for your needs on the hdd drive, make an ext3 partition for Fedora, then leave enough space for a fat32 partition to share files between.

 

Then, you could have used the "create custom layout" option in the Fedora partition manager if you wanted to tell Fedora to use pre-existing Linux partitions that you made on the hard drive.

 

Or, resize the NTFS partiton, make a fat32 partition for sharing, then allow Fedora to use the remaining free space on the drive, for it's installation (Use free space on the selected drives and create default layout).

 

Share this post


Link to post
Quote:
Now there is no more room on the drive to make any additional changes. So, qtparted can't resize the LVM volume. There is no room left to make additional partitions at the end of the drive. Fedora has used all the available room on the drive, once it trashed your pre-configured Linux partition.


Absolutely. I couldn't agree with you more, and I am not trying to resize the LVM partition. What I am trying to do is carve a new partition out by resizing the NTFS portion of one of my drives.

Perhaps I wasn't clear enough in my prior postings. My apologies -- sometimes when confronted with an obstacle, I do not communicate my meaning clearly.

Quote:
Or, resize the NTFS partiton, make a fat32 partition for sharing, then allow Fedora to use the remaining free space on the drive, for it's installation (Use free space on the selected drives and create default layout).


Ah... I think I understand. So what you're saying is that I actually cannot use QTParted (or any application for that matter) to resize my NTFS partition and create a FAT32 partition out of the free space. I would have had to have done that prior to installing FC5.

Well, I have currently allocated 40 GB to Fedora... which is, in all likelihood, more than I will need. So at this point, I think I would like to follow your advice and re-install FC5. So I should basically boot into Knoppix and use QTParted to totally whitewash my linux partition. I think my question is, after destroying the file system that was previously linux, what program should I use to create that FAT32 partition? Will QTParted be able to perform this task? Or is this something I need to set up when re-installing FC5?

Apologies for my green-ness in this matter. I actually did read over your article on partitioning drives for a dual-boot linux installation. The problem is that I had mistakenly assumed it would be possible to carve out another partition and make it FAT32 after installing FC5. I now understand this is not the case.

Thanks, as always, for your guidance. I will take the course of action outlined above, unless there's something I failed to understand. Please correct me if I'm wrong, or let me know if I'm on the right track.

Share this post


Link to post
Quote:
Ah... I think I understand. So what you're saying is that I actually cannot use QTParted (or any application for that matter) to resize my NTFS partition and create a FAT32 partition out of the free space. I would have had to have done that prior to installing FC5.


Actually, that is not what I meant. Let's look at a scenario.

Your 300 gig drive (hdd in Linux) originally had just an NTFS partition. Let's say for the sake of argument, that the NTFS partiton, which is just a data drive, occupies all of the space on the disk. You want to make room for Fedora and also a fat32 partition to share data with Linux. That partition has 50 gigs of actual data on it.

You can use the Windows partitoning utility to resize that partition down to make room for the other partitions.

1. Defrag the partition first. Windows tends to allow placement of scattered files across the partiton. Defrag the drive to move all the files in nice order and away from the end of the partition.

2. Using the XP partitioning utility, resize the partition down to 220 gigs, leaving roughly 80 gigs.

3. Add a fat32 partition of 40 gigs for sharing files between Linux and Windows. This leaves 40 gigs of free, unpartitioned space.

4. Install Fedora, telling it to use the remaining free 40 gigs for Fedora, say using the default layout. No pre-configured Linux partitions to be overwritten.

NTFS = 220 gigs
fat32 = 40 gigs
Fedora = 40 gigs

These actual numbers will not be exact, as the actual total usable size of a drive is not equal to 300 gigs, but a little less.

In this case, no further partitioning is realistically possible, as you need to keep the logical order of the current partitions the way they are to retain grub looking in the right place for Fedora.

Never try to resize or add any partitons at the beginning or middle of the drive, as this will confuse grub.

If you think that you will ever need more partitions, say for another Linux installation besides Fedora (adding a distro), always leave empty, unformatted space at the end of the drive. This preserves the logical order and assignment of the current partitions.

This assumes a simple configuration for newbies. Of course, there are always ways around this for experienced users.

Adding any more partitons can be a little more complicated then this, as usually there is a limit of 4 primary partitions on any given drive. In this case, you could leave your primary NYFS partition intact, add an extended partition to take up the rest of the drive, then add as many partitions as you need as logical partitions, up to the actual size of the extended partition size.


Share this post


Link to post

danleff --

 

I really appreciate all the time you've put into assisting a linux newbie like me. I think for the time being, though, I should probably just lay off repartitioning any drives, lest I commit a mortal sin and totally destroy data on my hard drive. Instead, I'll just use my 1GB flash drive to transport files between the two systems. At least until linux develops fool-proof reliable read/write support to NTFS. I will look into the project you mentioned in your earlier posting.

 

By the way -- do you know if anyone has developed support for Windows to read LVM volumes?

 

Thanks again for your time and support.

 

-Michael

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×