fstab: what did I do wrong?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
oldgranola
Level 5
Level 5
Posts: 564
Joined: Fri Sep 05, 2014 1:39 am

fstab: what did I do wrong?

Post by oldgranola »

Trying to get an external RAID box to auto mount. I added a line to fastab for it but then was no longer able to boot at all. Obviously I got something wrong. Had to use my recovery/live usb to boot and then edit the fastab file back to original. Here's what I wrote:

Code: Select all

# / was on /dev/sda5 during installation
UUID=8eea86f8-3f45-4a10-9bad-1361e2045b3d /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
UUID=cd56cea7-6cb1-41a1-9c2d-72ba1a0f2811 /mnt  ext4    errors=remount-ro 0       0
The last line was my addition.
Here's current output of blkid

Code: Select all

sudo blkid
[sudo] password for fun:           
/dev/sda1: UUID="12A2-E190" TYPE="vfat" PARTUUID="3716e8bd-7176-4c67-a62c-e1af19bc2333"
/dev/sda2: UUID="0251423c-6938-4ec5-8237-3bb7714837ab" TYPE="ext4" PARTUUID="4bb430c2-81c3-4c4e-ad20-bb5033cb299f"
/dev/sda3: UUID="e7ae45bc-3d3b-4ce0-a375-674ecb5059b7" TYPE="swap" PARTUUID="1851f0c3-a566-480a-85e7-c119cee2ae94"
/dev/sda5: UUID="8eea86f8-3f45-4a10-9bad-1361e2045b3d" TYPE="ext4" PARTUUID="f8822ae1-6337-4b31-bdc1-9150f3646d0a"
/dev/sda4: PARTUUID="a446844b-cfd2-442d-9432-0caa8f188664"
/dev/sdf: LABEL="Fun RAID" UUID="cd56cea7-6cb1-41a1-9c2d-72ba1a0f2811" TYPE="ext4"
/dev/sdf is the external. LM19.1 is on sda5 Monjaro is on sda2, grub2 on sda4
What did I get wrong? Also, would wan't to have the external drive skipped if there's trouble with it. The primary drive syntax has different spacing. Does that matter?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob
philotux

Re: fastab: what did I do wrong?

Post by philotux »

what happens if you run:

Code: Select all

sudo mount /dev/sdf /mnt
?
philotux

Re: fastab: what did I do wrong?

Post by philotux »

Never mind! I guess I am in the wrong :oops:
Sorry about that!
User avatar
trytip
Level 14
Level 14
Posts: 5366
Joined: Tue Jul 05, 2016 1:20 pm

Re: fastab: what did I do wrong?

Post by trytip »

use Disks to get a better understanding of automount
Image
Image
User avatar
AndyMH
Level 21
Level 21
Posts: 13728
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: fastab: what did I do wrong?

Post by AndyMH »

/mnt is an existing linux folder, you should not try to mount using it, but mount in it. /mnt is normally used for fixed drives and /media for removable drives.

Instead of:

Code: Select all

UUID=cd56cea7-6cb1-41a1-9c2d-72ba1a0f2811 /mnt  ext4    errors=remount-ro 0       0
try

Code: Select all

UUID=cd56cea7-6cb1-41a1-9c2d-72ba1a0f2811 /mnt/somethingelse  ext4    errors=remount-ro 0       0
replace somethingelse with whatever you want.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
philotux

Re: fstab: what did I do wrong?

Post by philotux »

oldgranola wrote: Mon Jan 21, 2019 1:11 pm I added a line to fastab for it but then was no longer able to boot at all. Obviously I got something wrong. Had to use my recovery/live usb to boot and then edit the fastab file back to original.
Whenever you edit your /etc/fstab adding a line for a partition to be mounted at boot, you could try mounting it before you reboot to make sure that all is okay and the partition does get mounted correctly. You could do that by running sudo mount /dev/sdxy replacing x and y with the corresponding letter and number of the partition. If it errors out then you will know and you will find a way to correct it. No un-bootable system and no need to recourse to a live usb.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: fstab: what did I do wrong?

Post by smurphos »

philotux wrote: Mon Jan 21, 2019 7:58 pm No un-bootable system and no need to recourse to a live usb.
And always use the nofail parameter for an external drive so it doesn't error and prevent boot if you try and boot with the drive disconnected.

e.g

Code: Select all

UUID=7f5c52d4-a3ee-44b1-bbbe-230bdb1e6d13	/mnt/backup_drive	ext4	defaults,nofail  	0	0
UUID=62e134d6-6d08-4119-8b02-f3ba9edd7c96       /mnt/timeshift		ext4	defaults,nofail		0	0	
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
hcentaur13

Re: fstab: what did I do wrong?

Post by hcentaur13 »

A mountpoint is a 1:1 order. It can only represent exactly 1 partition whereas it is the logical address of the physical location.

Remember you needs a mountpoint to mount a partition on the path it should assigned to. Yes, even / is a simple mountpoint. It is the root directory of the whole logical filesystem.
oldgranola
Level 5
Level 5
Posts: 564
Joined: Fri Sep 05, 2014 1:39 am

Re: fstab: what did I do wrong?

Post by oldgranola »

You are all so helpful. Learning here, thanks
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob
Locked

Return to “Beginner Questions”