Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #172447 > unrolled thread

/etc/fstab and systemd

Started byPol Hallen <deben@fuckaround.org>
First post2016-09-19 15:40 +0200
Last post2016-09-19 21:00 +0200
Articles 5 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  /etc/fstab and systemd Pol Hallen <deben@fuckaround.org> - 2016-09-19 15:40 +0200
    Re: /etc/fstab and systemd Greg Wooledge <wooledg@eeg.ccf.org> - 2016-09-19 16:10 +0200
    Re: /etc/fstab and systemd Teemu Likonen <tlikonen@iki.fi> - 2016-09-19 16:10 +0200
    Re: /etc/fstab and systemd Mart van de Wege <mvdwege@gmail.com> - 2016-09-19 16:10 +0200
    Re: /etc/fstab and systemd Jimmy Johnson <field.engineer@gmail.com> - 2016-09-19 21:00 +0200

#172447 — /etc/fstab and systemd

FromPol Hallen <deben@fuckaround.org>
Date2016-09-19 15:40 +0200
Subject/etc/fstab and systemd
Message-ID<sj6XD-62j-13@gated-at.bofh.it>
hi all :-)

I migrated my pc to systemd (!), in /etc/fstab I've

/dev/sdb1	/test	ext4	x-systemd.automount	0	0
(I use UUID but to semplify I wrote /dev/sdb1)

this line works but only on some pc

what is the correct way to mount a disk automatically at start up of system?

thanks!

Pol

[toc] | [next] | [standalone]


#172452

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2016-09-19 16:10 +0200
Message-ID<sj7qF-6ru-9@gated-at.bofh.it>
In reply to#172447
On Mon, Sep 19, 2016 at 03:15:26PM +0200, Pol Hallen wrote:
> I migrated my pc to systemd (!), in /etc/fstab I've
> 
> /dev/sdb1	/test	ext4	x-systemd.automount	0	0
> (I use UUID but to semplify I wrote /dev/sdb1)

Changing the content of your files is not "simplifying".  It's mangling.

> what is the correct way to mount a disk automatically at start up of system?

This is what jessie does by default:

UUID=1a20ffb7-897c-4373-84c1-14089a6deab8 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda3 during installation
UUID=b8d67062-8262-476d-9370-8166f7572fd3 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0

Or, on a system with a separate /home:

UUID=404cbcbe-cc34-44e6-b8cf-845c3ceb56e7 /home           ext4    defaults        0       2

In short, there's no special magic used by fstab on a jessie/systemd
system.  It's just like an fstab from wheezy.  Let systemd handle the
mounting in its regular way.

[toc] | [prev] | [next] | [standalone]


#172453

FromTeemu Likonen <tlikonen@iki.fi>
Date2016-09-19 16:10 +0200
Message-ID<sj7qF-6ru-3@gated-at.bofh.it>
In reply to#172447

[Multipart message — attachments visible in raw view] — view raw

Pol Hallen [2016-09-19 15:15:26+02] wrote:

> I migrated my pc to systemd (!), in /etc/fstab I've

> what is the correct way to mount a disk automatically at start up of
> system?

Just like before. There's no need to change anything.

-- 
/// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[toc] | [prev] | [next] | [standalone]


#172454

FromMart van de Wege <mvdwege@gmail.com>
Date2016-09-19 16:10 +0200
Message-ID<sj7qF-6ru-11@gated-at.bofh.it>
In reply to#172447
Pol Hallen <deben@fuckaround.org> writes:

> hi all :-)
>
> I migrated my pc to systemd (!), in /etc/fstab I've
>
> /dev/sdb1	/test	ext4	x-systemd.automount	0	0
> (I use UUID but to semplify I wrote /dev/sdb1)
>
> this line works but only on some pc
>
> what is the correct way to mount a disk automatically at start up of system?
>
> thanks!
>
Just remove the x-systemd.automount. Replace it with 'defaults' or
whatever other options you like.

Unless a volume is marked with specific systemd options to *not* mount
it automatically, systemd will mount everything in fstab at boot.

Mart

-- 
"We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.

[toc] | [prev] | [next] | [standalone]


#172486

FromJimmy Johnson <field.engineer@gmail.com>
Date2016-09-19 21:00 +0200
Message-ID<sjbXj-EM-9@gated-at.bofh.it>
In reply to#172447
On 09/19/2016 06:15 AM, Pol Hallen wrote:
> hi all :-)
>
> I migrated my pc to systemd (!), in /etc/fstab I've
>
> /dev/sdb1    /test    ext4    x-systemd.automount    0    0
> (I use UUID but to semplify I wrote /dev/sdb1)
>
> this line works but only on some pc
>
> what is the correct way to mount a disk automatically at start up of
> system?
>
> thanks!
>
> Pol

"/dev/sdb1 /test ext4 auto,users,exec,relatime 0 0"

You do realize that will mount the folder named 'test' you have created 
on root.  If you do not have a folder named 'test' on root/ in will not 
work.
You may want to put the mount folder named 'test' in your home folder, 
ie /home/username/test. I mount to a folder named '1-Linux' so that it 
will be at the top of my home directory. I hope that helps.
-- 
Jimmy Johnson

Debian Sid/Testing - XFCE4 - AMD64 - EXT4 at sda24
Registered Linux User #380263

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web