Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am currently running Ubuntu and Windows 7 as dual-boot on a single HD. The problem is that when I installed Ubuntu, I didn't allocate as much space as I thought I would need and now I need 'reinstall' Ubuntu so that I can increase the amount of storage space.

Now there are two ways to go about this. Either I use use gparted to increase my partition space (but I read that it's not really that safe as regards data loss) or create the new partition with more space and reinstall Ubuntu there.

But if want to reinstall Ubuntu, is there a way I can somehow "save" my current Ubuntu and install that one? What I mean is that I don't want to lose my current installed packages and files that I have on this partition.

Is there a way to kind of maybe 'streamline' my current Ubuntu so that I install this one on the new partition?

If not, what are your opinions as regards gparted?

PS I installed Ubuntu via Wubi

Update

I have now found the following links that may be of help to me:

share|improve this question

6 Answers 6

It depends on the size of the virtual disk on which you installed Ubuntu and why you are running out of space, but I would favour moving /home to a different (virtual) disk, as mentioned on your link about resizing.

Basically I prefer to have /home separate on any Linux system and I don't see any reason for this to be different.

If it is user data files that are causing you to run out of space, you could move them onto the NTFS partition, see here on the same page about resizing the hard disk; this will free up space for the Ubuntu install and allow access to the files from both operating systems

share|improve this answer

That is one advantage to using LVM, which your probably to late in the game to do, but an option to consider for future deployments.

share|improve this answer
    
Hmm. Do LVM drivers exist for Windows? Don't think so... –  mihi Aug 20 '10 at 16:20

I haven't used it in this manner, but you could possibly use remastersys to make a live installer cd with your exact same set-up, and use that to do a fresh wubi install with all your files still on it.

An alternate that might be worth trying is to get a live cd, make a bigger image, and DD the current image contents to a bigger image, and edit wubi to point to that instead.

share|improve this answer

I've used gparted to resize partitions being actively used by OSes. I haven't had any loss of data that was unintended as a result of this use, I would just advise against resizing partitions by increasing or decreasing how much size they have from the first blocks, but instead from the back to reduce the chance of overrunning data. With that said, I wouldn't advise it if your hard drive is being fully used.

As for "saving" your Ubuntu install, I would advise in the future, if Wubi allows this (and if not this can be done with the traditional Ubuntu installer), creating a separate partition with /home as a mount point to save all of your personal files. I'm not sure about saving the packages you've already installed though.

share|improve this answer

This might be not for a newbie, but if you have some experience with Linux, you can boot from a Live CD, just tar up the whole filesystem (include sparse files, permissions, owner and xattrs, but limit to the root filesystem only) to somewhere else, resize your partition (maybe even choose a different filesystem), and restore the filesystem (do not forget to preserver permissions here again). Then chroot into your new system and re-write the bootloader.

Yes, there is no magic about file locations in Linux at all, except that the bootloader in the MBR or boot sector might point to its stage2 or to the kernel. Other OSes (from Redmond) might not like a similar treatment... :)

If you are sure you did not do anything special (i. e. all your files are in /home), you need only backup your dpkg-get-selections, your /etc and your /home and can rebuild the system from there.

But if you think that gparted is risky (depends on how common power outages are in your area...), that might be too risky for you :)

share|improve this answer

I would recommend the Windows Native tools first for re-partitioning. gParted does a great job. However, there are windows utils that will make data loss less likely. First clear all caches, all restore points (assuming your system is stable) except your last one, and any other detritus lying around on the HDD. use the Shrink feature of windows 7. Reboot, use shrink again to see if you can squeeze out any more of the vacuum.

Now hopefully some got out, and you can use gparted. (Hindsight being 20/20, next time youre setting up partitions, underestimate how much space you'll need and plot the partitions (if there are two) at the beginning and end of the physical drive with space in the middle; you may also consider a swap and storage partition.

  • Maybe I am a bit of a ninny, but with due respect to @indy 's answer, I would not recommend stretching cropping the partitions without appropriate concern that you may lose data, particularly with windows (gparted and ubuntu should be fine).

    at the end of the day, is backing up and chopping it going to work for most people, probably without too much heartache. but bear in mind it may not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.