Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-15-2006, 11:57 AM
|
#1
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Rep:
|
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!
|
|
|
10-15-2006, 12:26 PM
|
#2
|
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:
|
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
|
|
|
10-15-2006, 12:42 PM
|
#3
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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).
|
|
|
10-15-2006, 01:11 PM
|
#4
|
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:
|
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
|
|
|
10-15-2006, 01:17 PM
|
#5
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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.
|
|
|
10-15-2006, 01:24 PM
|
#6
|
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:
|
Using google search engine will point you to the site over at freshmeat.
Brian
|
|
|
10-16-2006, 12:04 PM
|
#7
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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
|
|
|
10-16-2006, 05:32 PM
|
#8
|
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:
|
Show output from the command as root. /sbin/fdisk -l
Brian
|
|
|
10-16-2006, 06:18 PM
|
#9
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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....
|
|
|
10-16-2006, 07:28 PM
|
#10
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,399
|
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.
|
|
|
10-17-2006, 04:20 PM
|
#11
|
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:
|
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
|
|
|
10-17-2006, 05:52 PM
|
#12
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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.
|
|
|
10-19-2006, 09:16 PM
|
#13
|
LQ Newbie
Registered: Apr 2004
Distribution: ubuntu
Posts: 20
Original Poster
Rep:
|
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...
|
|
|
All times are GMT -5. The time now is 12:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|