Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is it possible to move partitions in a special manner?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
01mf02
Veteran
Veteran


Joined: 21 Nov 2004
Posts: 1070
Location: Innsbruck, Austria

PostPosted: Sun Apr 24, 2005 3:01 pm    Post subject: Is it possible to move partitions in a special manner? Reply with quote

I have the following partitioning scheme:


    /dev/hda1 Windows XP (2 GB)
    /dev/hda5 Documents, pictures, movies for Windows (10 GB)
    /dev/hda6 Backup of own files (5 GB)
    /dev/hda7 Gentoo boot partition (64 MB)
    /dev/hda8 Swap partition (256 MB)
    /dev/hda9 Gentoo itself (5 GB)
    Free space (500 MB)


I have deleted my /dev/hda6 partition because I didn't need a backup anymore, so I had 5 GB of free space between my Windows partitions and my Linux ones. Some time later I ran out of disk space on gentoo, and I had to delete everything inside /usr/portage/distfiles/ and all in all, lack of disk space was very unfamiliar to me, and my 5 GB of free space got into my mind :roll: .

My plan was to move all my linux partitions behind the /dev/hda5 partition and then let my main Gentoo partition occupy the last sectors of my drive, but QtParted didn't even want to move my boot partition after the Documents partition. I would have liked it like this:


    /dev/hda1 Windows XP (2 GB)
    /dev/hda5 Documents, pictures, movies for Windows (10 GB)
    ------ No backup partition here
    /dev/hda6 Gentoo boot partition (64 MB)
    /dev/hda7 Swap partition (256 MB)
    /dev/hda8 Gentoo itself (~10 GB)
    ------ No free space after my Gentoo partition


So my problem is: How can I make a partition bigger when the free space is before the partition? I tried the System Rescue CD, but QtParted didn't seem to be able to do this. Is this possible? Or can anybody show me an alternative way to make my 5 GB Gentoo partition occupy the space which was owned by my backup partition before?
Back to top
View user's profile Send private message
RR_
n00b
n00b


Joined: 08 Apr 2005
Posts: 15

PostPosted: Sun Apr 24, 2005 4:28 pm    Post subject: Reply with quote

Xmm. Tricky.

You can easily move your boot and swap partition manually by creating similar partitions on what was /dev/hda6(don ´t mind irrelevant number in hd*)
then you can copy your boot partition in the new one (during copy you must choose to keep permitions)

Then you must correctly configure grub/lilo and fstab so that computer boots.

Unfortunately i don´t know how you can merge the space left with ¨Gentoo itself¨.
I think I stumbled upon the solution on a post somewhere but I ´m not sure where.

---------------------------------------------------------------------------------------------------------

Still, you can just create a Linux partition on hda6 and mount it on a directory on your existing /dev/hda9

---------------------------------------------------------------------------------------------------------

Hope i helped.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Sun Apr 24, 2005 5:05 pm    Post subject: Reply with quote

Some ideas, as I have not come across how to resize a partition to left into free space myself.

Seems like you could move the contents of the partition as a whole to the left with the dd command, where perhaps you do something like this
a) get the block count of where hda6 starts/stops on /dev/hda.
b) delete /dev/hda6 ... the data I think remains in tact, only the partition is removed from the partition table.
c) create new /dev/hda5 with same size and type as old hda6 on the now larger amount of free space.
c) dd if=/dev/hda offset=start_block count=(end_block-start_block+1) of=/dev/hda5
d) now resize the new /dev/hda5 to the right.

I am definitely no expert, but could something like this work?
_________________
Vim has excellent syntax highlighting for configuration files: emerge gentoo-syntax
Learn how to use Vim: vimtutor
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum