Package: util-linux
Version: 2.29.2-1
Severity: normal

Dear Maintainer,

i just upgraded & dist-upgraded from raspbian jessie to raspbian stretch 
but now i have an issue mounting multiple partitions of a disk image. the first 
is mounted well as usual.
(that issue was not present on debian jessie)

the mount option in /etc/fstab:
/x/2017-06-21-raspbian-jessie-lite.img  /media/boot  auto  
loop,ro,nofail,auto,offset=4194304  0  0
/x/2017-06-21-raspbian-jessie-lite.img  /media/root  auto  
loop,ro,nofail,auto,offset=48234496  0  0

the folders /media/boot and /media/root do exist.

when i try to mount all with mount -a, i get the folowing error message:
$ sudo mount -a
mount: /x/2017-06-21-raspbian-jessie-lite.img: overlapping loop device exists

in the man pages og mount i found that note:
$ man mount
       Since  util-linux  v2.29 mount command re-uses the loop device rather 
than initialize a new device if the same backing file is already used for some 
loop device with the same
       offset and sizelimit. This is necessary to avoid a filesystem corruption.

but this will not explain the error message, because i am using different 

the situation after the issue is:
only the first partition is mounted properly
$ sudo mount
/x/2017-06-21-raspbian-jessie-lite.img on /media/boot type vfat (ro,relatime...)

$ sudo losetup -a
/dev/loop0: []: (/x/2017-06-21-raspbian-jessie-lite.img), offset 4194304

when i change the mount options in the /etc/fstab, to use a specific loop 
device per mount entry, i still run into that issue:
/x/2017-06-21-raspbian-jessie-lite.img  /media/boot  auto  
loop=/dev/loop1,ro,nofail,auto,offset=4194304  0  0
/x/2017-06-21-raspbian-jessie-lite.img  /media/root  auto  
loop=/dev/loop2,ro,nofail,auto,offset=48234496  0  0

but when i do the same step by step (attaching a loop and mounting the loop) by 
hand, it works:
$ sudo losetup --offset 4194304 /dev/loo1 /x/2017-06-21-raspbian-jessie-lite.img
$ sudo mount /dev/loop1 /media/boot -o ro
$ sudo losetup --offset 48234496 /dev/loop2 
$ sudo mount /dev/loop2 /media/root -o ro

then the situation is as:
$ sudo losetup -a
/dev/loop1: [45826]:260076 (/x/2017-06-21-raspbian-jessie-lite.img), offset 
/dev/loop2: [45826]:260076 (/x/2017-06-21-raspbian-jessie-lite.img), offset 
$ sudo mount
/dev/loop1 on /media/boot type vfat (ro,relatime...)
/dev/loop2 on /media/root type vfat (ro,relatime...)

so the big question is, how can i mount the two partitions of the same disk 
image at the same time with using /etc/fstab and mount -a?

this is an issue on Debian Stretch and Raspbian Stretch.
it was not an issue on Debian Jessie and Raspbian Jessie.

-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1), LANGUAGE=de_DE 
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages util-linux depends on:
ii  libblkid1      2.29.2-1
ii  libc6          2.24-11+deb9u1
ii  libfdisk1      2.29.2-1
ii  libmount1      2.29.2-1
ii  libncursesw5   6.0+20161126-1
ii  libpam0g       1.1.8-3.6
ii  libselinux1    2.6-3+b1
ii  libsmartcols1  2.29.2-1
ii  libsystemd0    232-25+deb9u1
ii  libtinfo5      6.0+20161126-1
ii  libudev1       232-25+deb9u1
ii  libuuid1       2.29.2-1
ii  zlib1g         1:1.2.8.dfsg-5

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools          4.1-1
ii  kbd                 2.0.3-2+b1
ii  util-linux-locales  2.29.2-1

-- no debconf information

Reply via email to