| View previous topic :: View next topic |
| Author |
Message |
upengan78 Guru

Joined: 27 Jun 2007 Posts: 431 Location: IL
|
Posted: Wed Jul 18, 2007 2:58 pm Post subject: gparted for '/' partition resizing [SOLVED] |
|
|
Hi,
I have /dev/sda 160 GB. 40 GB is alloted to windows
This is my partition structure,
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
| Quote: |
Device Boot Start End Blocks Id System
/dev/sda1 * 1 5222 41945683+ 7 HPFS/NTFS
/dev/sda2 5223 19452 114302475 f W95 Ext'd (LBA)
/dev/sda5 5223 5228 48163+ b W95 FAT32
/dev/sda6 5229 5241 104391 83 Linux ------> /boot
/dev/sda7 5242 5364 987966 82 Linux swap / Solaris
/dev/sda8 5365 19452 113161828+ 83 Linux ----> /
|
I want to resize the / (dev/sda8) to 50GB but when I run gparted, the option for resizing '/ ' partition is absent , could be because / is mounted.
What could be posiible solution for this issue .
Please suggest me better ways or tools to do this resizing.
PS: Admin please move topic to right category if this is not correct.
Thanks _________________ ** http://forums.gentoo.org/viewtopic-t-503182-highlight-.html **??
Life is a ride
Linux 2.6.28-gentoo-r3 #2 SMP PREEMPT Fri Mar 13 15:03:13 CDT 2009 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz ATI Radeon X1300/X1550 Series 256 MB, DDR2
Last edited by upengan78 on Fri Jul 20, 2007 9:21 am; edited 1 time in total |
|
| Back to top |
|
 |
Rob1n l33t

Joined: 29 Nov 2003 Posts: 714 Location: Cambridge, UK
|
|
| Back to top |
|
 |
Veldrin Guru


Joined: 27 Jul 2004 Posts: 520 Location: Basle, Switzerland
|
Posted: Wed Jul 18, 2007 3:21 pm Post subject: |
|
|
As you already found out, resizing a mounted fs is not possible. Using a LiveCD with gparted (ubuntu or gparted comes to my mind) always a better option in such a case as yours.
cheers
V. |
|
| Back to top |
|
 |
manlydan n00b


Joined: 15 Jun 2007 Posts: 38 Location: Lake Charles, LA
|
Posted: Wed Jul 18, 2007 3:33 pm Post subject: |
|
|
Use a liveCD, such as KNOPPIX, to resize your root partition.
My personal preference for resizing ext2/ext3 partitions is to use resize2fs and fdisk because the parted programs wouldn't work for me:
For shrinking hda3:
(in this example i'm shrinking the partition to 10 gigs)
1) e2fsck -f /dev/hda3
2) resize2fs -p /dev/hda3 10G -- the new number of blocks and block size will be output something like this (you'll need this later): 2621440 (4k) blocks
3) fdisk /dev/hda
> p --> take note of the starting cylinder of hda3
> d > 3 --> delete hda3
> n > 3 --> create hda3
> start this partition at the same cylinder as it was before
> add the size of the partition in KB to determine the ending cylinder. This size is the number of blocks multiplied by the size of each block. In this example it is 2621440x4 = 10485760K
> w --> save the new partition table and now your partition is successfully smaller.
To enlarge hda3:
1) fdisk /dev/hda3
> p --> take note of the starting cylinder of hda3
> d > 3 --> delete hda3
> n > 3 --> create hda3
> start this partition at the same cylinder as it was before
> specify how large you want your partition to be
> w --> save the new partition table
2) e2fsck -f /dev/hda3
3) resize2fs -p /dev/hda3
And that's it. _________________ It's not graphical, it's textical! |
|
| Back to top |
|
 |
upengan78 Guru

Joined: 27 Jun 2007 Posts: 431 Location: IL
|
Posted: Wed Jul 18, 2007 4:15 pm Post subject: |
|
|
: thanks to all who replied, I hope using gparted is safe and it will not make me lose my data in / Partition
manlydan, you suggested this method, I have this Qn for you,
Is this a safe method to do because I have some data stuff on the / and I dont have separate /home and I also have windows in sda1.
BTW is gparted or something freely available for windows OS ?
Thanks _________________ ** http://forums.gentoo.org/viewtopic-t-503182-highlight-.html **??
Life is a ride
Linux 2.6.28-gentoo-r3 #2 SMP PREEMPT Fri Mar 13 15:03:13 CDT 2009 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz ATI Radeon X1300/X1550 Series 256 MB, DDR2 |
|
| Back to top |
|
 |
SiberianSniper Guru


Joined: 05 Apr 2006 Posts: 341 Location: Dayton, OH, USA
|
Posted: Wed Jul 18, 2007 8:41 pm Post subject: |
|
|
| I've used gparted recently to grow my / (formatted as ReiserFS) and it worked great - no loss of data at all. As far as a Windows copy, I don't think there is one - however the livecd is fine. I had to use the force VESA boot option, but autodetect video mode might work for you. It's incredibly simple to use, too. |
|
| Back to top |
|
 |
manlydan n00b


Joined: 15 Jun 2007 Posts: 38 Location: Lake Charles, LA
|
Posted: Wed Jul 18, 2007 10:03 pm Post subject: |
|
|
upengan78,
The method I presented is perfectly safe so long as you pay very close attention to the beginning cylinder of the partition before deleting it. When you recreate the partition and use a different cylinder as the starting point then you will get corrupted data.
As I already stated, the reason I use this method is because gparted wouldn't resize my partitions for some reason or another. You should most definitely try gparted before attempting this. I only presented it just in case.
| Quote: | | BTW is gparted or something freely available for windows OS ? |
Download a KNOPPIX iso. It is a Linux LiveCD which will contain all the tools you need, including gparted (if my memory serves me right ) _________________ It's not graphical, it's textical! |
|
| Back to top |
|
 |
upengan78 Guru

Joined: 27 Jun 2007 Posts: 431 Location: IL
|
Posted: Fri Jul 20, 2007 12:57 pm Post subject: |
|
|
| Quote: | | GPARTed Live cd Worked Nicely |
Thanks to those who helped  _________________ ** http://forums.gentoo.org/viewtopic-t-503182-highlight-.html **??
Life is a ride
Linux 2.6.28-gentoo-r3 #2 SMP PREEMPT Fri Mar 13 15:03:13 CDT 2009 x86_64 Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz ATI Radeon X1300/X1550 Series 256 MB, DDR2 |
|
| Back to top |
|
 |
|