Mailing List Archive

changing root partition
My / is on a 16G ext3 filesystem. As you can guess, this is the result of a
mistake with fdisk, when installing. *Sigh*
/usr and /usr/local are on different filesystems (as intended). Only ~450M are in use,
in /. I'm not in need of the unused space right now, but it's absurd.
So: is there some _safe_ way to solve this? I suppose I could copy the
contents of / to some new partition, but what about /dev and such? The
ideal would be to shrink the / partition. Can it be done? Or should I
reinstall?

Thanks.

Jorge Almeida

--
gentoo-user@gentoo.org mailing list
Re: changing root partition [ In reply to ]
I've already did such mistake, just copied all directories with the
exception of /proc to the new partition.

/dev is a must, don't worry, there's no harm on copying it to somewhere
else.

/proc is mounted at boot time for CPU process controls, during your copy
process you should unmount it, as long as any other mounted partitions.

After that, just edit /etc/fstab to match your new partitions, and
reboot. Everything must be working fine.

This has worked for me, but you might expect some odds. Keep a bootable
Gentoo CD at hand.

Maybe it would be better if you do all the copying from one partition
form another when you are not using those file systems, perhaps this
idea of using a live CD is a better one, you'll not have anything
mounted that could trick you.

Hope this helps

Francisco


Jorge Almeida wrote:

> My / is on a 16G ext3 filesystem. As you can guess, this is the result
> of a
> mistake with fdisk, when installing. *Sigh*
> /usr and /usr/local are on different filesystems (as intended). Only
> ~450M are in use,
> in /. I'm not in need of the unused space right now, but it's absurd.
> So: is there some _safe_ way to solve this? I suppose I could copy the
> contents of / to some new partition, but what about /dev and such? The
> ideal would be to shrink the / partition. Can it be done? Or should I
> reinstall?
>
> Thanks.
>
> Jorge Almeida


--
gentoo-user@gentoo.org mailing list
Re: changing root partition [ In reply to ]
On Mon, 4 Oct 2004 14:40:18 +0100 (WEST), Jorge Almeida
<jalmeida@math.ist.utl.pt> wrote:
> The
> ideal would be to shrink the / partition. Can it be done? Or should I
> reinstall?

I believe parted advertizes that it can do such things...

http://www.gnu.org/software/parted/parted.html

Good lluck,
Mark

--
gentoo-user@gentoo.org mailing list
Re: changing root partition [ In reply to ]
Jorge Almeida wrote:
> My / is on a 16G ext3 filesystem. As you can guess, this is the result of a
> mistake with fdisk, when installing. *Sigh*
> /usr and /usr/local are on different filesystems (as intended). Only
> ~450M are in use,
> in /. I'm not in need of the unused space right now, but it's absurd.
> So: is there some _safe_ way to solve this? I suppose I could copy the
> contents of / to some new partition, but what about /dev and such? The
> ideal would be to shrink the / partition. Can it be done? Or should I
> reinstall?
>
> Thanks.
>
> Jorge Almeida
>

Managing partitions is *never* "safe". You always run the risk of losing
data.

That said, since you're only using 450MB, backing up to a CD or DVD
should not be difficult, and booting from a LiveCD such as Knoppix
should enable you to shrink the unmounted Gentoo / partition using
qparted, after which you should be able to do with the freed space as
you will.

There may be further steps involved in informing the the kernel, the
bootloader and other components that the partition size has changed (you
may need to run cfdisk and rewrite the partition table, and reinstall
GRUB/LiLO for example), so you should check for more detailed
instructions, but that should basically cover it, afaik.

Hope this helps.

Holly

--
gentoo-user@gentoo.org mailing list
Re: changing root partition [ In reply to ]
On Mon, 4 Oct 2004, Mark Knecht wrote:

> On Mon, 4 Oct 2004 14:40:18 +0100 (WEST), Jorge Almeida
> <jalmeida@math.ist.utl.pt> wrote:
>> The
>> ideal would be to shrink the / partition. Can it be done? Or should I
>> reinstall?
>
> I believe parted advertizes that it can do such things...
>
Thanks a lot. It seems to be just what I need, and it's even documented.
Since I'm working remote and I need to shrink the root partition, I
won't be able to try it before a few days, though.

Cheers,

Jorge

--
gentoo-user@gentoo.org mailing list
Re: changing root partition [ In reply to ]
On Mon, 2004-10-04 at 19:07, Francisco J. A. Ares wrote:
> /dev is a must, don't worry, there's no harm on copying it to somewhere
> else.
>
> /proc is mounted at boot time for CPU process controls, during your copy
> process you should unmount it, as long as any other mounted partitions.
>
> After that, just edit /etc/fstab to match your new partitions, and
> reboot. Everything must be working fine.

I did this too when I migrated my FC2 install on /dev/hda9 to /dev/hda8
to put in gentoo.

All I did was
sudo rsync -av --progress --delete --exclude /home --exclude /usr/src
--exclude /mnt --exclude /proc --exclude /sys . /dev/hda8


/dev might take a long time as there's lots of files there.


--
Ow Mun Heng
Fedora GNU/Linux Core 2 on D600 1.4Ghz CPU kernel
2.6.7-2.jul1-interactive
Neuromancer 09:41:33 up 1:09, 7 users, load average: 4.45, 3.46, 2.25

--
gentoo-user@gentoo.org mailing list