Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: how to resize ubuntu partition?

  1. #1
    Join Date
    Aug 2010
    Location
    india
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    how to resize ubuntu partition?

    like in the title i would like to know how to resize the linux partitions i.e the home and the root partitions.
    thanks for the replys in advance

  2. #2
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: how to resize ubuntu partition?

    Use either a standalone partition editor such as gparted or use the partition editor in the system admin menu of the buntu livecd.

    You will possibly need to turn of swap if it is in an extended partition with / and /home.

  3. #3
    Join Date
    Jan 2008
    Location
    Coventry, England
    Beans
    484
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: how to resize ubuntu partition?

    It is possible, but a few notes and words of caution:

    1) Ensure that all data which is important to you is properly backed up out of harms way on external media, e.g. CD/DVD discs, external USB key/external HDD. I'm sure you know that resizing a partition can be a dangerous affair and thus I'm sure this warning is redundant, but I somehow feel compelled to say it anyway.

    2) The partition(s) you want to resize must be unmounted before you can do this. You should therefore use an Ubuntu LiveCD to make these changes.

    3) I don't know if this will happen as I've never done it before, but for all I know the UUIDs of /home, /root and other partitions might change. If you refer to these partitions using UUIDs in /etc/fstab or /boot/grub/menu.lst or any other configuration file then these might need to be updated. I say again though I'm not sure if that will happen - just conjecture and something you might want to look out for. I'm sure someone else will be able to clarify this point for me?

  4. #4
    Join Date
    Aug 2010
    Location
    india
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how to resize ubuntu partition?

    what is a UUID??

  5. #5
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: how to resize ubuntu partition?

    Code:
    sudo blkid
    Universally unique identifier.

    fstab uses uuid's

    You can see here -
    Code:
    /dev/sda1: UUID="9E04AD3804AD1475" TYPE="ntfs" 
    /dev/sda5: UUID="66f8bf6a-aaac-471e-894b-cdb498691e64" TYPE="swap" 
    /dev/sda6: UUID="43f9cd41-c238-4798-8435-5d19a839e4db" TYPE="ext4" 
    /dev/sda7: UUID="3549d0ba-dc4d-4ef0-b3ed-417e53a71e1d" TYPE="ext4" 
    /dev/sdb1: UUID="14ee47cc-54cb-4887-8773-fd53121efe10" TYPE="ext4" 
    
    # / was on /dev/sda6 during installation
    UUID=43f9cd41-c238-4798-8435-5d19a839e4db /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda5 during installation
    UUID=66f8bf6a-aaac-471e-894b-cdb498691e64 none            swap    sw              0       0
    
    #Media drive
    
    UUID=14ee47cc-54cb-4887-8773-fd53121efe10 /mnt/sysmedia ext4 defaults 0 2
    
    #Spare Drive
    UUID=3549d0ba-dc4d-4ef0-b3ed-417e53a71e1d /mnt/spare ext4 defaults 0 2
    Check you uuid's with the blkid command and make sure they match fstab - before you reboot.

    You can mount and edit the /'s fstab from within the livecd.

  6. #6
    Join Date
    Mar 2008
    Location
    Deep South Texas
    Beans
    1,890
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to resize ubuntu partition?

    Quote Originally Posted by Lateralis View Post
    It is possible, but a few notes and words of caution:

    1) Ensure that all data which is important to you is properly backed up ...
    I somehow feel compelled to say it anyway.
    I also feel compelled to say it... BACK IT UP!


    2) The partition(s) you want to resize must be unmounted before you can do this.
    You should therefore use an Ubuntu LiveCD to make these changes.
    One problem is that most LiveCD's will search for (and mount) a valid 'swap' partition. You need to check for this.
    There is a 'swapoff' cli command... hopefully other gurus will chime in.

    3) ... the UUIDs of /home, /root and other partitions might change.
    If you refer to these partitions using UUIDs ...these might need to be updated. ...
    I'm sure someone else will be able to clarify this point for me?
    Under PartedMagic (which is what I use for all my partition work) the UUID's indeed change, because the partitions are (technically) changing.

    I solve this problem by storing the original UUID's in a text file and backed up on a USB device so I can access it easily from any OS/LivdCD etc..

    After changing the partitions, change the UUID's back to the original ones.
    No need to update anything else.
    Last edited by egalvan; September 12th, 2010 at 12:23 PM.
    "Free software is a matter of liberty, not price." -- Richard Stallman
    So don't forget to tip your software authors!

    I'm a Fireman... what's YOUR superpower?

  7. #7
    Join Date
    Aug 2010
    Location
    india
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: how to resize ubuntu partition?

    oh ok i think i won't be partitioning anmore there is alot of unsaved data i don't wanna lose

  8. #8
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: how to resize ubuntu partition?

    Here are some tips I wrote for changing the size of an Ubuntu partition:
    Expanding an Ubuntu System Partition

    It was written about a Jaunty bug, so the part you are interested in starts at the "Some basic rules for expanding your / system partition:" section.

    Also, the first link in the "Related Links" at the end is very good at describing partition changes and includes a few graphics.
    Back to Xorg...

    Retired.

  9. #9
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: how to resize ubuntu partition?

    I wrote an article on this topic for IBM developerWorks recently. I see that Part 2 is also now available, although that's for more advanced configurations and troubleshooting.

    I've seen the claim that UUIDs change when resizing partitions once or twice before, but I've never encountered it myself. Here's an example:

    Code:
    $ sudo blkid /dev/sdc1
    /dev/sdc1: UUID="3a50e92c-ae7f-4af0-be8d-fe19a7d5be4e" SEC_TYPE="ext2" TYPE="ext3" 
    $ sudo gparted /dev/sdc
    ======================
    libparted : 2.3
    ======================
    $ sudo blkid /dev/sdc1
    /dev/sdc1: UUID="3a50e92c-ae7f-4af0-be8d-fe19a7d5be4e" SEC_TYPE="ext2" TYPE="ext3"
    I shrank my test partition in GParted, so those two blkid calls were separated by a resize operation. The preceding test was done on a Gentoo system, but I just checked with PartedMagic 4.11, which egalvan claims changes UUIDs, and got the same (null) results. Perhaps there's such a bug in specific versions of GParted that produces changes in UUIDs, or maybe such a bug affects some filesystems but not others (I used ext3 in this test), but if so I don't know what versions or filesystems are affected. If egalvan can verify his claim of changing UUIDs, I suggest that he post details, such as the exact version of PartedMagic and/or GParted/libparted he's using, and what filesystem(s) are affected, so that others can verify the problem and people can avoid the buggy version(s) of the software.
    Last edited by srs5694; September 12th, 2010 at 08:03 PM. Reason: Fixed URL

  10. #10
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: how to resize ubuntu partition?

    I've had UUID's change on me with gparted - though it was some time ago and I have no idea at all what version it was.

    Regardless of that - checking the UUIDs and fstab is a minute job, easily achieved. Much quicker than waiting fro the mount to fail during boot.

    Edit - as an aside here

    Our apologies…

    The page you requested cannot be displayed
    is the result of trying to read http://www.ibm.com/developerworks/li...dex.htmlPart 2 might be worth changing that
    Last edited by Elfy; September 12th, 2010 at 07:35 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •