You are not logged in.

#1 2012-08-26 21:56:45

jlindgren
Member
Registered: 2011-02-27
Posts: 260

[SOLVED] Mounting /tmp as a ramdisk with systemd

Hi, how would one go about setting up /tmp to be a ramdisk when using systemd?  (I'm entirely new to systemd, but since Arch is switching to it I guess I need to learn it.)  With rc.sysinit it was simple; I just added a call to "mount" early on in the script.

Last edited by jlindgren (2012-08-28 00:16:56)

Offline

#2 2012-08-26 22:18:29

George
Member
Registered: 2011-05-11
Posts: 165

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

Umm, I think you're generally encouraged to mount /tmp as tmpfs (which is kept in ram) which you can do from your fstab with a line like this;

tmpfs           /tmp    tmpfs   nodev,nosuid    0       0

Last edited by George (2012-08-26 22:19:10)

Offline

#3 2012-08-27 22:50:32

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

There was some reason I was mounting it earlier on than it would have been from /etc/fstab with initscripts -- but I can't remember what that reason was. smile  Possibly it would not even matter for systemd; anyway, I'll try it.  Thanks.

Offline

#4 2012-08-27 23:16:07

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

jlindgren wrote:

There was some reason I was mounting it earlier on than it would have been from /etc/fstab with initscripts -- but I can't remember what that reason was. smile  Possibly it would not even matter for systemd; anyway, I'll try it.  Thanks.

If you really need it early you should add a hook for the initrd and rebuild it. (similar to the usr-hook I think)

Last edited by progandy (2012-08-27 23:16:31)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2012-08-27 23:34:47

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

I boot without an initrd, but since I can't remember why I wanted /tmp mounted early, and it seems to be working fine from fstab, I'm going to assume that it wasn't anything too important.

Offline

#6 2012-08-27 23:48:08

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

Solved?

Offline

#7 2012-08-27 23:57:20

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

WonderWoofy wrote:

Solved?

Yes.  I can't find any place to edit the post title, though.

Offline

#8 2012-08-28 00:01:18

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

The 'edit' button on your first post.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2012-08-28 00:17:10

jlindgren
Member
Registered: 2011-02-27
Posts: 260

Re: [SOLVED] Mounting /tmp as a ramdisk with systemd

ngoonee wrote:

The 'edit' button on your first post.

Aha.

Offline

Board footer

Powered by FluxBB