LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-06-2007, 01:52 PM   #1
rakeshj
Member
 
Registered: Jun 2007
Posts: 44

Rep: Reputation: 15
Question How to divide a partition in 2 partitions?


Hello all,

I recently installed Xubuntu on my laptop having Windows XP & one hard disk.

First I partitioned my hard disk into 2 partitions & installed Windows XP on one partition & left second partition for installing Xubuntu.

While installing Xubuntu from Desktop CD, I wanted to create 4 partitions: First - ext3 for Xubuntu
Second - Swap
Third - FAT32 data
Fourth - NTFS data

But after creating first three partition, it does not
allow me to create 4th partition. So I created third
partition combining sizez of Third & Fourth partition
(planned originally).

Now, after installing Xubuntu, I want to split the single
data partition (FAT32) into 2 partitions (one FAT32 &
other NTFS) as planned originally. As so far I have not placed any data in this partition, I have no problems in
reformattiong & spliting it into 2 partitions. I guess the mistake I made during partitioning was that I declared all four as Primary partition & possibly more than 4 Primary partitions (on single disk) are not allowed? So kindly suggest how to have above four partition (in addition to one partition for Windows XP).

Thanking you. Best regards, RAKESH
 
Old 08-06-2007, 02:14 PM   #2
ko_wei13
LQ Newbie
 
Registered: Jul 2006
Location: Malaysia
Distribution: Linspire, Fedora, Ubuntu, Knoppix
Posts: 3

Rep: Reputation: 0
Since you have the Windows XP, you can right click on the My Computer and select Manage. Under the Disk Management, split and format the partition you want as Secondary partition if you can view the partition.
Alternatively, you can use QtParted, the free partitioning software to do it.
 
Old 08-06-2007, 02:16 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Make the XP partition the only primary partition.

Make the remainder of the disk one extended partition. Inside the extended partition, make all the remaining partitions you need.
 
Old 08-06-2007, 02:16 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Please clarify the current configuration......It sounds like you have Windows installed first (on the first partition??) Run fdisk -l and post the results here.

To create more than four partitions, you simply have to create an "extended" partition as on of the first 4. Some partitioning tools do this automatically, when you create "logical" partitions. The best tools to use are GParted (comes on its own live CD), and QTParted (comes with many live CD Linux distros).

What you want to wind up with are 3 primaries--ideally with Windows on #1, and one extended partition which fills all the remaining space. You can then create additional logical partitions as required.

When we know the size of your disk, we can make more suggestions.
 
Old 08-10-2007, 04:56 AM   #5
rakeshj
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Hell All,

Thanks for the responses.

Here is the output from fdisk -l:

rakesh@rakesh-laptop:~$ sudo fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 5648 14651280 83 Linux
/dev/sda3 5649 5680 257040 82 Linux swap / Solaris
/dev/sda4 5681 7296 12980520 b W95 FAT32


I installed gparted from Xubintu distibution using apt-get install command. Seems it uses (at least it man page referes to) parted (GNU partition utility).

Output from parted utility print command is as under:

Disk /dev/sda: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 31.5GB 31.5GB primary ntfs boot
2 31.5GB 46.5GB 15.0GB primary ext3
3 46.5GB 46.7GB 263MB primary linux-swap
4 46.7GB 60.0GB 13.3GB primary fat32

I read man pages for parted but could not exactly figure out how to do the
following (as suggested by all):

1. Change partition types to Extended (except for Windows partition which
should be Primary).
2. Divide /dev/sda4 into 2 partions (say 7GB & balance size -- possibly
logical partitions?) & make first part as FAT32 (like now) & second part
NTFS preferably without destroying current contents on this partition (if
possible?
).

Kindly suggest.

Is GParted utility mentioned above (by Pixellany) different from the GParted
installed by me from Xubuntu distribution sites? This is graphical utility but
in this also I could not find out how to divide a partition in two partitions &
modify their file system types. On exit it printed the following message on my
terminal:
======================
libparted : 1.7.1
automounting disabled
======================

What does this message mean?

Thanking you. Best regards, RAKESH
 
Old 08-11-2007, 06:17 AM   #6
rakeshj
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Hello All,

I tried wi gparted but it seems I can not divide a partition into 2 parttitions (I umounted the partition before trying to use gparted) as I have all the partitions (all 4) declared as Primary Partitions.
I don't know how to convert a partition to Extended partition before I can make Logical Partition in it.
Finally, what I need to do is to some how have an Extended partition & then have 2 Logical Partitions in it. One of these should hold all data from my existing
FAT32 partition & other I want to be a NTFS partition.
Is it possible to do it without:

1. First saving data from FAT32 partition to some other
partion.
2. Removing the partition completely so it becomes
unformatted.
3. Recreate it as Extended Partition under Windows.
4. Create 2 Logical Partitions on it (one FAT32 &
other NTFS). I am not sure if this step can be
done only under Windows or also can be done under
Xubuntu (HOW).
5. Copy back the data to FAT32 partition where it
was saved.
6. Create mount point for NTFS partition & make
necessary changes in /etc/fstab & use mont -a to
mount the two partitions.

Kindly suggest if there is any other simpler alternative & if all can be done under Xubuntu using
parted, gparted, fdisk etc.

Looking forward for an quick reply.

Best regards. RAKESH

PS: Details on current file systems are given in
outputs from fdisk & pated print commands in my
earlier post.
 
Old 08-11-2007, 07:04 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,997

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
You cannot create any more partitions.
The architecture (from MSDOS days) only allows 4 primary partitions. To use logical partitions, you must first create an extended partition - this will be the "container" for all the logicals. This extended must be one of the 4 allowed primary partitions.

So you have to delete at least one partition to create the extended, then the logical(s). Back up your data first, and do it - from either Linux or Windoze.
 
Old 08-11-2007, 10:16 AM   #8
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
I don't know any tool that could split a partition in 2.
You can work with Gparted. Use one of the latest versions of the LiveCD, because Ubuntu includes a very old and buggy version.

As other friends already told, you have to make at least an extended partition and put there more (logical) partitions. Only w!ndow$ need a principal partition, so give it to them (before you put them in the trash can). Other systems can do anywhere (except perhaps Solaris or BSD ? I'm not sure).

Last edited by masterclassic; 08-11-2007 at 10:21 AM.
 
Old 08-11-2007, 10:20 AM   #9
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
Quote:
Originally Posted by syg00
You cannot create any more partitions.
The architecture (from MSDOS days) only allows 4 primary partitions.
Another great invention by the king Bill, I think!
Just like the 640KB memory model. At the time, he told that 640 KB would be enough to do anything forever
 
Old 08-12-2007, 03:54 AM   #10
rakeshj
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks for the feedbacks.

So now it is clear to me that I must backup my data on the partition which is
currently a Primary partiton, Delete the partition to convert it into Unused Space & then create an Extended Partition in the space & then create 2 logical
partions in this extended partion, one as FAT32 & another as NTFS & restore backed up data to FAT32 partition.

I guess I can locate latest Gparted LiveCD download through Google?

Thanking you again. Best regards,
 
Old 08-12-2007, 02:04 PM   #11
rakeshj
Member
 
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks to all for helping me in repartitioning the Primary partition into 2 Logical Devices
by their valuable suggestions. Gparted LiveCD is a very useful tool.

Now, a minor query:

Earlier the partionined /dev/sda4 was mounted on /osshr. But after diving it into 2 partitions, these partitions are mounted on /media/disk & /media/disk-1. It is not a problem
but for understanding the concept I want to know the following:

1. Earlier /etc/fstab had the following entry for /dev/sda4:

# /dev/sda4
UUID=1728-A5BF /osshr vfat defaults,utf8,umask=007,gid=46 0 1

But, now these lines are commented out & there are no lines in /etc/fstab
for new partitions (Logical devices /dev/sda5 & /dev/sda6). But these disks
show on desktop & mount -a is able to mount these on /media/disk & /media/disk-1.
How this happens?

2. How can I find out UUID numbers for these two devices? Can I modify /etc/fstab to
contain these UUID numbers corresponding to /dev/sda5 & /dev/sda6 & mount on some
directories other than /media/disk & /media/disk-1 eg /shrfat & /shrntfs?

Thanking you again. Best regards, RAKES
 
Old 08-12-2007, 05:56 PM   #12
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
The Gparted project is part of sourceforge.
http://gparted.sourceforge.net/index.php
The latest version is 0.3.4-8 (about 50MB ISO file), but you could even try -7 or -6 versions if you have any problem with boot-up and hardware detection.


There, you can also find "clonezilla" (a partition copy+cloning tool) together with gparted, in a livecd (~130 MB ISO).
 
Old 08-12-2007, 06:04 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,997

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
Ubuntu and its derivatives moved to UUID in fstab at 7.04. It has advantages and disadvantages - more of the latter if moving partitions around and/or sharing partitions across distros.
Your initial fstab was built bythe *buntu installer - you can edit it (anytime) with sudo.

You can generate the UUID for new partitions with uuidgen.
 
  


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
to divide ext3 partition czezz Linux - Software 6 08-10-2007 05:26 AM
Partition Problems: Bad primary partition 1: logical partitions overlap rovitotv Slackware 6 01-08-2006 07:55 PM
Expanding Root Partition and Other Partitions scoobs Linux - Software 2 12-06-2005 03:57 AM
cant divide with C skoot Programming 23 08-26-2005 07:50 PM
could not allocate partitions as primary partition? syph0n Linux - Newbie 3 07-14-2003 09:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:41 AM.

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