GithubHelp home page GithubHelp logo

Comments (10)

JohnTheCoolingFan avatar JohnTheCoolingFan commented on June 18, 2024 1

mknod does get called in check_loop_device, but only with a "found" device, not for creating a missing device. I am putting together a fix for this and will make a PR.

from build.

github-actions avatar github-actions commented on June 18, 2024

Jira ticket: AR-2132

from build.

JohnTheCoolingFan avatar JohnTheCoolingFan commented on June 18, 2024

It looks like the script needs to call sudo losetup -f at least once to make sure there is an available device existing. On my machine, there are no devices that match the pattern of /dev/loopX[Y], just /dev/loop-control. After calling the aforementioned command /dev/loop0 appeared. After doing that, I managed to build an image.

from build.

pessimism avatar pessimism commented on June 18, 2024

It looks like the commit to fix this issue got reverted:
7da42c8

FYI this issue also affects Fedora the same way, only /dev/loop-control present and an losetup -f run needed.

from build.

JohnTheCoolingFan avatar JohnTheCoolingFan commented on June 18, 2024

Yes, the commit got reverted until a better solution is made. And thanks for reporting that this is also the case on Fedora, it's probably much easier to test with for others than gentoo

from build.

tjhexf avatar tjhexf commented on June 18, 2024

Happening to me under Fedora, any updates?

from build.

tdleiyao avatar tdleiyao commented on June 18, 2024

manjaro seems to have the same problem

from build.

JohnTheCoolingFan avatar JohnTheCoolingFan commented on June 18, 2024

My previous attempted solution was calling sudo losetup -f in the script always, but it's problematic because you can't always expect the user to authorize sudo use. It needs to be called on the host and not inside of docker. Sure, you can do this manually, but the script exists for automating it.
So I propose this mechanism: check for /dev/loop0 to exist, if it's not there, prompt the user whether to call the sudo command from the script, proceed anyway or possibly have the user running the command manually, or abort the process.

from build.

rpardini avatar rpardini commented on June 18, 2024

@JohnTheCoolingFan you can check if inside Docker (where it is always root) or not and adapt. What we can't have is it calling losetup in the outer host in the re-launching scenario (consider armbian/build can run the outer host on MacOS/Darwin and the relaunched in Linux on a VM, as is the case with developers using Intel and Apple Silicon Macs with Docker Desktop / Rancher Desktop / Podman Desktop etc).

from build.

JohnTheCoolingFan avatar JohnTheCoolingFan commented on June 18, 2024

My current local fix for this is a script in userpatches/extensions/losetup.sh:

function add_host_dependencies__losetup(){
	if [[ ! -e /dev/loop0 ]]; then
		local sudo_prefix="" && is_root_or_sudo_prefix sudo_prefix
		${sudo_prefix} losetup -f
	fi
}

from build.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.