LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2007, 09:18 PM   #1
Fice
Member
 
Registered: Feb 2005
Location: Monterrey, Mexico
Distribution: Sabayon
Posts: 75

Rep: Reputation: 15
Resizing ext3 from live cd


Hi
I have Kubuntu Feisty Herd 5 Installed. I decided to test windows vista for a while so I used a bunch of free space I had on the drive. Now Im done testing it so I deleted the windows partition, and was planning to resize my ext3 to occupy all the space. So I grabbed the ubuntu live cd which conveniently comes with gparted.

Problem is even with a bunch of unallocated free space(about 46GB) just beside my ext3 partition gparted will not let me make the partition bigger, it will only let me shrink it. As of now I only have two partitions, the swap partition which is in the end of the hard drive, the ext3 partition which is in the middle and all of the unallocated free space which is at the start to the left of my ext3 partition. So the ext3 partition boundaries with the unallocated free space and the swap partition.

I have the partition unmounted, Im running gparted from a live cd. It will let me do pretty much anything with the unallocated free space except add it to the ext3 partition. I cant move the ext3 partition either, tried that as well.

So I thought I must be doing something wrong. I started looking and now Ive seen several howto's (some even from the gparted sourceforge website) and they dont seem to show up with this problem nor do they mention anything else to do before trying to resize.

I read from another forum that you cant resize a partition if the unallocated free space is on the left side of it but i have no idea why and the how to's on the gparted website do have an example of an ext3 being resized to the left side.

I read somewhere else that you should disable journaling whenever shrinking an ext3 partition but dont know if this applies to increasing its size. If so how do I disable journaling on it?

My only other solution is to copy paste my partition to the start of the drive and then expand it to the right(which I tried before by deleting the swap partition and it works fine) but then I will definetly need to backup and Im feeling lazy and looking for a faster way out.

Any other ideas?
 
Old 04-14-2007, 09:40 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
I doubt whether it is possible at all to add unallocated space to the start of a partition. As you suggested yourself, What you could try is moving your ext3 partition to the beginning of the disk so that the unallocated space ends up at the end. Once you get there, you shouldn't have any trouble growing the ext3 partition to take up the additional space.

If you are really lazy, however, you may find it more convenient to keep the first partition, format it to ext3 (or whatever) and mount it under your system as an extra data partition. Little work and no space wasted.

Last edited by jay73; 04-14-2007 at 09:43 PM.
 
Old 04-14-2007, 09:47 PM   #3
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
You can resize (increase or decrease) an ext2/3 partition from the end of the partition only, the beginning of the partition has to remain fixed. And yes it is a good idea to disable journaling before changing the size.

Since your booting from a live CD the ext3 partition should be disabled unless it is mounted which it should not be. In any case it is a good idea to mount the 'new' partition as ext2 the first time and use e2fsck to reset the ext3 journaling.
 
Old 04-14-2007, 10:20 PM   #4
Fice
Member
 
Registered: Feb 2005
Location: Monterrey, Mexico
Distribution: Sabayon
Posts: 75

Original Poster
Rep: Reputation: 15
Well yes simply formating the unallocated space to ext3 and mounting it is another solution but having two partitions usually ends up helping me to loose organization of my data as my home directory tends to fill up and leave that partition without any space while all of the programs usually link to your home directory. I had that setup done but when I realized that I decided to try and resize it. Ill try to copy paste my partition from one side to the other(luckily I decided to divide my disk in two so there is enough free space to do that) and then resize. Ill just leave my computer backing up all night long.

thanks for the posts.

I do have another question, how come you cant resize to the left side of a partition while a how to on gparteds sourceforge website clearly demonstrates you can?
 
Old 04-15-2007, 12:47 AM   #5
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Quote:
how come you cant resize to the left side of a partition while a how to on gparteds sourceforge website clearly demonstrates you can?
Your boot loader in the MBR looks at the partition table to find where the first sector of the root/boot partition is in the partition table (contained within the MBR), to pass instructions to load the kernel. You can move the start of a / or /boot partition if your boot manager/partition tool makes the appropriate changes to the partition table in the MBR so the boot loader can find the /boot sector.
So.......it boils down to..., which technology/boot loader/partitioning tool are you using?
My boot manager, "bootitng" has no problem handling this issue with the PBR (Partition boot record) changing location, other boot loaders may not have the ability to adapt, which one are you using?.

Last edited by Junior Hacker; 04-15-2007 at 12:48 AM.
 
Old 04-15-2007, 02:18 AM   #6
Fice
Member
 
Registered: Feb 2005
Location: Monterrey, Mexico
Distribution: Sabayon
Posts: 75

Original Poster
Rep: Reputation: 15
Im using gparted. Thanks for pointing that out, I hadnt thought of that, Ill do some research to see if gparted updates the MBR before fooling around with my drive. I would use bootitng but Its not free so Ill try with gparted first other wise I might just end up buying it, since I did find some good reviews of it.
 
Old 04-15-2007, 02:49 AM   #7
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
In another thread, someone had issues with grub and lilo trying to tripple boot, this is the error message trying to boot Windows with grub: "Missing /system32/ntoskrnl.exe". I went to the knowledge base at teraByte unlimited (bootitng) and dug up a fix using bootitng for free. Just one of a thousand useful features included with bootitng. You can still use it past the 30 day trial period till death without paying for it if you can put up with the warnings. When I compare the $35.00 US for a 2 computer license to the "time consuming headaches" most people have with traditional partitioning schemes and associated boot loaders, I can only congratulate myself for making one more wise investment.

There are allot of people in this world that snort or smoke more than that in a day, it's "chump change" for stress free computing/multi-booting.

Last edited by Junior Hacker; 04-15-2007 at 02:56 AM.
 
Old 04-15-2007, 06:07 PM   #8
Fice
Member
 
Registered: Feb 2005
Location: Monterrey, Mexico
Distribution: Sabayon
Posts: 75

Original Poster
Rep: Reputation: 15
I agree. Your right it doesnt cost much at all and truth is even though parted has goten somewhat far it hasnt gotten far enough to rely on it. I used to use partition magick with a license of a friend of mine but dont use windows anymore so cant use that either will definetly consider buying bootitng.

So as I supposed so gparted doesnt fix your mbr nor your grub menu(curiously enough it does help you specify a flag for your boot partition which aparently grub overrides anyways). So after i coppied my partition from the right side to the left side then deleted the older partition and then grew it to the right side my system was rendered useless as soon as I rebooted. Truthfully I expected this since I didnt really give too much to gparted so I had a handy Super Grub Disk in hand just in case.

I booted with the Super Grub Disk but for some strange reason it wouldnt let me install grub on the MBR(for some strange reason it rebooted without doing much whenever I tried the setup command) but it did let me boot my linux partition. So I booted my linux partition edited my grub menu in /boot/grub/menu.lst to make sure it can boot to the appropriate partition then I opened the grub comand line by typing
sudo grub
Once in the command line I specified the root partition:
root (hd0,0)
then setup grub:
setup (hd0)
no errors where reported
rebooted and everything works as before except I have a 90GB partition instead of a 43GB.

I still dont understand why gparted didnt let me resize to the left side.

Anyways thanks for all your replies.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Online ext3 FS Resizing? eglow Linux - Software 2 11-04-2006 10:55 AM
Resizing ext3 partitions! alur3n Linux - General 3 10-03-2005 07:29 PM
ext3 resizing Josh328 Linux - General 5 07-31-2005 02:19 AM
Resizing a running Ext3 partition Dee-ehn Linux - Software 11 01-24-2005 05:38 PM
Resizing a partition (ext3) herc Linux - Hardware 1 12-26-2003 04:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration