[Bug 1130996] Re: grub-install --boot-directory should sanity-check for existence of directory

Marcus Tomlinson marcus.tomlinson at canonical.com
Thu Mar 5 13:03:26 UTC 2020


This release of Ubuntu is no longer receiving maintenance updates. If
this is still an issue on a maintained version of Ubuntu please let us
know.

** Changed in: grub2 (Ubuntu)
       Status: New => Incomplete

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

Title:
  grub-install --boot-directory should sanity-check for existence of
  directory

Status in grub2 package in Ubuntu:
  Incomplete

Bug description:
  When running grub-install with the --boot-directory flag, grub-install
  does not check to see if the given directory exists, and passes it to
  grub-probe, which then gives a cryptic, misleading (some would say
  false and inaccurate) error message, and fails.  An improved approach
  would be something like the following in /usr/lib/grub/i386-pc/grub-
  install:

  if [ ! -d "${bootdir}" ]; then
          echo >&2 "Boot directory ${bootdir} not found."
          exit 1
  fi

  Here is the current behavior of grub-install if --boot-directory does not exist:
  $> grub-install --boot-directory /media/does-not-exist/boot /dev/sdd
  /usr/sbin/grub-probe: error: no such disk.
  Auto-detection of a filesystem of /dev/mapper/volgroup0-root failed.
  Try with --recheck.
  If the problem persists please report this together with the output of "/usr/sbin/grub-probe --device-map="/media/slitaz-th_/boot/grub/device.map" --target=fs -v /media/slitaz-th_/boot/grub" to <bug-grub at gnu.org>

  Additional info:
  grub-common 1.99-21ubuntu3
  Linux hostname 3.2.0-37-generic #58-Ubuntu SMP Thu Jan 24 15:28:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

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



More information about the foundations-bugs mailing list