Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The problem is with the 8 TB HDD. In theory I would only turn it on to make a daily backup. It did work initially, as planned, but I had trouble getting the computer boot/reboot, so I started messing with my /etc/fstab file.
It works BUT I no longer have access to my 8 TB HDD.
The SSD device is
/dev/nve0n1p1 (UEFI)
, /dev/nve0n1p2 (main)
, and /dev/nve0n1p3 (swap)
The HDD are /dev/sda1 (My Real Home Directory and Music)
, /dev/sdb1 (Movies and Old {Rectum} TV Shows (don't ask))
, and /dev/sdc1 (Backup).
/dev/sdc1 has no UUID, my drives are currently about 25% - 30% full.
How do I get me a UUID for /dev/sdc1, and how EXACTLY set up that line in the /etc/fstab for the {bad word} to work.
the problem line in my current /etc/fstab file is:
You do not need the UUID to mount a device. But let's say your 8TB drive is referenced as /dev/sdc1 in fstab. Then, let's say you add another drive, and Linux maps sdc to the new drive instead of your 8TB drive. So now your drives are mixed up. But if you instead mount the drive by UUID, your mounts will be stable.
lsblk -f and look in /dev/disk/by-uuid are alternatives to blkid.
Also look at the output of dmesg command after you plug in the drive to see if it is recognized correctly. I have not seen a USB drive associated with /dev/usb1 before.
After a search I found that blkid is part of the util-linux package. I do not know if it is installed by default (if you are using Debian from your info). This is the link: https://packages.debian.org/bullseye/util-linux
You most likely know how to check your packages; I usually use "apt policy <package>"
As far as your disk, you want to mount it with fstab, but why? Since it is an external disk, and I assume, not always connected, I believe in fact you should not use fstab, but rather let it automount via the file manager, or manually mount via the file manager depending on your settings.
I set a Label on the partition with GParted, and manually mount it with the file manager. The mount point is under /media/user/<Label>.
And a quote from a user in these forums about Label:
"With a label, it will automount the partition at /media/user/label; if you don't have a label it will use the UUID."
It makes me wonder why yours got mounted under /dev/usb1.
After a search I found that blkid is part of the util-linux package. I do not know if it is installed by default (if you are using Debian from your info). This is the link: https://packages.debian.org/bullseye/util-linux
Yes, it will be there. Util-linux is a very basic part of Linux, almost as basic as coreutils. You have to have it for your system to function.
Quote:
As far as your disk, you want to mount it with fstab, but why? Since it is an external disk, and I assume, not always connected, I believe in fact you should not use fstab, but rather let it automount via the file manager, or manually mount via the file manager depending on your settings.
That's very much a matter of personal taste. Some people prefer to mount by hand in the traditional way.
Quote:
I set a Label on the partition with GParted, and manually mount it with the file manager. The mount point is under /media/user/<Label>.
You can set labels with e2label as well, which is simpler to use.
Quote:
And a quote from a user in these forums about Label:
"With a label, it will automount the partition at /media/user/label; if you don't have a label it will use the UUID."
Or, with a usb stick, under the manufacturer's name
Quote:
It makes me wonder why yours got mounted under /dev/usb1.
Assuming 45adb858-db02-4aaf-97fc-93ead2892115 is the actual UUID of your filesystem on /dev/sdc1, which is extremely unlikely, the following would be a maximum reliability entry:
replacing 45adb858-db02-4aaf-97fc-93ead2892115 with the actual UUID of /dev/sdc1, would maximally reliable.
UUIDs are fine for hard brains, like computers have, but not so good for soft brains, like us humans have. There are alternatives to using /dev/sdc1 and UUID=. The best one for me is LABEL=. I think it would be for you too. Assuming your external 8G is plugged in and ready, do:
uuid is unique, so you can name your device. Or you can set a label which will be unique too and can be used to identify your device.
But without that the system will give it a random name, like sda, sdb, sdc or similar. In general you cannot be sure if you will get the same identifier at every boot, so the fstab entry may or may not be valid. That's why we suggest to use label or uuid.
But without that the system will give it a random name, like sda, sdb, sdc or similar. In general you cannot be sure if you will get the same identifier at every boot, so the fstab entry may or may not be valid. That's why we suggest to use label or uuid.
Don't all modern distros use udev rules to ensure consistent naming of drives?
The letters a, b, c in the names sda, sdb, sdc are in the same order according to the order in which they are physically connected to the controller. - sometimes. They're ordered in whichever order the kernel detects them first (same as the network devices) which can change on each boot.
Using multithreaded kernel can cause surprises, the order of the detection is unpredictable. Also removable devices can affect the order devices. That's why better to use those persistent names.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.