Score:0

losetup creating encrypted loop device

cn flag

I'm running a script I found at github.com/rufferson/pureos-pinephone/tree/fd5ecbc2e6b8452545dd93db5235a6e20443071c to convert a Pinephone 64 3GB .img file to a PureOS .img that the PP 64 can boot.

When it reaches the losetup part, I'm getting a mount error:

  • sudo losetup -f
  • LO=/dev/loop26
  • sudo losetup -P /dev/loop26 librem5r4.img
  • sudo mount /dev/loop26p2 sd mount: /home/steve/purepp/sd: unknown filesystem type 'crypto_LUKS'

From what I understand, the losetup default is to create an unencrypted loop device. I've tried inserting the [ -e none ] option into the losetup command, but apparently "-e" is an invalid option.

Why would losetup create an encrypted loop device when the default is unencrypted?

TIA for any asistance provided.

ssilvi

guiverc avatar
cn flag
Please refer https://askubuntu.com/help/on-topic, Ubuntu and official *flavors* of Ubuntu (https://ubuntu.com/download/flavours) are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.
delta1071 avatar
cn flag
@guiverc: OK. Since the script errors out in both 18.04 and 21.04, I figured maybe the underlying Ubuntu OS was responsible for creating the encrypted loop device. I'll try the other forum. Thanks.
Sebastian avatar
in flag
Maybe because the partition in the image you try to mount is LUKS-encrypted?
delta1071 avatar
cn flag
Yes. it is. In the script I'm using, losetup is creating a loop device with a non-encrytped boot partition and a LUKS-encrypted root partition. The problem I'm having is how to mount the root partition so the script recognizes the LUKS filesystem. The script doesn't contain the necessary commands to do that. Anyhow, the author of the script has offered to add the appropriate commands to his script.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.