[unpackfs] Do not use -o loop
on a device
src/modules/unpackfs/main.py (UnpackOperation.mount_image): Check whether entry.source is a regular file or a device and only use `-o loop` on regular files, not devices. At least on Fedora >= 29, `-o loop` fails on the read-only device `/dev/mapper/live-base` (though `-o loop,ro` would be accepted).
This commit is contained in:
parent
02c7fe8345
commit
71d991e2e4
@ -7,6 +7,7 @@
|
||||
# Copyright 2014, Daniel Hillenbrand <codeworkx@bbqlinux.org>
|
||||
# Copyright 2014, Philip Müller <philm@manjaro.org>
|
||||
# Copyright 2017, Alf Gaida <agaida@siduction.org>
|
||||
# Copyright 2019, Kevin Kofler <kevin.kofler@chello.at>
|
||||
#
|
||||
# Calamares is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -252,13 +253,19 @@ class UnpackOperation:
|
||||
subprocess.check_call(["mount",
|
||||
"--bind", entry.source,
|
||||
imgmountdir])
|
||||
else:
|
||||
elif os.path.isfile(entry.source):
|
||||
subprocess.check_call(["mount",
|
||||
entry.source,
|
||||
imgmountdir,
|
||||
"-t", entry.sourcefs,
|
||||
"-o", "loop"
|
||||
])
|
||||
else: # entry.source is a device
|
||||
subprocess.check_call(["mount",
|
||||
entry.source,
|
||||
imgmountdir,
|
||||
"-t", entry.sourcefs
|
||||
])
|
||||
|
||||
def unpack_image(self, entry, imgmountdir):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user