LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-14-2008, 07:05 PM   #1
th3_tr00p3r
LQ Newbie
 
Registered: Aug 2005
Posts: 16

Rep: Reputation: 0
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?
 
Old 10-14-2008, 07:15 PM   #2
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
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).
 
Old 10-14-2008, 07:15 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
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.

--------------------
Steve Stites
 
Old 10-14-2008, 07:19 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Wouldn't it be more convenient to delete the swap partition, create the extended and re-create swap inside extended?
 
Old 10-14-2008, 07:20 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Depends on where the free space is located - could get a lot more complicated. Maybe not. Let's see the output from "sudo fdisk -l"
 
Old 10-18-2008, 04:03 PM   #6
th3_tr00p3r
LQ Newbie
 
Registered: Aug 2005
Posts: 16

Original Poster
Rep: Reputation: 0
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?
 
Old 10-18-2008, 04:10 PM   #7
Total-MAdMaN
Member
 
Registered: May 2008
Distribution: Gentoo
Posts: 306

Rep: Reputation: 34
Quote:
Originally Posted by th3_tr00p3r View Post
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?
Change the first column of the line mentioning /home to reference the new /home partition.
 
Old 10-18-2008, 05:00 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
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.
 
Old 10-18-2008, 07:35 PM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
Quote:
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.
 
Old 10-18-2008, 08:05 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
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.
 
Old 10-18-2008, 08:17 PM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
4 primary partitions? sycamorex Linux - Hardware 13 06-04-2007 02:52 AM
Max amount of disks for raid 0? colinstu General 3 03-15-2007 04:25 PM
Partitioning Scheme For Max Redundancy freetolio Linux - Hardware 5 11-30-2006 10:25 AM
Partitioning - Primary and Logical partitions quietguy47 Linux - General 2 07-06-2003 11:32 AM


All times are GMT -5. The time now is 04:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration