4

I have a clean install of Ubuntu 16.04 on an Acer Aspire VN7-792G that has a 128GB SSD and a 1TB HDD. The laptop was preinstalled with Windows 10, which I removed using the diskpart utility and clean (for the SSD) or clean all (for the HDD) commands.

The HDD can be found from the terminal with the fdisk -l command, but is not shown on the Launcher or in the "computer" window.

I'm guessing that the first stage to correcting this is to assign the HDD (disk /dev/sdb) a UUID, as it does not currently appear to have one.

fdisk -l and blkid results:

results of fdisk-l and blkid
(Click image to enlarge)

2

2 Answers 2

3

Linux systems don't mount hard drives, they mount filesystems that live inside partitions or logical volumes on those drives.

In the case of ext2/ext3/ext4 filesystems, you can change the UUID using the tune2fs command. From man tune2fs:

-U UUID
       Set the universally unique identifier (UUID) of  the  filesystem
       to UUID.  The format of the UUID is a series of hex digits sepa‐
       rated          by          hyphens,          like          this:
       "c1b9d5a2-f162-11cf-9ece-0020afc76f16".   The UUID parameter may
       also be one of the following:

             clear  clear the filesystem UUID

             random generate a new randomly-generated UUID

             time   generate a new time-based UUID

       The UUID may be used by  mount(8),  fsck(8),  and  /etc/fstab(5)
       (and possibly others) by specifying UUID=uuid instead of a block
       special device name like /dev/hda1.

There may be equivalent commands for other filesystems.

However, based on your fdisk output, it looks like /dev/sdb is a bare unformatted disk that simply has no recognizable partition(s) or filesystem(s) defined on it.

-1

UUID can't be assigned manually, as far as I know. It's generated algorithmically during a format, to ensure it's globally unique, and being able to change it to an arbitrary value would allow duplications.

Editing /etc/fstab can tell the OS to automatically mount a drive during startup. This preferably uses UUID to identify the drive. The existing UUID can be found with blkid or by looking in a partition editor (gparted or equivalent).

If the HDD doesn't show in blkid or in a partition manager, check that the data and power cables are connected to the drive, and motherboard as appropriate.

6
  • The last section is not true, blkid will work on unmounted partitions.
    – Arronical
    Jul 27, 2016 at 11:29
  • ext2/3/4 filesystem UUIDs can be modified using the tune2fs command (this is handy for de-duplication e.g. if you've cloned a partition and need to mount both clones on the same system) Jul 27, 2016 at 11:49
  • @steeldriver That should be its own answer. I wasn't aware of that command (I'm mostly a GUI user), and it does exactly what the questioner was asking, presuming his HDD has the right filesystem.
    – Zeiss Ikon
    Jul 27, 2016 at 11:51
  • @ZeissIkon OK let's see... I have a feeling this is going to turn out to be an XY problem Jul 27, 2016 at 11:54
  • Thanks, the 1Tb drive is now shown on the launcher and as a locked folder in my home folder. Jul 29, 2016 at 11:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .