LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-15-2006, 11:57 AM   #1
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Rep: Reputation: 0
Resizing Partitions


I installed Ubuntu over the summer, and orginally gave it 20 gigs.
Well, I have been using practically nonstop since then, and I would like to give it 50.
My partitions was:
(1) ~50mb - this is a diagnostics partition
(2) Was 80gb, is now ~50gb for Windows (i reinstalled windows yesterday, then installed grub...)
(*) I have 23.30gb of un allocated space
(3) ~18.5gb for ubuntu
(4) EXTENED
(a) 1.37 GB Linux Swap.


What I would like to do is make the 3rd partition combine itself with the freespace. I Know how to resize in Gparted, but it seems as though it only allows for expanding the partition to the right.
I was wondering if there was any way to do this....

THANKS!
 
Old 10-15-2006, 12:26 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
EDIT: Forget this at the moment.
Depending on the format of the partition then it may only support expansion to the right. So what I would do is create a partition out of the free space and format it to filesystem that is the same as the one that you use now. Now reboot with a Ghost for Linux Live CD and mirror the partition 3 to the new partition. Now on reboot and may need to modify /etc/fstab to point to the right device block.

EDIT:
I took a second look. You cannot create a partition out of the free space due to the maximum limit of 4 primary partitions. At your current setup you have 3 primary and 1 exteneded which must use a primary refernce itself so you can not create a fourth partition before the extended partition.

How was using the parted tool. From the running distro itself or from a Live CD. You cannot modify a mounted partition.

What you may have to do is borrow an external usb drive and copy the partition to it so you can modify partitions on the drive itself. Or install a second harddrive in the machine itself to modify and move partitions around. Not the nicest way but one buy one from staples or other electronics store. Use it and then remove the data and resturn to the store for credit. Not nice but if on a budget it can work.

EDIT:

Brian
 
Old 10-15-2006, 12:42 PM   #3
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
i do have external drives... so that is definatly an option.

now, how would mirror the ubuntu partition onto an external drive? i would really love to have the system in the exact same working manner it is now.

yeah, i noticed that i ran into the problem of having to many partitions. another option would be for me to delete the windows partition...

however, if u think the usb drive is easy, i will do that. (saves me time on having to reinstall windows with all the updates and the software i need for class).
 
Old 10-15-2006, 01:11 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Should be no issue then.
1. Use Ghost for Linux Live CD and have it copy the partition from your /dev/hda3 over to /dev/sda*.
2. I would then boot up as normal and verify the data on the USB drive matches the orginal data. Mostly check down a few directories and verify permissions.
3. Once done reboot with http://freshmeat.net/projects/systemrescuecd/ and use gparted to remove the hda3 partition and now create a new partition starting at the free space.
4. Reboot with Ghost for Linux and restore partition data image to /dev/hda3
5. Reboot as normal. Since no drive blocks really change no fstab or grub/lilo modifications should be required.

Key to all this is make sure you know all data is safe during each step.

Brian
 
Old 10-15-2006, 01:17 PM   #5
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
where do i get Ghost for Linux Live CD?
I've never used/heard of it before.

Does it come from freshmeat?

Also, I've never burned an ISO in linux before... what program should i use?

Last edited by Outerlimit; 10-15-2006 at 01:18 PM.
 
Old 10-15-2006, 01:24 PM   #6
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Using google search engine will point you to the site over at freshmeat.

Brian
 
Old 10-16-2006, 12:04 PM   #7
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
alright, worked like magic...

however, now it says i only have about 1.9 gigs free...
its like it is not seeing the new free space...

i tried running fsck and tune2fs from a live cd... however it tells me the filesystem already has a journal.

any suggestions?

thanks for all your help
 
Old 10-16-2006, 05:32 PM   #8
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Show output from the command as root. /sbin/fdisk -l

Brian
 
Old 10-16-2006, 06:18 PM   #9
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
output from /sbin/fdisk -l
outerlimit@outer-linux:~$ sudo /sbin/fdisk -l
Password:

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 6508 52227315 7 HPFS/NTFS
/dev/sda3 6509 11982 43969905 83 Linux
/dev/sda4 11983 12161 1437817+ 5 Extended
/dev/sda5 11983 12161 1437786 82 Linux swap / Solaris

------------------------------------------------------------------------------------
output from df -h:
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G 17G 1.4G 93% /
varrun 506M 144K 506M 1% /var/run
varlock 506M 4.0K 506M 1% /var/lock
udev 506M 180K 506M 1% /dev
devshm 506M 0 506M 0% /dev/shm
lrm 506M 19M 488M 4% /lib/modules/2.6.15-27-386/volatile
/dev/sdb2 9.7G 6.5G 2.7G 71% /media/usbdisk-1

---------------------------

i find it weird that it still says it only has 19gb available for sda3....
 
Old 10-16-2006, 07:28 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,974

Rep: Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633Reputation: 3633
This is why I never use "imaging" tools - you resized the partition, but not the filesystem.
I personally prefer to "cp -a ..." into a newly made filesystem (of the correct size).

There are options to resize ext2/3, but I've never been satisfied with the results. You may have better luck.
 
Old 10-17-2006, 04:20 PM   #11
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
That is odd. /dev/sda3 should be about 37gig roughly minus the journaling bit if formatted as ext3 based on this part /dev/sda3 6509 11982.
Roughly a 5 to 10% addtional lose of space for ext3 over ext2. Not the nearly 18gig like df -h is showing.
Never run into this before.

tune2fs converts ext2 to ext3 and vice-a-versa plus set other parameters like number of mounts before a force check of the filesystem.

Still odd. I give it some thought when time spares. Might provide the detail steps you did.

Brian
 
Old 10-17-2006, 05:52 PM   #12
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
1) formatted an 80gig harddrive with ext3 file system
2) backed-up using ghost 4 linux in RAW Mode and Click-N-Clone.
3) realized that that probablly wouldn't work since documentation said you can backup smaller to larger, and restore smaller to larger.
4) deleted the 80gig partition, made one that was about 25gigs
5) backed-up using ghost 4 linux in Raw Mode with Click-N-Clone.
6) Booted into Linux to check some directories... make sure everything worked.
7) Booted to System Rescue CD and deleted /dev/sda3 partition, and recreated it taking up full free space
8) Booted into ghost 4 linux and restored parition using Raw mode and Click-N-Clone.
9) Booted into ubuntu and everything was here....

Last edited by Outerlimit; 10-17-2006 at 05:57 PM.
 
Old 10-19-2006, 09:16 PM   #13
Outerlimit
LQ Newbie
 
Registered: Apr 2004
Distribution: ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
how do i conver to ext2 and back to ext3? i did a tune2fs -o^something_about_journal, then tune2fs -j... that didn't fix the problem...
 
Old 10-23-2006, 08:09 AM   #14
-=Graz=-
Member
 
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358

Rep: Reputation: 31
There is a some info on reverting back to ext2 here: http://www.troubleshooters.com/linux/ext2toext3.htm

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Resizing Partitions dokunut Linux - Newbie 2 06-18-2005 08:56 PM
Resizing HD partitions clueless_one Debian 5 11-27-2004 07:32 AM
Resizing partitions jaakkop Fedora 2 09-30-2004 08:33 AM
resizing partitions jayakrishnan Linux - General 5 05-06-2002 01:32 AM
resizing partitions suselinux Linux - General 7 09-07-2001 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:15 AM.

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