Can't get the memory of a second hard disk to show up in my Ubuntu system
Your /home
folder is located on the 256 GB partition, so it's obvious that you can't see the 1 TB partition in your /home
folder. This 1 TB partition is initially mounted nowhere. You have mounted it at a temporary location using the "Disks" application. The application should show you the path where the partition has been mounted - it will be probably something like /media/username/UUID
where username is your username and UUID is the UUID of the partition, which the application will also show you a few lines above.
You can access your 1 TB partition using this path until you reboot the system or logout. As you have already noted, this is a temporary mount and you have to repeat it after every reboot (however the fact that the mount disappears does not mean the data on the partition disappears - it stays there even if the partition is not mounted).
I guess that what you would like the best is to have that partition persistently mounted under your /home
folder. The best moment to do this was while you were installing your system. Using the manual partitioning option, you could have tell the installer to have the 256 GB partition mounted at /
and the 1 TB partition mounted at /home
. However, you didn't do it. So you can either reinstall (if you don't have anything important on the disk yet), or - if you want to do it without reinstalling - the following steps are needed (this is just an overview):
- mount the 1 TB partition temporarily (as you have done already)
- copy everything from your already existing
/home
folder to the place where you mounted the 1 TB partition - preserving directory structure, permissions etc. - delete everything from your
/home
folder so that it is completely empty - edit the
/etc/fstab
file to indicate that your new 1 TB partition is to be mounted under/home
- reboot the system
The issue is, step 3) may be hard to do if you are logged in from the already installed system. In other distributions than Ubuntu, where it is possible to log in directly as root, the procedure is usually performed when being logged in to the root account. As in Ubuntu direct login to root is not possible, it is recommended to do it from the live session after booting from the installation media. So the detailed procedure will be a bit different:
- Boot from the live session.
- Both your 256 GB and 1 TB partitions will be unmounted now, so you have to mount them temporarily from "Disks" application.
- After mounting the partitions, note the information the "Disks" application displays for each partition: device name (like
/dev/sdb1
), UUID (likec64ac209-ee16-4af3-91a4-8faa3d46c844
) and the path where it has been mounted. In case of live session, the username will be usually "ubuntu", so the path will start with/media/ubuntu
. - Now you have two paths where you can access your both partitions:
/media/ubuntu/UUID-of-256GB-partition
and/media/ubuntu/UUID-of-1TB-partition
. Do not mix them up in the following commands! - Use the following command to copy
/home
from your 256 GB partition to 1 TB partition:sudo cp -rp /media/ubuntu/UUID-of-256GB-partition/home/* /media/ubuntu/UUID-of-1TB-partition
- Verify the contents of your 1 TB partition is correct.
- Use the following command to delete contents of old
/home
from your 256 GB partition (but keeping the folder itself, as it will be needed as mount point):sudo rm -r /media/ubuntu/UUID-of-256GB-partition/home/*
- Edit the
/etc/fstab
file using the command:sudo gedit /media/ubuntu/UUID-of-256GB-partition/etc/fstab
- The file will contain a line like:
UUID=UUID-of-256GB-partition / ext4 errors=remount-ro 0 1
. This is the line that auto-mounts your 256 GB partition on boot. - Add below it a similar line that says:
UUID=UUID-of-1TB-partition /home ext4 defaults 0 2
- Save the file and quit the editor.
- Unmount your both partitions and reboot the system.