I apologize ahead of time for how confusing this may be. I am very new to things such as partitions, disks, and hard drives.

When I installed Ubuntu there were two options, install on a 24 GB HD and install on a 750 GB HD, the first time I installed I used the 750 GB HD, but had boot issues. I'm now using the 24 GB HD but I want to save files to the 750 GB HD. Is there a way I can merge the two, or at least merge some of the 750 GB HD to the 24 GB HD?

I've tried using GParted to merge but can't seem to combine the drives. I want the OS to remain on the 24 GB HD but I want my files on the 750 GB HD. I could just try to re-route everything to go to the 750 GB Volume and leave it at that, but is there an easier way.

  Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root   16G  3.9G   11G  27% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         2.9G   12K  2.9G   1% /dev
tmpfs                        585M  1.2M  584M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         2.9G   80K  2.9G   1% /run/shm
none                         100M   36K  100M   1% /run/user
/dev/sda2                    237M   88M  137M  39% /boot
/dev/sda1                    511M  3.4M  508M   1% /boot/efi
/dev/sdb2                    693G  192K  693G   1% /media/blah/534E-B317
  • Please edit your question and include the output of df -h. I would also suggest you remove the history, just explain what you need to do now rather than what you've done in the past. Also, please explain why you need to "merge". I suspect all you want is to be able to save your files on the 750 HD. There's no reason to "merge" the two, you can use both of them. – terdon Sep 8 '14 at 23:43
  • Done and done? And yes, that's exactly what I want to do! I want my Home folder and everything else on the 750 GB drive. – pharaohmoans Sep 8 '14 at 23:56
  • In the setup options, there should've an option called "Something Else." That would've allowed you to more deeply configure the settings, so that you can have directories like /boot and / on your smaller hard disk, but other directories like /usr and /home on the larger one. It's a slightly complicated process involving drive flags. I don't recommend that for you now, however, as you're new to drive partitioning. – Drew Stewart Sep 9 '14 at 0:02
  • Wouldn't the best way to do this be to use fdisk to wipe the partition table for the 750GB drive, rewrite the drive as one large LVM partition, format the thing, copy all data from /home to /tmp/home, mount /dev/sdb1 to /home, then copy everything from /tmp/home to home? – Rick Chatham Sep 9 '14 at 0:38
  • Let me make sure I understood that. Use fdisk to wipe the tables, rewrite the partition, format it again, and then reroute my folders to... the wiped and formatted drive? – pharaohmoans Sep 9 '14 at 0:52

First a little background. You seem to have two physical hard drives in your computer, sda and sdb. These are each split into separate partitions. Based on your df output, sda is the 24GB HD and sdb the 750. The sdb2 partition is mounted at /media/blah/534E-B317. Since this is not a standard mount point, I am assuming you have set it up yourself and that it will always be the same, every time you boot. The rest of this answer depends on that.

So, you have a 693G partition which is available at /media/blah/534E-B317. All you need to do is copy your files there. Ideally, this should be the default location of any new files you may create as well.

The easiest solution is to make your $HOME folder (which, by default, is /home/yourusername) a link to a directory on sdb:

  1. Create the new directory on sdb (in this and all subsequent steps, replace "pharaohmoans" with your actual user name):

    sudo mkdir /media/blah/534E-B317/pharaohmoans
  2. Make it belong to your user

    sudo chown pharaohmoans /media/blah/534E-B317/pharaohmoans
  3. Copy your files over

    cp -rpv $HOME/* /media/blah/534E-B317/pharaohmoans
  4. Rename your old $HOME directory. Once you're sure everything is working fine, you can delete it.

    sudo mv $HOME /home/pharaomoans_backup
  5. Create a symlink pointing to the new directory with the same name as your original $HOME

    sudo ln -s /media/blah/534E-B317/pharaohmoans /home/pharaomoans

Now just log out and log back in again (or restart) and you should be using the new $HOME directory. Any files you create will now be placed here unless you explicitly choose to place them elsewhere. Note that this does not apply to any applications you install. To make those install in the other partition as well, you will need to repeat the above steps for the directory /usr/.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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