Bug 1707389 - "losetup: cannot find an unused loop device: No such device" after installer stage2 is downloaded
Summary: "losetup: cannot find an unused loop device: No such device" after installer ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 33
Hardware: Unspecified
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2019-05-07 12:25 UTC by IBM Bug Proxy
Modified: 2021-11-30 18:53 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-30 18:53:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
sample kickstart file that matches the command line (174 bytes, application/octet-stream)
2019-05-07 12:25 UTC, IBM Bug Proxy
no flags Details
install log (505.27 KB, text/plain)
2019-07-04 12:05 UTC, Tomas
no flags Details
lsmod (2.39 KB, text/plain)
2019-07-04 12:31 UTC, Tomas
no flags Details


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 177430 0 None None None 2019-07-31 06:18:10 UTC

Description IBM Bug Proxy 2019-05-07 12:25:25 UTC

Comment 1 IBM Bug Proxy 2019-05-07 12:25:32 UTC
When I install fedora 30 via virt-install on a fedora 29 host 
I get the following error:

[    8.430263] dracut-initqueue[859]:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[    8.430360] dracut-initqueue[859]:                                  Dload  Upload   Total   Spent    Left  Speed
[    8.925254] random: crng init done
[    8.925257] random: 7 urandom warning(s) missed due to ratelimiting
100  355M  100  355M    0     0   193M      0  0:00:01  0:00:01 --:--:--  193M
[   10.380433] dracut-initqueue[859]: losetup: cannot find an unused loop device: No such device
[   10.381147] dracut-initqueue[859]: losetup: /tmp/curl_fetch_url1/install.img: failed to use device: No such device
[   10.382993] dracut-initqueue[859]: mount: /run/initramfs/squashfs: can't find in /etc/fstab.
[   10.383220] dracut: FATAL: Failed to find a root filesystem in /tmp/curl_fetch_url1/install.img.
[   10.383227] dracut: Refusing to continue
[   10.416359] dracut-initqueue[859]: RTNETLINK answers: File exists
[   10.575848] printk: systemd-shutdow: 23 output lines suppressed due to ratelimiting
[   10.581250] systemd-shutdown[1]: Syncing filesystems and block devices.
[   10.581500] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   10.591371] systemd-journald[211]: Received SIGTERM from PID 1 (systemd-shutdow).
[   10.656100] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   10.657432] systemd-shutdown[1]: Unmounting file systems.
[   10.657890] [1296]: Remounting '/var/lib/nfs/rpc_pipefs' read-only in with options '(null)'.
[   10.658354] [1297]: Unmounting '/var/lib/nfs/rpc_pipefs'.
[   10.658840] [1298]: Remounting '/' read-only in with options 'size=1006200k,nr_inodes=251550'.
[   10.659223] systemd-shutdown[1]: All filesystems unmounted.
[   10.659226] systemd-shutdown[1]: Deactivating swaps.
[   10.659236] systemd-shutdown[1]: All swaps deactivated.
[   10.659238] systemd-shutdown[1]: Detaching loop devices.
[   10.659298] systemd-shutdown[1]: All loop devices detach


Machine Type = IBM z 
 
---boot type---
virt-install
 
--- cmdline used to launch install---
virt-install --name s38kvm12 --disk size=12,cache=none,io=native --memory=2048 --vcpus=2 --location  https://download.fedoraproject.org/pub/fedora-secondary/releases/30/Server/s390x/os --initrd-inject=/home/cborntra/s38kvm12.ks --extra-args 
 

If I do not use a kickstart file installation works.

The same kickstart file and command line does work fine with a f29 installation source.

---Install repository type---
Internet repository
 
---Install repository Location---
https://download.fedoraproject.org/pub/fedora-secondary/releases/30/Server/s390x/os
 
---Point of failure---
Other failure during installation (stage 1)

even trivial kickstart files like
---
text
----

will be enough to trigger the failure.


Fyi ... 
... the kickstart file itself does not matter. Even an incredible simple one (just containing one line) is enough. It seems that just the existence of a kickstart file is triggering the problem.

As the system shuts down after that (and it does not write any data on the disk) I can not provide any further data.

The problem is really simple to reproduce:
1. Have Fedora29 on the host (with kvm and virt-install)
2. run
virt-install --name test --disk size=12 --memory=2048 --vcpus=2 --location https://download.fedoraproject.org/pub/fedora-secondary/releases/30/Server/s390x/os --initrd-inject=/home/cborntra/test.ks --extra-args "inst.ks=file:///test.ks"


Using
https://download.fedoraproject.org/pub/fedora-secondary/releases/29/Server/s390x/os
instead of 
https://download.fedoraproject.org/pub/fedora-secondary/releases/30/Server/s390x/os
works fine ....

Comment 2 IBM Bug Proxy 2019-05-07 12:25:42 UTC
Created attachment 1565159 [details]
sample kickstart file that matches the command line

Comment 3 Dan Horák 2019-05-07 12:55:01 UTC
Thanks for the report. I haven't seen problems when kickstart is accessed over http from a remote location, so this might be related to the injected ks file.

Comment 4 Dan Horák 2019-05-09 12:38:04 UTC
I couldn't reproduce the failure on my ppc64le F-30 workstation, so I wonder if this is really s390x specific.

Comment 5 Dan Horák 2019-05-09 14:47:08 UTC
can't reproduce on a RHEL 8 host (which is a z/VM guest), I wonder if it could be some timing issue, 

[   10.380433] dracut-initqueue[859]: losetup: cannot find an unused loop device: No such device

points to a problem with loop devices in the kernel.

Comment 6 IBM Bug Proxy 2019-05-14 15:20:30 UTC
------- Comment From cborntra.com 2019-05-14 11:18 EDT-------
Turns out that I can only reproduce this with a user on the host, with root it seems to work. Will investigate if this is a timing issue or a setup problem,

Comment 7 IBM Bug Proxy 2019-05-17 11:20:28 UTC
------- Comment From cborntra.com 2019-05-17 07:19 EDT-------
So I reinstalled the host and now the problem is gone. So I guess it is
a. some configuration issue that is now solved
b. really a timing issue

Comment 8 Dan Horák 2019-05-17 13:47:57 UTC
Thanks for the update.

Comment 9 Tomas 2019-07-04 12:05:05 UTC
Created attachment 1587367 [details]
install log

Comment 10 Tomas 2019-07-04 12:07:08 UTC
I'm running into the same bug while installing f30 on x86 vm via 

virt-install --connect qemu:///system --name fedora --ram 5000 --arch x86_64 --os-type linux --os-variant fedora28 --disk fedora.qcow2,size=15 --location=https://dl.fedoraproject.org/pub/fedora/linux/releases/30/Everything/x86_64/os --initrd-inject ./f30-x86_64.ks --extra-args=inst.ks=file:/f30-x86_64.ks console=ttyS0 rd.debug rd.shell --nographics --boot uefi --check path_in_use=off

Please see install.log attached.

Using f29 url in --location works as expected

Comment 11 Dan Horák 2019-07-04 12:13:21 UTC
Thanks for the details. Lets reopen it, assign to dracut and drop the s390x specifics. Because it sounds like something is wrong with the dracut environment, the stage2 image downloaded too fast/early?

Comment 12 Tomas 2019-07-04 12:31:12 UTC
Created attachment 1587368 [details]
lsmod

Comment 13 Tomas 2019-07-04 12:35:04 UTC
I tried this in the emergency shell:

dracut:/# losetup -f
losetup: cannot find an unused loop device: No such device
dracut:/# modprobe loop
[  922.012119] loop: module loaded
dracut:/# losetup -f
/dev/loop0

looks like loop module isn't loaded (see lsmod attached)

Comment 14 Dan Horák 2019-07-04 12:39:13 UTC
Hmm, could it be a missing dependency between some systemd units?

Comment 15 Tomas 2019-07-04 22:52:49 UTC
As a workaround I've aded "rd.driver.pre=loop" (note driver has to be loaded as part of .pre) to my cmdline, i.e: 

virt-install --connect qemu:///system --name fedora --ram 5000 --arch x86_64 --os-type linux --os-variant fedora28 --disk fedora.qcow2,size=15 --location=http://192.168.122.1:8000/30/x86_64 --initrd-inject ./f30-x86_64.ks --extra-args=inst.ks=file:/f30-x86_64.ks console=ttyS0 rd.driver.pre=loop rd.debug rd.shell --nographics --boot uefi --check path_in_use=off

works for both f30 and rawhide

Comment 16 Tomas 2019-07-05 00:39:01 UTC
This is not limited to x86_64 as I've reproduced it on aarch64 (VM via libvirt), fair to assume other architectures are affected too...

Comment 17 Dan Horák 2019-07-24 13:51:26 UTC
Uff, getting it now all the time when trying to create installer image for rawhide on s390x with lorax in a rawhide chroot, host is an up-to-date F-30.
On the F-30 host issuing "losetup -f" loads the loop module and returns /dev/loop0. I think I need to pass /dev/loop-control to the chroot somehow ...

Comment 18 Dan Horák 2019-07-24 17:48:48 UTC
So the case with chroot is caused by using the nspawn mode in mock, all works well in classic chroot mode.

Comment 19 Ben Cotton 2019-08-13 16:57:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 20 Ben Cotton 2019-08-13 18:56:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 21 JianHong Yin 2019-10-30 09:12:58 UTC
hit same issue when  kickstart install Fedora 31 released

'''
 dracut-initqueue[860]: losetup: cannot find an unused loop device: No such device
'''

Comment 22 James Szinger 2020-10-20 20:16:21 UTC
I just encountered this with Fedora 33 beta.  I’m using virt-install similar to comments 10 and 15.  Adding rd.driver.pre=loop to --extra-args allows the installation to complete.

Please update the version to Fedora 33.

Comment 23 Dan Horák 2020-10-28 09:40:55 UTC
moving to F-33 ...

Comment 24 Ben Cotton 2021-11-04 13:54:40 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 25 Ben Cotton 2021-11-04 14:24:06 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 26 Ben Cotton 2021-11-04 15:21:44 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 27 Ben Cotton 2021-11-30 18:53:54 UTC
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.