[Cinnamon] INSTALLATION: /isodevice (as a mounted directory) locks a partition even if it is not listed by 'mount'

オープン
#51 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
18/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

Reproduction is a full ISO-boot/install cycle on real hardware or a VM with an ISO stored on the target partition, so it is heavy for a newcomer. Start by reading how the installer detects and unmounts partitions in use (the Ubiquity Python sources around partition/mount handling and the /isodevice handling in the casper/installer scripts), then compare Mint 20.3 and 21 behaviour. Done means formatting the partition that held the ISO no longer fails because the installer still holds a mount or loop device on it.

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
This occurs when installing from an iso file located in the same partition that will be formatted (e.g. as root or as boot) and installed.

The following procedure worked with linuxmint-20.3-cinnamon-64bit.iso.

I have been updating my systems this way so far. In brief, copying the iso file to /boot/grml or to /boot/boot-isos.
An entry could be added manually to grub, but I have been using the 'grml-rescueboot' package (installed from the repository with apt install) or booting from USB with Super Grub Disk.
In the boot sequence, in the ISO grub menu, edit the entry (pressing 'e') and add 'toram' to the 'linux' line and then boot ('F10').
After complete boot, in a terminal, losetup showed a loop for the iso file in the isodevice (the partition that contained the iso file) and mount showed /isodevice mount pointing to the partition (MOUNT DOES NOT SHOW THIS LINE ANY MORE IN MINT 21).
Then I deleted the loop (with losetup -d) and afterwards unmounted /isodevice (IN MINT 21 THIS PRODUCES AND ERROR BECAUSE THERE IS NOT SUCH MOUNT).
After that, I could install normally, formatting the partition that contained the iso file (NOT ANY MORE, NOW IT STOPS WITH AN ERROR BECAUSE THE PARTITION IS USED BY THE SYSTEM).

To Reproduce
Steps to reproduce the behavior:

  1. COPY THE ISO FILE TO THE DESTINATION PARTITION AND INCLUDE IT IN GRUB
sudo apt install grml-rescueboot 
sudo cp /media/user/EXTERNAL/boot-isos/linuxmint-21-cinnamon-64bit-beta.iso /boot/grml/
sudo update-grub

Alternatively a manual entry in the grub menu could be added:

menuentry "Grml Rescue System (linuxmint-21-cinnamon-64bit-beta.iso)" {
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-baremetal=ahci0,gpt5  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
        else
          search --no-floppy --fs-uuid --set=root xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
        fi
        iso_path="/boot/grml/linuxmint-21-cinnamon-64bit-beta.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/linuxmint-21-cinnamon-64bit-beta.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}

  1. REBOOT AND SELECT GRUB ENTRY "Grml Rescue System (linuxmint-21-cinnamon-64bit-beta.iso)"
  2. IN THE NEXT GRUB MENU (THE ONE OF THE ISO FILE) EDIT THE FIRST ENTRY
    Press 'e'.
    Add 'toram' to the 'linux' line. And press 'F10'
linux  /casper/vmlinuz file=/cdrom/pressed/linuxmint.seed boot=casper iso-scan/filename=${iso_path} toram quiet splash --
  1. AFTER BOOTING, IN A TERMINAL WINDOW, TYPE:
mint@mint:~$ losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                         DIO LOG-SEC
/dev/loop1
             0      0         0  0 /cdrom/casper/filesystem.squashfs   0     512
/dev/loop0
             0      0         0  0 /isodevice/boot/grml/linuxmint-21-cinnamon-64bit-beta.iso
                                                                       0     512
mint@mint:~$ sudo losetup -d /dev/loop0
mint@mint:~$ mount
[[/isodevice IS NOT LISTED]]
mint@mint:~$ sudo umount /isodevice
umount: /isodevice: no mount point specified.
mint@mint:~$ 
  1. INSTALL ON SDA5, AN ERROR IS RAISED
    ROOT_PARTITION_FORMAT
    ERROR
  2. THE PARTITION IS BUSY. CONFIRMED IN GPARTED
    GPARTED_ERROR

Expected behavior
To work as it did with linuxmint-20.3-cinnamon-64bit.iso.
Everything works the same for 1, 2, and 3.
4. AFTER BOOTING, IN A TERMINAL WINDOW, TYPE:

mint@mint:~$ losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                         DIO LOG-SEC
/dev/loop1
             0      0         0  0 /cdrom/casper/filesystem.squashfs   0     512
/dev/loop0
             0      0         0  0 /isodevice/boot/grml/linuxmint-20.3-cinnamon-64bit.iso
                                                                       0     512
mint@mint:~$ sudo losetup -d /dev/loop0
mint@mint:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=1904916k,nr_inodes=476229,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=390432k,mode=755)
/dev/sda5 on /isodevice type ext4 (rw,relatime)
/dev/shm on /cdrom type tmpfs (rw,relatime,size=2307212k)
/dev/loop1 on /rofs type squashfs (ro,noatime)
[[... EDITED FOR BREVITY]]
mint@mint:~$ sudo umount /isodevice
mint@mint:~$ 
  1. INSTALL ON SDA5 WORKS FLAWLESSLY
    ROOT_PARTITION_FORMAT
主要言語
Python
スター
58
フォーク
57
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/ubiquity のほかの issue

linuxmint/ubiquity の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。