Ahh! Resizing ext3

Heath Henderson hendersonh at unit5.org
Tue Jan 18 20:23:10 MST 2005


Not sure if this will work on the YDL distro, but it should.  I just did
a fedora Laptop today the following.

I had a new HD (larger than the original).  I have a PCMCIA laptop Hard
drive (external) adapter.  Really nice by the way.  Anyway, hook up to
laptop.  
Boot to rescue CD.  At prompt "linux rescue"

Boot into it.  Do not mount local filesystem and choose to not start
network. at the prompt
bash:# dd if=/dev/hda of=/dev/hdb
Makes and exact dup of the original drive.

Once complete (on my old 300mhz laptop it took a while)
place the new HD in as primary.  REMOVE THE OLD Primary drive.  This is
your backup of your data (in case something happens with the new drive).

Boot to the rescue CD again.  choose not to start network and also
choose not to mount or detect filesystem.

once at a prompt. Blow away the partition you want.
In my case this was my setup
Partition 1 = /boot = 100MB
Partition 2 = swap  = 512MB
Partition 3 = /        = 4000MB
Partition 4 = (Currently unused space = 15GB)

Using fdisk -l I listed all the partitions and the start and end points
for each.  
run fdisk /dev/hda (or your device here)
At which point, I deleted partition 3 (choose m if you need help)
I resize it by creating a new partition with the same starting point as
my original partition 3.  I chose to end it with the maximum space
available (which brought me out to the extra 15gb).  
Once done, I saved the partition changes (wrote them back to the
partition table).
quit fdisk. At a prompt
type fsck -f /dev/hda3
fsck -f dev/hda1
resize2fs /dev/hda3
rebooted and all was well with the world.  Give it a shot.  As long as
you have space and can check your start and end points you should be
fine.  If you are trying to reduce in size, good luck.  You might have
some trouble there.  I would suggest getting a larger HD then you have
some room to place at the end of the partition once you DD it.

 

Heath Henderson
Assistant Technology Administrator
McLean County Unit 5 Schools
Normal, IL 61761   

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPB5LcYGGX69LnzBZEQJVdwCeIfH/DOpwbOdiut29KG0AwEhzaDYAoM1q
Q2CIQ2P2RQOnaUcu3m/jXITE
=BWZp
-----END PGP SIGNATURE-----

>>> the.only.monkey at gmail.com 01/18/05 8:09 PM >>>
I'm having a terrible time resizing my ext3 filesystem so that I have 
room to test out a few other distros, and maybe install Mac OS X. I 
tried the parted bootdisks, I tried a Gentoo LiveCD, I tried 
*everything!* No matter what, I kept getting an error about a strange 
partition map, or something. If anybody has figured out a way to resize 
their filesystem on their PPC, please let me know.

-- Monker

_______________________________________________
yellowdog-general mailing list
yellowdog-general at lists.terrasoftsolutions.com
http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
HINT: to Google archives, try  '<keywords> site:terrasoftsolutions.com'



More information about the yellowdog-general mailing list