LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-29-2019, 03:01 PM   #1
_dave
LQ Newbie
 
Registered: Jun 2019
Location: Southern Coastal tip of California
Distribution: Linux Mint 20.2 Cinnamon
Posts: 6

Rep: Reputation: Disabled
Why does my second drive always has to be "mounted" when starting Linux?


I am just now starting to learn the Linux O.S., I am using Linux Mint 19.1 Cinnamon version.

When I start the system I always have to 'mount' my second drive. My question is, how can I set it up to be mounted all the time at startup?

BTW - I am using the second drive to save my Linux learning books and reference notes.

Thanks for any suggestions and helpful information.

_dave
 
Old 06-29-2019, 03:12 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Search about the "Disks" app.

Edit: unless that's just Gnome?

(Try /etc/fstab)

Last edited by jamison20000e; 06-29-2019 at 03:18 PM.
 
Old 06-29-2019, 03:19 PM   #3
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 54
Google "/etc/fstab" might help you out.
 
2 members found this post helpful.
Old 06-29-2019, 03:27 PM   #4
_dave
LQ Newbie
 
Registered: Jun 2019
Location: Southern Coastal tip of California
Distribution: Linux Mint 20.2 Cinnamon
Posts: 6

Original Poster
Rep: Reputation: Disabled
I tried and received the following statement, what do I do now?

dave@Linux-Inspiron-620:~$ /etc/fstab
bash: /etc/fstab: Permission denied
 
Old 06-29-2019, 03:38 PM   #5
Terry Coats
Member
 
Registered: Mar 2017
Posts: 122

Rep: Reputation: 54
/etc/fstab is a file you have to edit as root user
and put in there the disk you want to mount.
here's mine:
Code:
# file system  mount-point  type     options             dump  fsck
#                                                              order
/dev/sdb3      /            ext4     defaults            1     1
/dev/sda5      swap         swap     pri=1               0     0
/dev/sda3  /mnt/lfs-8.0 ext4   defaults      0  0
proc           /proc        proc     nosuid,noexec,nodev 0     0
sysfs          /sys         sysfs    nosuid,noexec,nodev 0     0
devpts         /dev/pts     devpts   gid=5,mode=620      0     0
tmpfs          /run         tmpfs    defaults            0     0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0
For more info do:
Code:
man fstab
from a command line to get some complicated instructions.
If you are a total newbie you should probably google for
"/etc/fstab" like I suggested and study what you find there.

Found this. Might be helpful.

https://community.linuxmint.com/tutorial/view/1513

Last edited by Terry Coats; 06-29-2019 at 03:46 PM. Reason: looked for more help
 
1 members found this post helpful.
Old 06-29-2019, 07:50 PM   #6
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
This article from the Arch Wiki (always an excellent reference) should help: https://wiki.archlinux.org/index.php/Fstab

Check the "options" file of the entry in /etc/fstab for the partition in question.
 
1 members found this post helpful.
Old 06-29-2019, 08:24 PM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by _dave View Post
I tried and received the following statement, what do I do now?

dave@Linux-Inspiron-620:~$ /etc/fstab
bash: /etc/fstab: Permission denied
your knowledge base on Linux is really lacking. Got to start somewhere.

to look into a file use cat, sometimes you need to use sudo.
Code:
cat /etc/fstab
sudo cat /etc/fstab
to edit it, find a text editor you like, I use nano
Code:
sudo nano /etc/fstab
you need to find your mount points,and destination where you want it mounted to. I mount mine in /media/someDir so when I open my file manager it is in there on the side bar.
https://community.linuxmint.com/tutorial/view/1513
5.9.5. Mounting File Systems Automatically with /etc/fstab

post back if help needed, I am sure many will not mind helping you with this.
 
1 members found this post helpful.
Old 06-29-2019, 09:39 PM   #8
_dave
LQ Newbie
 
Registered: Jun 2019
Location: Southern Coastal tip of California
Distribution: Linux Mint 20.2 Cinnamon
Posts: 6

Original Poster
Rep: Reputation: Disabled
I totally agree, ..."your knowledge base on Linux is really lacking". But I know from what I'm seeing, I got a long way to go. And Thanks for all the help and suggestions (reading time for sure).

I did find a way by using the "disk" function from the Accessories menu section:
In my case I selected the second drive - additional partition options - edit mount options. I already had Mount at system startup checked,why it did not mount I don't know. I decided to turn "off" Users Session Defaults. I then restarted (several times) the system and my second drive now always shows up on the desktop and working.

This may not be the overall correct way, but it works for me.

Again, thanks to all for the valuable inputs and I will be reading all the commands and suggestions made here. Thanks!
 
Old 06-29-2019, 09:43 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,342
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Glad you got it fixed and thanks for the update.

And, to paraphrase BW-userx, we were all newbies once.
 
Old 06-30-2019, 04:04 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I actually do not know how you're getting your partiton, perhaps through automount so it shows up, but if that partiton is one you're going to use for your Linux system as say a data storage. I'd mount it in fstab. this is how I mount mine.

My Fstab
Code:
[userx@arcomeo MyTestDir]$ cat /etc/fstab
# /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>
UUID=2d6a4d00-106e-4402-91c4-329a1bbcee85 /media/data1   ext4    defaults,noatime,discard 0 2
UUID=98B63A6AB63A48D0                     /media/ntfs1   ntfs    defaults,noatime 0 2
UUID=c42aa97b-1daf-4694-97ee-068737cb1e53 /              ext4    defaults,noatime,discard 0 1
UUID=275e8ce5-486f-426a-9595-bd36134f8346 /home          ext4    defaults,noatime,discard 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
where the mounts on /media are my seperate hdd and partitions on that drive. I put them in media because it is a default directory that the a gui file manager will look into and pick up whatever it mounted in it.

So this way I do not have to go through any extra navigation to get to them, I just open a file manager.

you get your UUIDs from running this command.
Code:
sudo blkid
it is this logic that needs to always be applied. Manually, or by a process that automates it.
source -> destination
device partition -> mount point

the fstab.
https://help.ubuntu.com/community/Au...ountPartitions
<file system> <mount point> <type> <options> <dump> <pass>
are all covered in that article, link above. It's rather simple really, whence you get the hang of it, you'll see that.
 
Old 06-30-2019, 05:19 PM   #11
_dave
LQ Newbie
 
Registered: Jun 2019
Location: Southern Coastal tip of California
Distribution: Linux Mint 20.2 Cinnamon
Posts: 6

Original Poster
Rep: Reputation: Disabled
BW-userx,",,,I actually do not know how you're getting your partiton" I don't know either. But I am doing my best to learn.
You showed me your fstab, here's mine

Fstab:
Code:
dave@Linux-Inspiron-620:~$ cat /etc/fstab
# /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/sda1 during installation
UUID=02c8db37-7684-494a-97fc-de88b08cad72 /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
/dev/disk/by-uuid/2558d769-f520-4dd2-b7dc-1e52e1c400a7 /mnt/2558d769-f520-4dd2-b7dc-1e52e1c400a7 auto nosuid,nodev,nofail,x-gvfs-show 0 0
dave@Linux-Inspiron-620:~$
and my blkid:
Code:
[sudo] password for dave:         
/dev/sda1: UUID="02c8db37-7684-494a-97fc-de88b08cad72" TYPE="ext4" PARTUUID="e52bd103-01"
/dev/sdb1: LABEL="Storage" UUID="2558d769-f520-4dd2-b7dc-1e52e1c400a7" TYPE="ext4" PARTUUID="d4f038bf-01"
dave@Linux-Inspiron-620:~$
/dev/sda1 is where my Linux is and /dev/sdb1 is my storage drive for misc stuff (books, notes on Linux, etc)

Hopefully, this will answer your question regarding my partitions setup. If you can give me some pointers, I would really appreciate it and thanks for your feedback.
 
Old 06-30-2019, 06:53 PM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
this is what it is using to mount that drive, on your last line in your fstab.
Code:
/dev/disk/by-uuid/2558d769-f520-4dd2-b7dc-1e52e1c400a7 /mnt/2558d769-f520-4dd2-b7dc-1e52e1c400a7 auto nosuid,nodev,nofail,x-gvfs-show 0 0
if you want to replace that with the other way, and put it somewhere else then /mnt



/dev/sdb1: LABEL="Storage" UUID="2558d769-f520-4dd2-b7dc-1e52e1c400a7"

if that is the one you want mounted in fstab

open two terminals, in one,
(You can name your directory whatever you want, it does not have to be 'storage')

Code:
sudo mkdir -p /media/storage

sudo nano /etc/fstab

in fstab, move your cursor down below your fist UUID
starting on a new line, add
in your other terminal
Code:
sudo blkid
to get your UUID or use the one here in your post.

then just add the
Code:
UUID=2558d769-f520-4dd2-b7dc-1e52e1c400a7 /media/storage ext4 defaults 0 0

ctrl+x # to close and save, answer y then enter

sudo mount -a
if you made any screw ups it will tell you after you issued the mount -a(ll) command.
Make sure you do not have the "quote marks" in your fstab on your UUID.

To remove that last line using nano. Put your cursor on the left side of it then hit ^K
^=ctrl and k=k
ctrl+k
to cut that line out of there, before you save and exit nano.

Last edited by BW-userx; 06-30-2019 at 07:06 PM.
 
Old 07-01-2019, 05:37 AM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,537

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
The link below has Linux Mint Installation as well as User Manuals in multiple languages which should be useful.

https://linuxmint.com/documentation.php
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does system always prompts that /dev/sda1 is already mounted or mount point busy chinabenjamin66 Linux - Newbie 5 09-30-2012 10:19 PM
Why so many "tmpfs" mounted? One is mounted on /media -- why? SharpyWarpy Fedora 6 03-13-2012 12:15 AM
LXer: Why Does Microsoft Always Get A Free Pass? Why Does Big Business Reek So Badly? LXer Syndicated Linux News 0 12-04-2008 09:21 AM
Command ls --color=always, can always be always Kevin Tough Linux - Newbie 1 09-08-2005 11:05 PM
Why does Redhat 8.0 access hard drive second by second? Cyclops Linux - Distributions 5 11-20-2002 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration