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.

This is how my partitions look like in Ubuntu. I would like to merge two partitions /dev/sda8 and /dev/sda/7 because I am unable to use both of them.

/dev/sda8       111G  2.7G  103G   3% /
udev            1.9G   12K  1.9G   1% /dev
tmpfs           763M  864K  762M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  252K  1.9G   1% /run/shm
none            100M   72K  100M   1% /run/user
/dev/sda7       117G   52M  111G   1% /home

Please let me know if there is any way to do it. And all the partitions looks ugly..I would like to have only one partition which would be my home folder.

share|improve this question

3 Answers 3

While it is a good practice since forever to keep user homes on a separate partition, lately this single filesystem has become a trend I see. probably because of big disks.

Anyway, you can "merge" the partitions. First you need to get rid of /home mount. means you need to log-off all non-root sessions and open a root one. then create a /home.tmp or something and # cp -a /home content into it. then # umount /home. if its says the fs is busy, check # lsof -n | grep home and kill any process still using it. now swap the home.tmp and home. I have no idea if ubuntu still uses /etc/fstab, but I assume it does. remove the /home mount from there. now you can re-login or even reboot and use gui tools to try and

oh my... why is / partition AFTER the /home ??????? What did the installer's author smoke to allow it?

sorry dude, scratch the above. you cant "grow" partitions backwards. you need to move things. The only way to do that is with an unmounted / fs. means you need a livecd or something. to boot and manipulate the partition table off-line.

Feel adventurous? While it is doable, most probably you will end-up reinstalling that precious ubuntu. Chances are you still have little if none customizations on it so you can just start it all over choosing the partitioning scheme suits you best.

share|improve this answer

Ugly partitions? Well, sometimes when you look under the hood, it isn't very neat, but that's Linux for you.

You are using both / and /home, trust me.

Having a separate /home partition is useful, for it makes backup very quick. If you decide later on to change OS, all you have to take with you is the /home partition.

share|improve this answer

I believe there may be a misunderstanding about the meaning of the Linux partitions.

The partitions /dev and /run are temporary file systems.. According to this Web page (which is clearer than Wikipedia, IMHO),

A temporary file system uses memory to simulate a traditional disk partition. Normal file system writes are scheduled to be written to disk along with access control information, but the files actually reside in memory only. A good candidate for a tmpfs is a partition that will have many small files that will be accessed often, e.g. /tmp. This will considerably speed up their access time. Tmpfs files and directories are NOT saved when the system shuts down.

The only two real partitions you have are /dev/sda8 and /dev/sda7. The fact that you have two partitions is indeed quite positive for you: for instance, you can install a new version of Ubuntu on /dev/sda8, without any fear of losing your data on /dev/sda7.

However, there are two issues with your partitions (and, BTW, where is your swap partition?). The first one is that you are hosting your system on logical partitions, while it is preferable,though by no means necessary, to do so on primary partitions. The Linux Foundation recommends doing this, because data recovery in case of hardware failure is so much easier. The second issue is that the two partitions are incorrectly proportioned, the one hosting your system, /dev/sda8 being much larger than necessary. Out of a total of 214 GB, 30 GB for the system are plenty, the rest might very well be left to your /home filesystem.

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.