View previous topic :: View next topic |
Author |
Message |
JDShaffer n00b
Joined: 04 Aug 2003 Posts: 4 Location: Osaka, Japan
|
Posted: Fri Aug 29, 2003 3:53 am Post subject: Help -- Non-destructive resizing of a ext3 filesystem? |
|
|
Does anyone know how to do this? I was hoping Presizer would handle it, but it won't resize, only move...
Help!
Jds |
|
Back to top |
|
|
cleber n00b
Joined: 05 Aug 2003 Posts: 74 Location: São Paulo - Brazil
|
Posted: Fri Aug 29, 2003 4:12 am Post subject: |
|
|
I'm not exactly sure, but you have to take this steps:
Delete your partition in fdisk, and create a bigger one on the same starting point (and then save your new config with "w"). Then resize2fs your ext3 fs to fit your new partition.
But if your new ext3 fs fits in the partition, then you can just use the resize2fs. Umount it, resize and mount!
Remember to backup, and to backup again!
You can find more on this on google _________________ Saru mo ki kara ochiru - Japanese proverb.
Cleber Mori Home Page: http://www.2ks.com.br |
|
Back to top |
|
|
JDShaffer n00b
Joined: 04 Aug 2003 Posts: 4 Location: Osaka, Japan
|
Posted: Fri Aug 29, 2003 6:18 am Post subject: Saving Gentoo after a mishap with lilo and presizer... |
|
|
Well, I almost goofed up bigtime... I decided to try MOVING things around to allow for a resizing of the ext3 filesystem from inside Gentoo, but ended up screwing up Lilo and neither my windows or my linux partition would boot!
So, I used presizer to put everything BACK and Lilo still didn't work.. no booting...
I saved by butt by booting to windows on a rescue floppy, rewriting the fdisk info (by going in and then exiting with a save) then cleaning up the MBR with fdisk /umb
That got windows back.
Then for Linux:
I booted off the LiveCD and then skipped all the partition info (as I already had a good filesystem) mounted all the pre-made partitions as the install doc suggests, then chroot'd into my old filesystem.
From here I simply ran lilo again as I already had a configured lilo.conf file... then rebooted and BOOM! -- back in business.
This means I'm looking for an alternate way to reclaim free disk space.
So, I decided to use that extra space as my /usr directory!
Thus began lots of juggling of resources....
In Gentoo, I turned off my swap, then deleted it. I then used the extra available PARTITION to make a new Boot partition of the same size as the old one, except at the first available block on the HD... then I saved this new fdisk info and rebooted to Gentoo (luckily it runs without a swapfile!)
Then I did this to mount the new boot
mkdir /boot-new
mount /dev/hda3 /boot-new
and made the new boot the same filesystem as the old boot, then copied over all the files with
mount /dev/hda2 /boot
cp -p -R /boot/* /boot-new
then I unmounted everything and edited my /etc/fstab file to point to the new boot partition.
Then I rebooted.
After a reboot, I deleted the OLD boot partition (/dev/hda2 for me) and luckily, well by design) that left one large empty space on my HD (the space I wanted to reclaim plus the deleted boot partition together.)
So I then made a new extended partition of the entire space and then made new logical partitions.... one for my new swap file (same size as the old one) and another for my /usr directory.
Then I formatted my swap partition with mkswap /dev/hda5 (it became 5 after all the extended partition creation) and formatted my new /usr partition the same as my / partition (ext3).
And right now as we speak, I'm copying over the old files to the new partition using the same MOUNT / Copy / UMOUNT process. Then I'll rename the old /usr to test it before deleting it...
If you do the same, be sure to update your /etc/fstab to automount your new /usr directory as well as your swap file!
Best wishes,
Jds -- 3 day Gentoo user... man I'm learning a lot! |
|
Back to top |
|
|
codemonkey n00b
Joined: 25 Jul 2003 Posts: 22 Location: UK
|
Posted: Fri Aug 29, 2003 8:42 am Post subject: W2K Partition hosed! |
|
|
Whilst not a solution to your issue, I have sympathy with you. Whilst installing Gentoo on hdb I did a dd over /dev/hda and hosed my Windows partition tables, (NOT funny at the time!).
Anyway I used partition-recovery to re-write the partition table, but in the process I learnt A HELL of a lot about the boot process, MBR structure, etc, etc, all things I would never have known about if I'd stuck with RH9.
So I'm in the same boat as you, 7 days on and HELL I've learnt more about my machine than in 2 years of W2K usage. What's more IT'S FUN!
My moto now is 'Problems are the best learning process... as long as your hardware is still intact!' |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|