public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Unable to build cdrom: failed to setup loop device
Date: Wed, 04 Sep 2024 21:38:30 +0200	[thread overview]
Message-ID: <EE4F8A89-AFAE-459E-AAF5-5C91A43C71EE@ipfire.org> (raw)
In-Reply-To: <18a10b9a984d69be92ff2ba7ded8d1cc39a2a531.camel@roevenslambrechts.be>

[-- Attachment #1: Type: text/plain, Size: 2938 bytes --]

Hello Robin,

> On 4 Sep 2024, at 20:53, Robin Roevens <robin.roevens(a)disroot.org> wrote:
> 
> Hi all
> 
> While trying to build ipfire, which always has worked quite effortless,
> it now fails while building cdrom:
> 
> ---
>    # Create the EFI Eltorito image
>    dd if=/dev/zero of=/tmp/cdrom/boot/isolinux/efiboot.img bs=1k
> count=2880
>    2880+0 records in
>    2880+0 records out
>    2949120 bytes (2.9 MB, 2.8 MiB) copied, 0.00453183 s, 651 MB/s
>    mkdosfs -F 12 -n "IPFIRE_EFI" /tmp/cdrom/boot/isolinux/efiboot.img
>    mkfs.fat 4.2 (2021-01-31)
>    # Mount the EFI image
>    mkdir -pv /tmp/efiboot.img
>    mkdir: created directory '/tmp/efiboot.img'
>    mount -o loop /tmp/cdrom/boot/isolinux/efiboot.img /tmp/efiboot.img
>    mount: /tmp/efiboot.img: failed to setup loop device for
> /tmp/cdrom/boot/isolinux/efiboot.img.
>    make: *** [cdrom:184: /usr/src/log/cdrom] Error 32
>    make: Leaving directory '/usr/src/lfs'
> 
> ERROR: Building cdrom                                                 
> [ FAIL ]
>    Check /home/robin/src/ipfire-sandbox/ipfire-
> 2.x/log_x86_64/_build.ipfire.log for errors if applicable             
> [ FAIL ]
> ---

What is the output of “losetup” after this fails?

> The logfile has no extra or new information.
> 
> When I manually try those steps, as root (as make.sh is also ran as
> root (using sudo)), they work correctly, and I'm able to successfully
> mount the image.

Does this also work in shell?

> 
> ---
> $ sudo dd if=/dev/zero of=./efiboot.img bs=1k count=2880 
> 2880+0 records gelezen
> 2880+0 records geschreven
> 2949120 bytes (2,9 MB, 2,8 MiB) gekopieerd, 0,0130511 s, 226 MB/s
> $ sudo ./build/sbin/mkdosfs -F 12 -n "IPFIRE_EFI" ./efiboot.img
> mkfs.fat 4.2 (2021-01-31)
> $ sudo mkdir ./efi
> $ sudo mount -o loop ./efiboot.img ./efi
> $ df -h ./efi                                                         
> Bestandssysteem Grootte Gebruikt Besch Geb% Aangekoppeld op
> /dev/loop15        2,8M        0  2,8M   0% /home/robin/src/ipfire-
> sandbox/ipfire-2.x/efi
> ---
> 
> So I'm unsure as of why the build fails setting up the loop device.
> I did a ./make.sh clean, but that didn't solve it.
> 
> If I try to mount the loop device as unprivileged user, I get the exact
> same error. But the build process is ran as root, so that should also
> not be the problem?

It creates new namespaces in which root is less privileged than in the first namespace.

> Has anyone an idea what could be wrong here? or give me some guidelines
> on how to debug this ? 
> I've read there where changes to the inner workings of the build
> system, could those be the cause ? I assume not as then I would have
> seen others complain about it here?

Apart from that, as Adolf requested, please provide us with some more information about your kernel and distribution.

-Michael

> Robin


  parent reply	other threads:[~2024-09-04 19:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 18:53 Robin Roevens
2024-09-04 19:04 ` Adolf Belka
2024-09-04 20:47   ` Robin Roevens
2024-09-04 21:33     ` Michael Tremer
2024-09-10 17:59       ` Robin Roevens
2024-09-11  9:43         ` Michael Tremer
2024-09-11 19:21           ` Robin Roevens
2024-09-12 12:59             ` Michael Tremer
2024-09-14 15:01               ` Robin Roevens
2024-09-16 17:17                 ` Michael Tremer
2024-09-04 19:38 ` Michael Tremer [this message]
2024-09-04 20:58   ` Robin Roevens
2024-09-04 21:35     ` Michael Tremer

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=EE4F8A89-AFAE-459E-AAF5-5C91A43C71EE@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /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