It looks like you're using an Ad Blocker.

Please white-list or disable in your ad-blocking tool.

Thank you.


Some features of ATS will be disabled while you continue to use an ad-blocker.


Linux: How to mount a second drive at boot?

page: 1

log in


posted on Mar, 7 2016 @ 06:20 PM
I am using Back in Time which is a front-end for Duplicity (which I understand runs on r-sync). I have a second drive with 2 partitions with partition "My Files" used for the backups (SBD2).

I set Back in Time as a daily Anacron as I don't keep my PC on 24/7. Anacron is not working. I can only do manual backups and have to enter root password to access the drive despite setting permissions correctly. I have to do this with Nemo file manager as well to access the drive, even though I have read/write permissions.

I have checked and Crony is running so ruled that out. I then realised that I may need to mount the drive at boot so I don't have to keep mounting it manually with a password. Can anyone confirm this?

I checked /etc/mtab and the SBD1 and SDB2 are not listed, only SDA1.

/etc/fstab is not in the format I am used to. Instead of identifying drives it uses mappers which I have never seen before. I checked /dev/mappers which contains files (which I cannot open) for control, /home, /root, /swap and also a file for my encrypted operating system on SDA1.

Do I need to create a mapper and link it in fstab to mount SDB2?

Any advice or links would be greatly appreciated.

Distro is Fedora 23 with drive info below.

posted on Mar, 7 2016 @ 07:00 PM
I feel your pain!

fstab is one tricky PITA even for sys admins. I haven't touched Suse in a while but ran into the same issue. I remember reading the man pages (man fstab) and using google a bunch trying to figure out what was wrong.

Partitions are mounted as part of the start up scripts usually "mount -a" which reads fstab. If you have every thing described right in there you should be good. But that is the trick right? You should be OK without having to resort to mappers as long as you can explicitly state your drive designations.

I would less my fstab for you to give you an example but am at work (about to leave) and am on windows.

Do you have an older version of Linux where it did work? Might try taking a peek over at that config to give you ideas on what is off (fstab has not changed much so you might be able to copy and paste!)

Good luck! Sorry couldn't help more off the top of my head!
edit on 7-3-2016 by TEOTWAWKIAIFF because: grammar nazi

edit on 7-3-2016 by TEOTWAWKIAIFF because: more grammar nazi

edit on 7-3-2016 by TEOTWAWKIAIFF because: same

posted on Mar, 7 2016 @ 07:16 PM
a reply to: Morrad

What do you get when you enter "sudo fdisk -l ," does your drive show up?

It sounds like you need to add your drive at boot with " sudo /etc/fstab"

I don't know much about mapppers and will look into more on it. Are you talking about the fact that it's using UUID, something like
"UUID=9f12f60f-c0c5-431b-a8d0-806f3a34e175"? this isn't much different that /dev/sdb1, it's just how your system lists the drives.

fstab fedora

edit on 7-3-2016 by IncognitoGhostman because: (no reason given)

posted on Mar, 7 2016 @ 07:50 PM
Thanks for the replies.

I feel your pain!

Dabbled with Linux since the late 90s and I hear that statement a lot. It appears to be the standard empathy acknowledgement for Linux users lol.

My fstab file:

dev/mapper/fedora00-root / ext4 defaults,x-systemd.device-timeout=0 1 1
UUID=aa3ea1ca-b2b9-4322-b5fb-1c5a644617b2 /boot ext4 defaults 1 2
/dev/mapper/fedora00-home /home ext4 defaults,x-systemd.device-timeout=0 1 2
/dev/mapper/fedora00-swap swap swap defaults,x-systemd.device-timeout=0 0 0

fdisk -l displays both my hard drives and disks SDA and SBD. It also displays the mapper links above.

The Fstab fedora link you gave I looked at this afternoon. This is how I would have added SBD1.

/dev/disk/by-uuid shows the drive I want to mount (not sure if this is relevant.

posted on Mar, 7 2016 @ 09:17 PM
a reply to: Morrad

Hello there
These instructions should help you in getting your drive to mount at start up

First In the terminal type

sudo blkid

Output should look something like this below

/dev/sda1: UUID="1923e8-84317-4c8b-b329-efc432tr34c16c" TYPE="swap"
/dev/sda4: UUID="1fxxswqb-36e4-42aa-b376-e3876nb7f8" TYPE="ext3"
/dev/sda5: UUID="Y636y33f530-1544-234r3-b458-t2345t5268" TYPE="crypto_LUKS"
/dev/mapper/sda5_crypt: UUID="u7n567145-63aa-4mt88ia-b6b7-753r3424rfq44f5" TYPE="ext4"

Now you need to select the partition and UUID that pertains to the source you would like to boot when the computer starts

in your case it is “myfiles”; so run the blkid command and copy the UUID identifier for that partition
Example: UUID="1923e8-84317-4c8b-b329-efc432tr34c16c" this is a swap in my case but would be “myfiles” in yours.

in the next step you will be pasting this string into the fstab config file and will need to remove the Quotations around the UUID value. Example below

CORRECT: UUID=1923e8-84317-4c8b-b329-efc432tr34c16c
INCORRECT: UUID="1923e8-84317-4c8b-b329-efc432tr34c16c"

Next in the terminal type

sudo nano /etc/fstab Then hit enter to open the config file

under the section titled

# /boot was on /dev/sda1 during installation

Paste the UUID we just copied in the earlier step underneath the already existing UUID entry

EXAMPLE: should look like this below

UUID=532347af-3re9-45a6-tt76-etl528l2j27f8 /boot ext3 defaults $
(your already existing partition do not remove!)

SO your final config file should look something like this

# /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).
/dev/mapper/sda5_crypt / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=532347af-3re9-45a6-tt76-etl528l2j27f8 /boot ext3 defaults $

REMEMER to place your UUID entry in there though these are just examples

1 Run: sudo blkid
2 Get the UUID for the partition “myfiles”
3 Copy the UUID without the quotations included
4 Open the fstab config by running: sudo nano /etc/fstab
5 At the bottom under already existing UUID entry under /sda1 paste your UUID for “myfiles”
6 Save the changes to the config file once made by hitting "Ctrl+o" then enter to confirm changes and then finally "Ctrl+x" to exit config file

Reboot and this drive should mount at start up

Hope this helps!!

edit on 7-3-2016 by 3ncrypt0Rdie because: (no reason given)

edit on 7-3-2016 by 3ncrypt0Rdie because: (no reason given)

edit on 7-3-2016 by 3ncrypt0Rdie because: corrections

posted on Mar, 8 2016 @ 09:22 AM
I just went into bios and changed boot order, for one of my dual booting experiences, because it only gave me the option of choosing the ubuntu strain, ie mint and windows, but not the pclinuxos one. The 2 linux used different types of grub. So, for ease of choice I just hit delete and went into bios and changed boot order back and forth, only took a minute.

But the latest mint sees everything. So I have all 3 in this set up.

posted on Mar, 8 2016 @ 02:46 PM
a reply to: 3ncrypt0Rdie

Thanks for this. I tried it 3 times and after boot the partition is not visible in file manager (it was prior to fstab change).

I tried to mount the partition manually and received this notice.

"Error mounting filesystem. Error creating directory `' to be used for mounting /dev/sdb2: Invalid argument (udisks-error-quark, 0)"

2 thoughts ...

SBD1 and SBD2 partitions are on my 1.8Tb drive. Would I need to mount SBD1 to be able to mount SBD2?

Would S-E Linux have any bearing?

posted on Mar, 8 2016 @ 02:50 PM
a reply to: Unity_99

I am thinking of switch to Linux Mint as Fedora 23 has quite a few bugs (wish I had stayed with 21).

posted on Mar, 10 2016 @ 01:28 PM
a reply to: Morrad

Still having issues?

OK. From your hd list in OP, sdb2 is NOT mounted. We should be able to get fstab entry to mount it at boot time (one of the startup scripts issues "mount -a" which reads your fstab entries and as long as "noauto" is not an option your partitions should mount).

From wikipeia Fstab examples used below

# device-spec -- is the specified device. Starts with 'root'
Example: LABEL=/
# mount-point -- is where you are going to mount the location at
Example: /
# fs-type -- is the file type
Example: ext4
#options -- any options here for the system to take. "Noauto" means "do not mount"
Example: defaults
# dump (spaces) pass -- how to mount the device with fschk and what to do if there are errors
Example: 1 1
Only use "1 1" on your boot disk! All others are usually it is "0 0" and "1 2" at most

# Below in fstab means mount sda6 at no mount point as type swap and do no checking
/dev/sda6 none swap defaults 0 0

Yours will look something like:
/dev/sdb2 /myfiles ext4 defaults 0 0

No mapper needed (not sure if Fedora23 is different). I assumed you want to retain the name "myfiles" as the mount point (you need a directory created with that name at the root level for it to mount).

Before you try anything, please answer the below questions!

Try and use "ls /dev/sdb*" to see what partitions are there (that should work).

How are you manually mounting the partitions? If you gave that command it would help to see where you are mounting the partitions to and thus set up fstab.

[ETA: I will be around most of the day (Thursday)]
edit on 10-3-2016 by TEOTWAWKIAIFF because: TMI

edit on 10-3-2016 by TEOTWAWKIAIFF because: CLI nazi

posted on Mar, 10 2016 @ 06:57 PM
Sorry Morrad but missed you today. I am out of here for a couple days. I'll check back on Monday.

top topics


log in