public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Srinuvasan Arjunan <srinuvasanasv@gmail.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: mount loop devices not works in schroot
Date: Thu, 18 Jan 2024 08:56:29 +0100	[thread overview]
Message-ID: <30d89d27-4004-4f9c-8d3a-e8c466aaaa3f@siemens.com> (raw)
In-Reply-To: <398dbb64-03db-4922-b829-4cef9656804cn@googlegroups.com>

On 18.01.24 08:16, Srinuvasan Arjunan wrote:
> Hi All,
> 
>              Presently we migrated the chroot to sbuildchroot and one of
> my image creation part i try to mount some temporary file system as a
> loop device and do create volumes and other stuffs.
> 
> Here i could see am not able to mount the file system as a loop device
> specifically in chroot.
> 
> reproduce steps:
>  
> 1. chroot into the created session 
> 2. dd if=/dev/zero of=ext4.img bs=4k count=2048
> 3.mkfs.ext4 ext4.img
> 4. mnt=$(mktemp -d)
> 5.  mount -o loop 'ext4.img' "${mnt}"
> 
> when i mount this ext4.img as a loop devices it throws the below error:
> Error: "mount: /tmp/tmp.7oJoEpL0vt: mount failed: Operation not permitted." 
> 
> But the above steps are working fine in my host machine.
> 
> I hope we need to install the loop module in chroot or any other
> suggestion that would be helpful to mount loop devices in schroot sessions.
> 
> Note:  losetup also not works in schroot.
> 

I don't think you can run such stuff in the schroot, and you will surely
not be able to once we fully de-privilege the build. That's why I
suggested to you already to get rid of this loop-mount requirement.

Jan

-- 
Siemens AG, Technology
Linux Expert Center


  reply	other threads:[~2024-01-18  7:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  7:16 Srinuvasan Arjunan
2024-01-18  7:56 ` Jan Kiszka [this message]
2024-01-18  8:16   ` Srinuvasan Arjunan
2024-01-18  9:23     ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30d89d27-4004-4f9c-8d3a-e8c466aaaa3f@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=srinuvasanasv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox