LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Advice requested on GRUB bootloader and repartitioning a badly partitioned drive (https://www.linuxquestions.org/questions/linux-newbie-8/advice-requested-on-grub-bootloader-and-repartitioning-a-badly-partitioned-drive-600846/)

whippanykid 11-19-2007 09:50 AM

Advice requested on GRUB bootloader and repartitioning a badly partitioned drive
 
To whom it may concern:

I would like some advice on how to repartition an overly partitioned hard drive.

I have a Sony VAIO desktop, about seven years old. It originally came installed with Windows XP. Earlier this year I made it into a dual-boot computer by partitioning the hard drive and installing Ubuntu 6.06. The original configuration of the hard drive was as follows: it had a 13.97 GB NTFS partition, on which Windows XP was installed, and a 41.96 GB partition, also NTFS, which constituted the computer's D-drive. At the time I attempted turning the machine into a dual-boot computer, the D-drive had some files on it, but was mostly empty; I decided to partition that drive. The result was the following:
Partition 1: Device: /dev/hda1 Filesystem: Windows NTFS Size: 13.97 GB (2.70 GB free)

Partition 5: Device: /dev/hda5 Filesystem: Windows NTFS Size: 8.75 GB

Swap Partition: Device: /dev/hda6 Filesystem: Memory Swap Size: 1.35 GB

Partition 3: Device: /dev/hda3 Filesystem: Extended 3 Access Path: / Size: 31.86 GB (11.36 free)
Thus, Ubuntu was installed on Partition 3, and the original D-drive was reduced to 8.75 GiG, with its files still intact.

Recently I borrowed a book from the library (Ubuntu for Non-Geeks, by Rickford Grant) that included a CD containing a live version of Ubuntu 7.04, which I found allowed Ubuntu to read Windows partitions. Because I thought this ability would be useful to me, I decided to try upgrading to this newer version.

I soon found that there was no simple way to upgrade directly from version 6.06 to 7.04. For this reason, I tried installing the newer version over the old one.

In the process of preparing for the installation, it occurred to me that the 8.75 GB D-drive (i.e., Partition 5) might be a better place to put the Ubuntu root folder. That way, I could use Partition 3 for the home folder, and I wouldn't need to overwrite user data on subsequent upgrades.

My mistakes began when I accepted the installer's suggestion and did an automatic install. I thought what I was doing was going to give me an 8.75 GB partition for the Ubuntu kernel, and leave me a 31.86 GB partition for a home folder. Instead, what I got was the following:
Partition 1: Windows NTFS, 13.97 GB (2.70 GB free)

Partition 5: Windows NTFS, 4.45 GB (free space not available)

Partition 7: Extended 3, 4.05 GB (free space not available)

Swap Partition, 250.98 MB

Swap Partition, 1.35 GB

Partition 3: Extended 3, 31.86 GB (11.36 GB free)
That is, instead of a dual-boot computer, I now have a triple-boot one; the boot-loader lists Ubuntu 7.04 first, Windows XP second, and Ubuntu 6.06 third. The primary operating system (Ubuntu 7.04) is squeezed onto a 4.05 GB partition where it has no room to grow, i.e., no room for writing files. When I try getting rid of the old D-drive, Partition 5, to make more room for partition 7, I am told that, for logical reasons, I cannot delete partition 5 without first deleting partition 7. I am hesitant to delete partition 7 (and the Ubuntu 7.04 that is on it), because I worry that the GRUB bootloader may not work properly if I do so. At least, I have managed to screw things up to this extent; I worry that, if I try to fix things on my own, deleting operating systems without knowing what I am doing, I will only end up making the computer completely unusable.

Ideally, I would like to return the machine to a state somewhat like it was in before. That is, I would like to get rid of Partition 7 and the Swap Partition that goes along with it. I don't mind getting rid also of the files that are on Partition 5, and turning that partition into either Ext3 or FAT32. It still seems to me that my earlier 8.75 GB Partition 5 might be a good place to put a Linux kernel (whether Ubuntu or something else), and that the 31.86 GB Partition 3 would do well for a Linux home folder. But I am uncertain how to get from where I am (an overly partitioned, triple-booting computer) to where I would like to be.

Any advice?

Sincerely,
whippanykid

pixellany 11-19-2007 11:26 AM

Here is one of a bazillion ways you might proceed. First, I assume that you have all important data backed up.
  1. <<Optional: Download the most recent Ubuntu (7.10)>>
  2. Run the Ubuntu installer and select manual partitioning
  3. Delete all partitions except the Windows NTFS
  4. Make a swap partition (1GB) at the end of the free space
  5. Make ONE*** Linux partition of ~10GB immediately after the NTFS (Primary, formatted EXT3)--mount this at /
  6. Make a partition for shared data (maybe 20GB) (Logical*, formatted FAT32**)
  7. Leave the rest empty (unpartitioned) for future changes
  8. When the Ubuntu installer sets up the bootloader, it will automatically detect the Windows installation
  9. don't set the boot flag on anything except the Windows partition

*If you ever need more than 4 partitions, then 1 of the first 4 must be an "extended". Creating a logical partition does this automatically.

** FAT32 is the easiest way to share data, but does not allow you to setup permission. I use EXT3 for shared data--requires installing the "ext2fsd" driver on Windows

*** IMHO, there is very little benefit in having more than one partition for the OS (+ swap)


All times are GMT -5. The time now is 02:53 PM.