Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-27-2005, 06:30 AM   #1
Registered: Jul 2005
Posts: 70

Rep: Reputation: 15
resizing a primary partion

I installed linux . my hard drive is 20G. Following are teh file systems. I believe hda1 is a the primary partion.

Filesystem Size Used Avail Use% Mounted on
/dev/hda1 5.8G 2.2G 3.4G 39% /
/dev/hda6 12G 165M 12G 2% /home

the primary hda1 is follwoed by a 1G swap space and tehn the hda6.

I want to migrate /home to a new hard drive . also I want to make hda1 much larger.
hoiw can I do that?

Old 07-27-2005, 06:38 AM   #2
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
You can save the home directory bit for bit into a file or directly into another partition which should be of the same size. If you save it as a file, you can restore the file by just setting "if=filename" and "of=destination_partition"

dd if=/dev/hda6 of=file_or_partition

You can resize your partition with either resize_reiserfs for Reiser or resize2fs for ext2 or ext3 partitions.
Old 07-27-2005, 06:43 AM   #3
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
take a look at this:

As for moving home. put you new disk on the machine. it will be hdb.

Then copy everything in /home to a temp directory. Edit your /etc/fstab file to make /home mount on /dev/hdb1 or whatever. mount the disk (mount -a) Then move the stuff in the temp directory back into /home. This is quick for you as you only have a very small amount of data in /home.

Although i don't really see what the benefit of a large root partition is.

Any more help with mounting etc please repost.
Old 07-27-2005, 06:52 AM   #4
Senior Member
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
ooo. conflicting advise.

Just thought my approach would be easier for a newbie. Also dear poster, it helps if you mention your distro and file system etc.

FYI. hda1 is your primary partition. you can have upto 4 primary partitions on a disk. You will note that logical partitions are always numbered 5 and above. 1-4 being for primary partitions. Your /home is hda6 because hda5 is your swap partition.

Also will want to remove this swap partition before resizing for obvious reasons. You can then use crdisk of whatever to created a new or several new swap partitions. hurrar!

Old 07-27-2005, 09:38 AM   #5
Registered: Jul 2005
Posts: 70

Original Poster
Rep: Reputation: 15
resizing a primary partition

thank you for your comments.

My file system is apparently ext3.

the reason for wanting a larger root partiotion is I wanted to make sure I will enough room for all the development tools I will need for example like fftw, clapack , spice which I intended to put in /usr/local.

In the largeer disk I also wanted to mount /prjoects which will denote my local projects.

I will appreciate any other organizing suggestions.


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
Resizing a partion. pete1234 Linux - General 5 08-01-2005 11:19 AM
? on resizing partion w/MandrakeMove eroica Mandriva 4 07-20-2004 04:14 PM
? on resizing partion w/MandrakeMove eroica Mandriva 0 05-13-2004 02:44 PM
Must "/boot" partion be installed in the primary partion? domeili Linux - Newbie 9 11-01-2003 09:27 AM
no primary partion chrismiceli Linux - General 1 11-30-2002 03:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 AM.

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