Partitioning problem (max amount of primary partitions)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Partitioning problem (max amount of primary partitions)
I currently have Ubunutu 8.04 installed on my computer. My partitions are as such:
/
/swap
/home
/files
The hard drive still has free space on it, however when I went to gparted to create another partition it tells me I have the max amount of primary partitions. I now relaize that I need to created an extended partition however I have 4 primary already. Is it possible to remeove the /home partition so I could do this? Or would removing the /home parition some how mess up my installation?
You'll have to edit /etc/fstab to point to the new /home partition, but other than that you shouldn't have any problems. Just make sure you back up any important files that you want to keep (remember to check the hidden files too).
If you remove the /home directory then you can run as root but you cannot run as user. So you could log in as root and back up /home someplace. Then you could delete /home and do whatever you intend to do with extended partitions. Once you have the partitions straight you then restore /home someplace in your new partition scheme.
When you do the backup you should backup everything because there is a good change of screwing up your system when you set up your new partitions.
I recommend that you do your repartitioning from a liveCD. That way if you screw up the repartitioning you won't take the system down that you are working from.
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc58437ed
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15298 122881153+ 7 HPFS/NTFS
/dev/sda2 15299 38913 189687487+ 7 HPFS/NTFS
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00098f56
Device Boot Start End Blocks Id System
/dev/sdb1 1 4255 34178256 83 Linux
/dev/sdb2 4256 11550 58597087+ 83 Linux
/dev/sdb3 11551 11793 1951897+ 82 Linux swap / Solaris
/dev/sdb4 11794 26381 117178110 83 Linux
Disk /dev/sdc: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x20202020
Device Boot Start End Blocks Id System
/dev/sdc1 1 10 80293+ 0 Empty
/dev/sdc2 11 3648 29222235 b W95 FAT32
I looked in the fstab file, how would I need to edit it this to point the /home to a different location if I chose to do that?
Of course, Ubuntu uses UUID - that will change if a partition is re-formatted. Also applies to the swap if that is moved to a logical. Makes the fstab change(s) a little more "interesting".
You are fortunate that all the free space exists at the "end" of the disk - if it is sdb4 that can be (safely) deleted, then all the free space can be allocated as an extended partition. Logicals can then be created at will.
You are fortunate that all the free space exists at the "end" of the disk
I'm afraid I don't see why that would matter. On modern hardware, an extended partition can be placed anywhere: before, int between or after any primary partitions.
True - but it can't span dis-contiguous extents. So if you have separate free space extents (interspersed between primaries), you can wind up in the same bind as the OP - free space that is unreachable.
Ah, OK, now I see what you mean. I never thought of that because with only 4 partitions, you can do pretty much anything, although some scenarios will involve quite a bit of shuffling around.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.