[Bug 1762920] [NEW] casper-helpers:try_mount doesn't honor the mount point

Tomo 1762920 at bugs.launchpad.net
Wed Apr 11 06:15:21 UTC 2018


Public bug reported:

I apologize for direct mentioning to the source codes.
Problem:
 try_mount() in casper-helpers script doesn't honor the mount-point parameter when mount-option != "ro".
 This is obvious on code, but it wouldn't what it meant to be.
 I guess,
   if the device is already mounted on A, and
     if the indicated mount point of which is the same as previous mounted (i.e. A; where_is_mounted() says),
      do  mount -o remount ...
   else
      do  mount -o bind ...
   whatever the indicated mount options are.

  This spec suffers in the case, 
   setting persistence YES, boot media, especially USB, is multi-partitioned, and persistence data are on separated part from the base boot image.
      In that case, find_cow_device() falsely unmount /cdrom (because where_is_mounted() says '/cdrom' was
   previous mount point in the device searching iteration) and gone busybox prompt.
  There might be a fix find_cow_device() itself but, I thought that try_mount() is fundamental.

A patch attached is a sample to solve this.

** Affects: casper (Ubuntu)
     Importance: Undecided
         Status: New

** Patch added: "PATCH: casper-helpers try_mount() diff"
   https://bugs.launchpad.net/bugs/1762920/+attachment/5110182/+files/casper-helpers.diff.report

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/1762920

Title:
  casper-helpers:try_mount doesn't honor the mount point

Status in casper package in Ubuntu:
  New

Bug description:
  I apologize for direct mentioning to the source codes.
  Problem:
   try_mount() in casper-helpers script doesn't honor the mount-point parameter when mount-option != "ro".
   This is obvious on code, but it wouldn't what it meant to be.
   I guess,
     if the device is already mounted on A, and
       if the indicated mount point of which is the same as previous mounted (i.e. A; where_is_mounted() says),
        do  mount -o remount ...
     else
        do  mount -o bind ...
     whatever the indicated mount options are.

    This spec suffers in the case, 
     setting persistence YES, boot media, especially USB, is multi-partitioned, and persistence data are on separated part from the base boot image.
        In that case, find_cow_device() falsely unmount /cdrom (because where_is_mounted() says '/cdrom' was
     previous mount point in the device searching iteration) and gone busybox prompt.
    There might be a fix find_cow_device() itself but, I thought that try_mount() is fundamental.

  A patch attached is a sample to solve this.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1762920/+subscriptions



More information about the foundations-bugs mailing list