Score:0

Can't get the memory of a second hard disk to show up in my Ubuntu system

cn flag

I wiped Win 10 off a new computer and installed Ubuntu 20.04 via USB drive on a new computer. The computer has 2 drives, a 256 GB one (on which I installed Ubuntu) and a 1 TB one.

So my "Home" in Ubuntu (20.04) shows a total of 256 GB. At first, I couldn't see the 1 TB drive in "system monitor", because it was in NTFS format, so I reformatted it to type Ext4, like my 256 GB drive. I did this using the "Disks" application and then pressed the play button, making the drive appear in system monitor > file systems, so I thought this had solved the issue.

But I still can't see the extra 1 TB of memory in "Home" properties. I can't access the extra 1 TB of memory for my Ubuntu system.

When I restart my computer, the 1 TB drive ("partition") unmounts and I have to press the play button in "Disks" again to mount it.

Does anyone have any suggestions how to get access to my 1 TB drive?

My 256 GB drive is type: ext4, partition type: EFI system, contents: FAT (32-bit)

My 1 TB drive is type: ext4, partition type: Linux, contents: Ext4 (Version 1.0)

Many thanks for any help

cc flag
From "Disks", click on the 1TB partition. What does the "Contents" line say about where it is mounted? It should be /home/<yourusername> for a mountable home partition.
nicholasflamel avatar
cn flag
hi ubfan1, it's mounted at media/user/drive. the disk I can use is mounted at boot/efi
Score:3
cn flag
raj

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):

  1. mount the 1 TB partition temporarily (as you have done already)
  2. copy everything from your already existing /home folder to the place where you mounted the 1 TB partition - preserving directory structure, permissions etc.
  3. delete everything from your /home folder so that it is completely empty
  4. edit the /etc/fstab file to indicate that your new 1 TB partition is to be mounted under /home
  5. 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:

  1. Boot from the live session.
  2. Both your 256 GB and 1 TB partitions will be unmounted now, so you have to mount them temporarily from "Disks" application.
  3. After mounting the partitions, note the information the "Disks" application displays for each partition: device name (like /dev/sdb1), UUID (like c64ac209-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.
  4. 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!
  5. 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
  6. Verify the contents of your 1 TB partition is correct.
  7. 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/*
  8. Edit the /etc/fstab file using the command: sudo gedit /media/ubuntu/UUID-of-256GB-partition/etc/fstab
  9. 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.
  10. Add below it a similar line that says: UUID=UUID-of-1TB-partition /home ext4 defaults 0 2
  11. Save the file and quit the editor.
  12. Unmount your both partitions and reboot the system.
nicholasflamel avatar
cn flag
Thank you raj for your reply, one thing I don't know how to do here is how to edit my etc/fstab file, but I can see it. It looks like this: # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during installation UUID=fac97912-2e3f-4420-93a1-328a710 / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda1 during installation UUID=6EED-A4E9 /boot/efi vfat umask=0077 0 1 /swapfile none swap sw 0 0 Do you know where/how I can edit this file?
raj avatar
cn flag
raj
@nicholasflamel I mentioned above the command to edit your file: `sudo gedit /media/ubuntu/UUID-of-256GB-partition/etc/fstab` (after booting from live session and mounting both partitions). Below the line with `UUID=fac97912-2e3f-4420-93a1-328a710` add the new line referring to UUID of your 1 TB partition: `UUID=UUID-of-1TB-partition /home ext4 defaults 0 2`
nicholasflamel avatar
cn flag
Hi there raj, thanks again for all the help. Unfortunately now it seems like my computer has crashed and can't switch on. I'm not really sure which of the commands did this, especially since it didn't seem like I ran any of them correctly. I could not find the proper file locations to transfer my data to the 1 TB drive, but I did run this: "sudo gedit /media/ubuntu/UUID-of-256GB-partition/etc/fstab" and there was no file there, it simply said it has 0 bytes of space. I left the computer for a while and tried to log in but it crashed. I've tried switching it on and off numerous times won't boot
raj avatar
cn flag
raj
@nicholasflamel You had to use **actual mount paths** that the "Disks" application did show you everywhere in place of `/media/ubuntu/UUID-of-256GB-partition` and `/media/ubuntu/UUID-of-1TB-partition`. I have no way to know in advance what your actual mount paths will be, so you have to determine this yourself. If you used wrong paths, you could very well break your system.
nicholasflamel avatar
cn flag
Hi Raj, I am repairing my system by reinstalling Ubuntu. I would like to implement this solution: " 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. "
nicholasflamel avatar
cn flag
I'm erasing and reinstalling Ubuntu with the 1 TB drive as the disk Ubuntu is on s well as the boot loader.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.