View previous topic :: View next topic |
Author |
Message |
xenoxion n00b
Joined: 12 Apr 2004 Posts: 39
|
Posted: Fri Jan 28, 2005 7:38 pm Post subject: Repartitioning... |
|
|
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 |
|
|
TazG Guru
Joined: 22 May 2004 Posts: 320 Location: Canada
|
Posted: Fri Jan 28, 2005 7:52 pm Post subject: |
|
|
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 |
|
|
strawhatguy n00b
Joined: 02 Apr 2003 Posts: 10
|
Posted: Fri Jan 28, 2005 8:26 pm Post subject: Re: Repartitioning... |
|
|
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 |
|
|
xenoxion n00b
Joined: 12 Apr 2004 Posts: 39
|
Posted: Fri Jan 28, 2005 9:29 pm Post subject: |
|
|
I'll check it out- thanks guys! |
|
Back to top |
|
|
Bojan Tux's lil' helper
Joined: 18 Oct 2004 Posts: 145 Location: € Matrix
|
Posted: Sun Jan 30, 2005 11:31 pm Post subject: |
|
|
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 |
|
|
Bojan Tux's lil' helper
Joined: 18 Oct 2004 Posts: 145 Location: € Matrix
|
Posted: Sun Jan 30, 2005 11:41 pm Post subject: |
|
|
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 |
|
|
syg00 l33t
Joined: 23 Aug 2004 Posts: 907 Location: Brisbane, AUS
|
Posted: Sun Jan 30, 2005 11:50 pm Post subject: |
|
|
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 |
|
|
Bojan Tux's lil' helper
Joined: 18 Oct 2004 Posts: 145 Location: € Matrix
|
Posted: Mon Jan 31, 2005 12:31 am Post subject: |
|
|
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 |
|
|
Frodg l33t
Joined: 11 Feb 2004 Posts: 761
|
Posted: Mon Jan 31, 2005 12:33 am Post subject: |
|
|
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 |
|
|
mariourk l33t
Joined: 11 Jul 2003 Posts: 807 Location: Urk, Netherlands
|
Posted: Mon Jan 31, 2005 9:03 am Post subject: |
|
|
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. _________________ 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 |
|
|
|