My system is a dual boot windows7 and xubuntu. Here's a screenshot of my partition table in Gparted.
Now I want to add another linux OS. I wanted to resize the /dev/sda3
and take 40GB for my new OS. But if I try to create a new partition after resizing, I am getting the error,
"It is not possible to create more than 4 primary partition."
I know that I can't create more than 4 primary partition and this looks like I'm in a corner. I created the initial partitioning from windows and didn't give much thought about Primary/extended partition.
Now my question is what should have I really done so that this problem doesn't happen? Was I supposed to create /dev/sda3
as extended partion and /dev/sda4
under it? Will that solve all the problem related to adding extra OS when needed? Or is there any other better scheme.
My second question is can I any way fix this without formatting any of the drive?
UPDATE:
Here is output of sudo fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x1a2544f4
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 209928191 104860672 7 HPFS/NTFS/exFAT
/dev/sda3 209928192 1905287167 847679488 7 HPFS/NTFS/exFAT
/dev/sda4 1905289214 1953523711 24117249 5 Extended
Partition 4 does not start on physical sector boundary.
/dev/sda5 1905289216 1947305983 21008384 83 Linux
/dev/sda6 1947308032 1953523711 3107840 82 Linux swap / Solaris
If I resize /dev/sda3
to have unallocated space in the end of that partition, can I add that space to the /dev/sda4
extended partition without harming my existing xubuntu installation?
Yes, you should be able to resize your extended partition (just sda4) to include free space on either side of it (adjacent to it), after shrinking/resizing sda3.
An extended partition can hold many other partitions, it's like a container for "more than just 4" partitions. I think if you didn't already have an extended partition you would have to delete one of the 4 existing partitions first, and then create an extended partition in the free space.
But, it appears that you already have an extended partition, so you should just need to shrink one of the partitions (sda3 as you suggest) to make more free space adjacent to the extended partition (sda4), and then resize the extended partition (sda4) to include the free space, and create another partition (inside the free space, inside the extended partition). If you're not currently running linux from (or have mounted) a partition you should be able to shrink it with gparted
but if it is mounted and it's something important that won't unmount you can use gparted from a live cd/dvd/usb.
Or if you're worried about windows's files and don't want to shrink it with gparted, windows should know how to shrink its own partition if it's sda3 (though windows will undoubtedly call it something different) and leave the free space to resize the extended partition with gparted.
It's hard to read but it looks like there's a /tmp partition, that sounds like a good candidate to delete if you didn't have an extended partition and still needed to delete one, and then recreate the /tmp partition, though it might require a little recofiguring of linux/ubuntu to find /tmp again.
Almost forgot, but in the future if you wanted to avoid all this "limit of 4 partitions" nonsense you can make the first partition an extended partition using the whole disk, and create every partition as a logical partition inside the "main" extended one. I think I heard somewhere there used to be problems with dos or old windows where they had to have at least one "primary" partition, but that's probably not an issue anymore.
OR you could not use MBR (master boot record) partitioning at all, and instead use GPT (GUID Partition Table) it has a limit of 12x partitions and disk sizes up to 18EB (I don't even know what an EB is offhand, but I'm sure I don't have 18 of them ;-)
No comments:
Post a Comment