Fails when mount point has a space

Bug #433910 reported by Richard G. Clegg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-prober (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Binary package hint: os-prober

System is karmic koala.

OS prober does not detect a mounted file system when the mount point contains a space

richard@gormenghast:~$ sudo mount /dev/sda3 /media/tmp
richard@gormenghast:~$ sudo os-prober
/dev/sda3:Microsoft Windows XP Professional:Windows:chain
richard@gormenghast:~$ sudo umount /media/tmp
richard@gormenghast:~$ sudo mount /dev/sda3 /media/main\ disk
richard@gormenghast:~$ sudo os-prober
ls: cannot access /media/main040disk: No such file or directory
ls: cannot access /media/main040disk: No such file or directory
ls: cannot access /media/main040disk: No such file or directory
ls: cannot access /media/main040disk: No such file or directory

Related branches

Colin Watson (cjwatson)
Changed in os-prober (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package os-prober - 1.34

---------------
os-prober (1.34) unstable; urgency=low

  * Only look for a smart version of mount if we're using busybox mount. In
    a normal system, mount probably already handles labels and UUIDs, and
    using mount from another filesystem is risky enough that it's worth
    avoiding if possible.
  * Memoise calls to 'basename $0' in log function.
  * Handle escaped special characters in /etc/fstab and /proc/mounts
    (LP: #433910).
  * dash defines test's -nt operator differently from bash, as it's entitled
    to do since this is an extension not defined in POSIX. If file1 exists
    and file2 does not, bash returns true but dash returns false. Don't rely
    on bash's behaviour when checking whether to use GRUB Legacy or GRUB 2
    configuration files, otherwise we end up using neither when only one set
    of configuration exists and /bin/sh is dash.
  * Try to map LABEL= and UUID= ourselves in linux_mount_boot rather than
    relying on mount to do it, to further reduce the chance that we need to
    use mount from another filesystem.
  * If the filesystem identified by linux-boot-prober as /boot is already
    mounted somewhere else, then bind-mount it rather than trying to mount
    it again.

 -- Colin Watson <email address hidden> Tue, 22 Sep 2009 10:30:45 +0100

Changed in os-prober (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
caludo (b-l-e-y) wrote :

Hi.

There's still a problem with spaces in the mounted/20microsoft script because of missing quotes.

------ snip ----
# MS-DOS
elif [ -d "$(item_in_dir dos $2)" ]; then
------ snip ----

Running "sudo os-prober" with an partition mounted on e.g. /media/foo bar" results in

ls: cannot access /media/foo: No such file or directory

You need to add quotes around the $2 variable in order to get this to work.

Regards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.