From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7325333789757931520 Date: Wed, 17 Jan 2024 23:16:21 -0800 (PST) From: Srinuvasan Arjunan To: isar-users Message-Id: <398dbb64-03db-4922-b829-4cef9656804cn@googlegroups.com> Subject: mount loop devices not works in schroot MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_15694_1679066301.1705562181210" X-TUID: QUcH0je5EgLZ ------=_Part_15694_1679066301.1705562181210 Content-Type: multipart/alternative; boundary="----=_Part_15695_2025663429.1705562181210" ------=_Part_15695_2025663429.1705562181210 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. Many thanks, Srinu ------=_Part_15695_2025663429.1705562181210 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi All,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Presently we migrated the chroot to sbuildchroot and one of my image cre= ation part i try to mount some temporary file system as a loop device and d= o create volumes and other stuffs.

Here i could = see am not able to mount the file system as a loop device specifically in c= hroot.

reproduce steps:
=C2=A0
1. chroot into the created session=C2=A0
2.=C2=A0dd if=3D/dev/= zero of=3Dext4.img bs=3D4k count=3D2048
3.mkfs.ext4 ext4.img
4.=C2=A0mnt=3D$(mktemp -d)
5.=C2=A0=C2=A0mount -o loop 'ext= 4.img' "${mnt}"

when i mount this ext4.img as a = loop devices it throws the below error:
Error: "mount: /tmp/tmp.7= oJoEpL0vt: mount failed: Operation not permitted."=C2=A0

But the above steps are working fine in my host machine.

I hope we need to install the loop module in chroot or an= y other suggestion that would be helpful to mount loop devices in schroot s= essions.

Note:=C2=A0 losetup also not works in s= chroot.

Many thanks,
Srinu
<= br />


------=_Part_15695_2025663429.1705562181210-- ------=_Part_15694_1679066301.1705562181210--