LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-04-2016, 09:08 PM   #1
khronosschoty
Member
 
Registered: Jul 2008
Distribution: Slackware
Posts: 648
Blog Entries: 2

Rep: Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513Reputation: 513
luks img crypttab mounts as read only.


Okay I'm trying to create a luks img to mount onto my /tmp directory so that my tmp directory is encrypted but for some reason it always mounts as read only.

The /etc/crypttab entry I have is tmp /root/tmp.img

and the fstab entry I have is /dev/mapper/tmp /tmp ext4 defaults 1 2

When I run cryptsetup luksOpen /root/tmp.img tmp and then mount -a it mounts in the manner I want. I added that to my rc.local script and it works but its less than ideal IMO. Any suggestions on how I could get this working via crypttab?
 
Old 09-05-2016, 03:04 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
The problem is that the crypttab processing is done in rc.S before the rootfs get mounted read-write. Therefore your 'image' file is on a read-only filesystem when cryptsetup tries to open it and thus can only open it read-only. I've also hit this issue before, but for /home on an image rather than /tmp.

You could try moving the appropriate section of rc.S to after the rw,remount of rootfs.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[PATCH] rc.S: interactive password prompt for LUKS devices with options in /etc/crypttab .Lightning Slackware 7 04-29-2016 09:42 AM
crypttab: opening luks volumes with TRIM on SSDs during boot thegoofeedude Slackware 0 11-03-2013 10:45 PM
Mounts are Read-Only After Ubuntu 9.10 BloodBlight Linux - General 0 11-01-2009 07:09 PM
2.6.24 now has read-only bind mounts, how do I use it?! sauce Linux - General 2 02-04-2008 05:10 PM
USB HardDrive mounts read-only. Is there anyway to make it read-write? Fritz_Katz Linux - Hardware 7 09-13-2007 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:04 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