I formatted this to ext4.
I am getting this message.
How can I make this 2nd drive useable?
Thanks.
What is the make/model of the drive?
Please confirm that is a USB drive that you are attempting to auto-mount, not defined as an entry in /etc/fstab.
The drive is a platter drive.
blkid
/dev/sda2: UUID="26c126a6-290a-4019-a32b-f6bb290663ea" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5d202965-7027-4a53-baba-da14fa16a0e2"
/dev/sdb1: UUID="af83b28c-743c-4496-bce3-f94f0977a608" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="000f0791-01"
Can someone help me?
Hi, @fixit7
Could you please paste the output of the following commands (assuming the output does not include something that you want to keep private, for some reason)? I believe they may help to better understand your setup:
inxi --disk
lsblk -n | grep --invert-match ^loop
for drive in $(inxi --disk | grep 'ID' | awk '{ print $2 }');do echo; sudo fdisk -l $drive; echo; done
grep ^[^#] /etc/fstab
df -hTP | grep --invert-match 'tmpfs' | grep --invert-match 'efivarfs'
Thanks Ricardo.
~$ inxi --disk
Drives:
Local Storage: total: 2.11 TiB used: 40.21 GiB (1.9%)
ID-1: /dev/sda vendor: Western Digital model: WD2003FYPS-27Y2B0
size: 1.82 TiB
ID-2: /dev/sdb vendor: Maxtor model: STM3320620AS size: 298.09 GiB
~
$
lsblk -n | grep --invert-match ^loop
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1M 0 part
└─sda2 8:2 0 1.8T 0 part /var/snap/firefox/common/host-hunspell
/
sdb 8:16 0 298.1G 0 disk
└─sdb1 8:17 0 298.1G 0 part /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
sr0 11:0 1 1024M 0 rom
~$
for drive in $(inxi --disk | grep 'ID' | awk '{ print $2 }');do echo; sudo fdisk -l $drive; echo; done
grep ^[^#] /etc/fstab
[sudo] password for andy:
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD2003FYPS-2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 947D6337-AEFC-4E3E-8C26-E1C7E2E60634
Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 3907026943 3907022848 1.8T Linux filesystem
Disk /dev/sdb: 298.09 GiB, 320072933376 bytes, 625142448 sectors
Disk model: MAXTOR STM332062
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000f0791
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 625141759 625139712 298.1G 83 Linux
/dev/disk/by-uuid/26c126a6-290a-4019-a32b-f6bb290663ea / ext4 defaults 0 1
/swap.img none swap sw 0 0
~$ df -hTP | grep --invert-match 'tmpfs' | grep --invert-match 'efivarfs'
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 1.8T 41G 1.8T 3% /
/dev/sdb1 ext4 293G 32K 278G 1% /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
Hi again, @fixit7
Thanks for the outputs! Based on the following command and output, the "ext4" filesystem of your 300 GB HDD (hard disk drive) is already (successfully) mounted on /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
:
~$ df -hTP | grep --invert-match 'tmpfs' | grep --invert-match 'efivarfs'
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 1.8T 41G 1.8T 3% /
/dev/sdb1 ext4 293G 32K 278G 1% /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
I'm guessing you may now want to do 2 things:
1. - Change the ownership of the /media/andy
and the /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
directories so those directories get owned by the user andy
(based on the screenshot you've included in the first post of this topic, I believe that andy
is the user you use). To do that, you should use the following two commands (in sequence):
sudo chown -v andy /media/andy
sudo chown -v andy /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
2. - Change the content of the /etc/fstab
file to add the filesystem mounted in the /media/andy/af83b28c-743c-4496-bce3-f94f0977a608
directory to the list of filesystems that should be mounted at boot. To do that, I would :
2.1. - First, create a backup of the existing /etc/fstab
file:
sudo cp -piv /etc/fstab /etc/fstab.ORIG.$(date +%Y-%m-%d)
2.2. - Append a line with the desired mount to the /etc/fstab
file. I believe you can enter the following command to do that:
sudo bash -c 'echo "UUID=af83b28c-743c-4496-bce3-f94f0977a608 /media/andy/af83b28c-743c-4496-bce3-f94f0977a608 ext4 defaults 0 2" >> /etc/fstab'
2.3. - Verify that the new /etc/fstab
is good. It should be good if a sudo findmnt --verify
returns only the following warning (and no other warnings or errors):
$ sudo findmnt --verify
[W] your fstab has been modified, but systemd still uses the old version;
use 'systemctl daemon-reload' to reload
0 parse errors, 0 errors, 1 warning
2.4. - Assuming the output of sudo findmnt --verify
was as described above, let's now make systemd use the new version of the /etc/fstab
:
sudo systemctl daemon-reload
2.5 - Finally, let's mount all the fillesystems:
sudo mount -av
I hope this helps Please, keep us posted!
I made some changes before I saw your post.
The fstab is messed up.
I re-installed UM 24.02 alongside my older version.
I have not lost any more files.
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda4 during curtin installation
/dev/disk/by-uuid/4ae1c922-c376-438c-b75e-85627897fede / ext4 defaults 0 1
# /boot/efi was on /dev/sda3 during curtin installation
/dev/disk/by-uuid/CC37-7311 /boot/efi vfat defaults 0 1
/swap.img none swap sw 0 0
I would like to fix this to get rid of all the numbers.
/media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea/home/andy/Documents/
sudo findmnt --verify
[sudo] password for andrew:
none
[W] non-bind mount source /swap.img is a directory or regular file
0 parse errors, 0 errors, 1 warning
Hi again, @fixit7
You wrote:
You say that the "The fstab is messed up". Maybe you're saying that because you got the following warning when running sudo findmnt --verify
: "[W] non-bind mount source /swap.img is a directory or regular file" ? If that's the case, I believe that you may proceed even with that particular warning (I usually use a swap partition, instead of a swap file, so I don't get that warning).
Nice. That's great
OK. So, to do that, I would:
1. - Unmount the /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
in case it's mounted:
cd
sudo umount -v /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
2. - Rename /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
to, for instance, /media/andrew/disk2
:
sudo mv -v /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea /media/andrew/disk2
3. - Change the ownership of the /media/andrew
and the /media/andrew/disk2
directories so those directories get owned by the user andrew
(based on your last message, it seems that andrew
is the user you use in this new installation). To do that, you should use the following two commands (in sequence):
sudo chown -v andrew /media/andrew
sudo chown -v andrew /media/andrew/disk2
4. - Change the content of the /etc/fstab
file to add the filesystem mounted in the /media/andrew/disk2
directory to the list of filesystems that should be mounted at boot. To do that, I would :
4.1. - First, create a backup of the existing /etc/fstab
file:
sudo cp -piv /etc/fstab /etc/fstab.ORIG.$(date +%Y-%m-%d)
4.2. - Append a line with the desired mount to the /etc/fstab
file. I believe you can enter the following command to do that:
sudo bash -c 'echo "UUID=af83b28c-743c-4496-bce3-f94f0977a608 /media/andrew/disk2 ext4 defaults 0 2" >> /etc/fstab'
4.3. - Verify that the new /etc/fstab
is good. It should be good if a sudo findmnt --verify
returns only the following warning (and no other warnings or errors):
$ sudo findmnt --verify
[W] non-bind mount source /swap.img is a directory or regular file
[W] your fstab has been modified, but systemd still uses the old version;
use 'systemctl daemon-reload' to reload
0 parse errors, 0 errors, 2 warnings
4.4. - Assuming the output of sudo findmnt --verify
was as described above, let's now make systemd use the new version of the /etc/fstab
:
sudo systemctl daemon-reload
4.5 - Finally, let's mount all the fillesystems:
sudo mount -av
I hope this helps Please, keep us posted!
The "terse" summary of what Ricardo outlined quite well is that, for reference to drives via UUID, the format is
#device mount_point fstype mount_options ??? boot_mount_sequence
and one line in my /etc/fstab
file looks like this:
UUID=7e9a663e-ff1d-4730-8544-c37519056b6f /DB001_F2 ext4 defaults,nofail,journal_checksum,journal_async_c
ommit,commit=15,errors=remount-ro,journal_ioprio=2,data_err=ignore,nodiscard 0 1
I can not find a mountpoint
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 73.9M 1 loop /snap/core22/1748
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 258M 1 loop /snap/firefox/5751
loop3 7:3 0 11.1M 1 loop /snap/firmware-updater/167
loop4 7:4 0 516M 1 loop /snap/gnome-42-2204/202
loop5 7:5 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop6 7:6 0 44.4M 1 loop /snap/snapd/23545
loop7 7:7 0 10.8M 1 loop /snap/snap-store/1248
loop8 7:8 0 568K 1 loop /snap/snapd-desktop-integration/253
loop9 7:9 0 50.9M 1 loop /snap/snapd/24505
loop10 7:10 0 73.9M 1 loop /snap/core22/1981
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1M 0 part /media/andrew/Andy
├─sda2 8:2 0 1.6T 0 part /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
├─sda3 8:3 0 1G 0 part /boot/efi
└─sda4 8:4 0 246.2G 0 part /
sdb 8:16 0 298.1G 0 disk
└─sdb1 8:17 0 298.1G 0 part /media/andrew/C27D-D388
sr0 11:0 1 4.4G 0 rom
andrew@andrew:~$ blkid
/dev/sda4: UUID="4ae1c922-c376-438c-b75e-85627897fede" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6133a22b-d975-4f0d-b607-4f3c9fa71bcb"
Hi again, @fixit7
So, it seems that with your new Ubuntu MATE 24.04.2 re-installation, the initial scenario probably has changed (at least some of the UUID appear to have changed). Could you please tell the output of the following commands:
lsblk -f | grep --invert-match '^loop'
grep ^[^#] /etc/fstab
df -hTP | grep --invert-match 'tmpfs' | grep --invert-match 'efivarfs'
Thanks again.
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ext4 1.0 Andy 1438d2a9-cfed-41ae-bb56-d97a5d78a0c5
├─sda2 ext4 1.0 26c126a6-290a-4019-a32b-f6bb290663ea
├─sda3 vfat FAT32 CC37-7311
└─sda4 ext4 1.0 4ae1c922-c376-438c-b75e-85627897fede 213.3G 6% /
sdb
└─sdb1 vfat FAT32 C27D-D388
sr0
/dev/disk/by-uuid/4ae1c922-c376-438c-b75e-85627897fede / ext4 defaults 0 1
/swap.img none swap sw 0 0
UUID=4ae1c922-c376-438c-b75e-85627897fede / ext4 defaults
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda4 ext4 242G 16G 214G 7% /
Hi again, @fixit7
OK, thanks for the outputs So, I've noticed the following:
1 - You've created a 1 MB (only one megabyte) partition in the first disk - /dev/sda1
with UUID 1438d2a9-cfed-41ae-bb56-d97a5d78a0c5 and an associated "ext4" filesystem - that apparently you want to mount in /media/andrew/Andy
?
2 - You've created a 1.6 TB (file (one point six terabytes) partition in the first disk - /dev/sda2
with UUID 26c126a6-290a-4019-a32b-f6bb290663ea and an associated "ext4" filesystem - that apparently would get mounted at /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
What do you want that mount /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
to be (given that you previously said that you wanted to "get rid of all the numbers")? If you want it to be /media/andrew/disk2
you can follow the instructions of my last post:
Mount points are like any other:
Step 1: you create one (i.e. mkdir ${dPath} )
Step 2a: either make reference to that fullpath mountpoint ( ${dPath ) in the /etc/fstab.
That fullpath mountpoint could have the form similar to
/andy_usb
or /andy_disk2
or /media/andrew/26c126a6-290a-4019-a32b-f6bb290663ea
or /local/26c126a6-290a-4019-a32b-f6bb290663ea
or /local/andy_disk2
etc.
or Step 2b: you could use the mount command directly,
mount -v -t ${dFtype} ${mOptions} --uuid ${dUuid} ${dPath}
mount -v -t ext4 ${mOptions} --uuid 26c126a6-290a-4019-a32b-f6bb290663ea /andy_disk2
I am making some progress. Sometimes I go forward 1 step and back 2 steps.
I started out with a 2 Tb drive with Ubuntu-Mate 24.02 on it and a second Maxtor drive (about 300 Mb) that I used as a backup drive in case my primary drive failed.
That is so funny that you put terabytes in bold font.
I bought my desktop system about 10 years ago.
I think the builder was thinking ahead.
I will never run out of room.