Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Repartitioning...
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
xenoxion
n00b
n00b


Joined: 12 Apr 2004
Posts: 39

PostPosted: Fri Jan 28, 2005 7:38 pm    Post subject: Repartitioning... Reply with quote

Right now, my hard drive looks something like this:

/dev/hde1 - Windows (40GB)
/dev/hde2 - Linux boot (64MB)
/dev/hde3 - Linux swap (1GB)
/dev/hde4 - Linux root (40GB)

If I delete windows, is there a way to repartition so that my linux root partition "absorbs" the disk space of the old windows one, growing it to 80GB? I just want to combine the two into one big partition, without losing data. Can I do this without having to reinstall everything?
Back to top
View user's profile Send private message
TazG
Guru
Guru


Joined: 22 May 2004
Posts: 320
Location: Canada

PostPosted: Fri Jan 28, 2005 7:52 pm    Post subject: Reply with quote

Download the "System Rescue CD" and you should be able to do this with QtParted. (move hde2 and hde3 to the beginning of the drive and then resize hde4 to fill the space.)
Back to top
View user's profile Send private message
strawhatguy
n00b
n00b


Joined: 02 Apr 2003
Posts: 10

PostPosted: Fri Jan 28, 2005 8:26 pm    Post subject: Re: Repartitioning... Reply with quote

xenoxion wrote:
Right now, my hard drive looks something like this:

/dev/hde1 - Windows (40GB)
/dev/hde2 - Linux boot (64MB)
/dev/hde3 - Linux swap (1GB)
/dev/hde4 - Linux root (40GB)

If I delete windows, is there a way to repartition so that my linux root partition "absorbs" the disk space of the old windows one, growing it to 80GB? I just want to combine the two into one big partition, without losing data. Can I do this without having to reinstall everything?


I think there are programs you get get (GNU Parted), or buy (PartitionMagic) that will do that. I don't think there is an "easy" solution to it, and this is pretty dangerous too, if something goes wrong. See, the problem is that unless you use LVM, your hde1 and hde4 (the two you want combined) don't reside next to each other on the disk, so it's hard to simply expand it.

Looking at the GNU Parted webpage, www.gnu.org/software/parted, you might be able to shuffle the partitions down by creating new boot and swap partitions in the 40GB windows area, copying the boot data over on the new boot partition, then deleting the old boot and swap partitions.
Then you should have:
/boot
swap
(40GB empty unpartitioned space)
/

Then you make the 40GB empty area a new linux partition, copy the data over, and delete the old one. Finally you resize the new linux partition to take up the 80GB.

That should work. Of course, you'll need to do this with another booting mechanism, like using the Gentoo LiveCD.
Back to top
View user's profile Send private message
xenoxion
n00b
n00b


Joined: 12 Apr 2004
Posts: 39

PostPosted: Fri Jan 28, 2005 9:29 pm    Post subject: Reply with quote

I'll check it out- thanks guys!
Back to top
View user's profile Send private message
Bojan
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 145
Location: € Matrix

PostPosted: Sun Jan 30, 2005 11:31 pm    Post subject: Reply with quote

Well, actually there is an easier way, at least I think so:

Make a stage4 backup of your system
http://gentoo-wiki.com/HOWTO_Custom_Stage4
make a partition scheme that fits your need and untar the stage4.

As a surplus you'll have a complete backup of your entire system.
Back to top
View user's profile Send private message
Bojan
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 145
Location: € Matrix

PostPosted: Sun Jan 30, 2005 11:41 pm    Post subject: Reply with quote

Or even better:

format your windows partition using fdisk on Gentoo live CD and mount it under your home directory like:

# mkdir /home/your-username/my-ex-win
# mount /dev/hde1 /home/your-username/my-ex-win

in case you find this acceptable.
Back to top
View user's profile Send private message
syg00
l33t
l33t


Joined: 23 Aug 2004
Posts: 907
Location: Brisbane, AUS

PostPosted: Sun Jan 30, 2005 11:50 pm    Post subject: Reply with quote

Bojan wrote:
Well, actually there is an easier way, at least I think so:

Make a stage4 backup of your system

Presuming, of course, you have somewhere to write the tar.
I've just started looking at dar as it allows splitting across DVDs, and will wait while the media is changed.

Another option maybe.
Back to top
View user's profile Send private message
Bojan
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 145
Location: € Matrix

PostPosted: Mon Jan 31, 2005 12:31 am    Post subject: Reply with quote

But that wouldn't be a question in this case (160 GB hdd).
In case you dislike splitting a big tar.bz2 file or want to copy it across LAN with Samba (2 GB limit) you can always make a few separate tar.bz2 files. I use separate tar files for system and for /home as I make backup of /home more often.

On the other hand ... DAR looks promising. I'll probably try it some day. Thanx.
Back to top
View user's profile Send private message
Frodg
l33t
l33t


Joined: 11 Feb 2004
Posts: 761

PostPosted: Mon Jan 31, 2005 12:33 am    Post subject: Reply with quote

Bojan wrote:
Or even better:

format your windows partition using fdisk on Gentoo live CD and mount it under your home directory like:

# mkdir /home/your-username/my-ex-win
# mount /dev/hde1 /home/your-username/my-ex-win

in case you find this acceptable.


This is the option I would use..
You can also use this to add additional hard drives...
_________________
Aerosolo ergo sum - I spray therefore I am

Gentoo - Registered Linux User # 361400
Back to top
View user's profile Send private message
mariourk
l33t
l33t


Joined: 11 Jul 2003
Posts: 807
Location: Urk, Netherlands

PostPosted: Mon Jan 31, 2005 9:03 am    Post subject: Reply with quote

Take a look at GParted
It support almost any filesystem. If you're lucky, you will be able to move the patitions
without any dataloss. :D
_________________
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
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