Gentoo Archives: gentoo-user

From: Alan McKinnon <alan@××××××××××××××××.za>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Resize /
Date: Thu, 16 Nov 2006 18:38:23
Message-Id: 200611162028.05782.alan@linuxholdings.co.za
In Reply to: [gentoo-user] Resize / by jakommo
1 On Thursday 16 November 2006 19:55, jakommo wrote:
2 > Hi Listmembers,
3 >
4 > I have a problem the / Partition on my system is to smal, is there a
5 > save way to resize it?
6 > I know mounting other partitions to e.g. /usr will help but the / is
7 > only 4,6G so it will help only temporarily.
8
9 You have a tricky problem. Any partition hosting an ext2/3 or reiserfs
10 filesystame can be reduced, but it has to be unmounted first. The
11 partition in question is /, which cannot be unmounted in a running
12 system.
13
14 So, you have to boot off a LiveCD. teh gentoo installer gives you such
15 an environment, so does knoppix or ubuntu, or even (god forbid!) red
16 hat. You need to use the filesystem resizing tool, it's e2online (or
17 maybe ext2online) or resize_reiserfs to reduce the filesystem to an
18 appropriate value, then use fdisk to resize the partition to the same
19 size as the filesystem. This will free up the unused space after the
20 partition in quetion so you can do something else with it. Just
21 remember that this will usually renumber partitions between the new one
22 and the end of the disk and you have to account for that in /etc/fstab.
23
24 So if you reduce /dev/hda5 and create a new partition in the free space,
25 then whatever you used to call /dev/hda6 is now probably
26 called /dev/hda7
27
28 There are graphical tools around to make this simpler - I believe
29 partition magic has some ext2/3 support and gparted can do cool things.
30 I can't tell you if they are good or bad as I don't use them (I'm a
31 command line junkie :-)
32
33 alan
34
35 --
36 gentoo-user@g.o mailing list