* [dm-crypt] LUKS partition write-protected, mounting read-only
@ 2016-04-26 22:38 Serrano Pereira
2016-04-27 0:44 ` Arno Wagner
2016-04-27 4:18 ` David Christensen
0 siblings, 2 replies; 3+ messages in thread
From: Serrano Pereira @ 2016-04-26 22:38 UTC (permalink / raw)
To: dm-crypt
Hello,
When I create a LUKS partition like so:
$ cryptsetup luksFormat /root/test
$ cryptsetup open /root/test test
$ mkfs.ext4 -j /dev/mapper/test
$ mount /dev/mapper/test /mnt/files
Then I can create files in /mnt/files just fine. But when I copy
/root/test to a different computer, and then do:
$ cryptsetup open /root/test test
Enter passphrase for /root/test:
mount: /dev/mapper/test is write-protected, mounting read-only
$ mount /dev/mapper/test /mnt/files
As you can see, the device is mounted read-only. I cannot write any
files to the LUKS partition. Why is this so? How can I write to the
partition on another computer?
Regards,
Serrano
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] LUKS partition write-protected, mounting read-only
2016-04-26 22:38 [dm-crypt] LUKS partition write-protected, mounting read-only Serrano Pereira
@ 2016-04-27 0:44 ` Arno Wagner
2016-04-27 4:18 ` David Christensen
1 sibling, 0 replies; 3+ messages in thread
From: Arno Wagner @ 2016-04-27 0:44 UTC (permalink / raw)
To: dm-crypt
Just a guess, but maybe the second machine has limited ext4 support?
You could try with ext3 and see what happens.
Regards,
Arno
On Wed, Apr 27, 2016 at 00:38:38 CEST, Serrano Pereira wrote:
> Hello,
>
> When I create a LUKS partition like so:
>
> $ cryptsetup luksFormat /root/test
> $ cryptsetup open /root/test test
> $ mkfs.ext4 -j /dev/mapper/test
> $ mount /dev/mapper/test /mnt/files
>
> Then I can create files in /mnt/files just fine. But when I copy
> /root/test to a different computer, and then do:
>
> $ cryptsetup open /root/test test
> Enter passphrase for /root/test:
> mount: /dev/mapper/test is write-protected, mounting read-only
> $ mount /dev/mapper/test /mnt/files
>
> As you can see, the device is mounted read-only. I cannot write any
> files to the LUKS partition. Why is this so? How can I write to the
> partition on another computer?
>
> Regards,
> Serrano
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
--
Arno Wagner, Dr. sc. techn., Dipl. Inform., Email: arno@wagner.name
GnuPG: ID: CB5D9718 FP: 12D6 C03B 1B30 33BB 13CF B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato
If it's in the news, don't worry about it. The very definition of
"news" is "something that hardly ever happens." -- Bruce Schneier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dm-crypt] LUKS partition write-protected, mounting read-only
2016-04-26 22:38 [dm-crypt] LUKS partition write-protected, mounting read-only Serrano Pereira
2016-04-27 0:44 ` Arno Wagner
@ 2016-04-27 4:18 ` David Christensen
1 sibling, 0 replies; 3+ messages in thread
From: David Christensen @ 2016-04-27 4:18 UTC (permalink / raw)
To: dm-crypt
On 04/26/2016 03:38 PM, Serrano Pereira wrote:
> Hello,
>
> When I create a LUKS partition like so:
>
> $ cryptsetup luksFormat /root/test
I typically put a LUKS container into a partition on a HDD, SSD, USB
flash drive, etc. -- e.g. /dev/sdb1.
Is /root/test a file (?). How did you create it?
> $ cryptsetup open /root/test test
Note that 'test' is a user-space command and/or a shell built-in. It's
best to avoid using that word for *anything*.
My 'man cryptsetup' doesn't show any 'open' action. Did you cut/paste
the above from a console session? If not, please post exact console
sessions with commands and output. Entering things by hand from memory
invites Murphy's Law.
> $ mkfs.ext4 -j /dev/mapper/test
Why the '-j' option (ext3 journal)?
> $ mount /dev/mapper/test /mnt/files
I assume /mnt/files already existed when you ran the above command?
>
> Then I can create files in /mnt/files just fine. But when I copy
> /root/test to a different computer,
Did you unmount the file system and close the LUKS container before
copying /root/test to the other machine?
> and then do:
>
> $ cryptsetup open /root/test test
> Enter passphrase for /root/test:
> mount: /dev/mapper/test is write-protected, mounting read-only
> $ mount /dev/mapper/test /mnt/files
>
> As you can see, the device is mounted read-only. I cannot write any
> files to the LUKS partition. Why is this so? How can I write to the
> partition on another computer?
As root, please run these commands on the computer with the source LUKS
device (file) and post the console session:
uname -a
umount /mnt/test
cryptsetup --version
cryptsetup luksClose test
ls -l /root/test
cryptsetup luksDump /root/test
cryptsetup luksOpen /root/test test
ls -l /dev/mapper/test
fsck /dev/mapper/test
ls -ld /mnt/files
mount /dev/mapper/test /mnt/files
mount | grep '/mnt/files'
ls -ld /mnt/files
echo 'hello, world!' > /mnt/files/hello.txt
Then repeat for the computer with the copy.
We're looking for error messages.
If you don't understand the above commands, RTFM each one. If a command
is broken, fix it.
Hopefully, that will provide enough clues to figure out what's going on.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-27 4:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 22:38 [dm-crypt] LUKS partition write-protected, mounting read-only Serrano Pereira
2016-04-27 0:44 ` Arno Wagner
2016-04-27 4:18 ` David Christensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.