[Bug 1282375] Re: trusty upgrade: grub-install fails with odd file error

medb idmedb at gmail.com
Sat Feb 22 08:42:21 UTC 2014


I had the same problem because the /boot/efi partition was formatted in
HFS+ file system. But grub-install doesn't allow this, even if it
mounted as read-write.

Previously the /usr/sbin/grub-install file was a script and I have commented this check. Now it's binary file so I can't do this.
Example of disabling efi partition check if /usr/sbin/grub-install file is script:

    if test -n "$efidir"; then
        efi_fs=`"$grub_probe" --target=fs "--device-map=${device_map}" "${e$
#       if test "x$efi_fs" = xfat; then :; else
#           gettext_printf "%s doesn't look like an EFI partition.\n" "${ef$
#           efidir=
#       fi
    fi

So I have come up with the next hack:
1. Backup all files from /boot/efi  partition
2. Format /boot/efi partition to FAT file system and mount it to the /boot/efi path
3. Copy all files backed up from the original  /boot/efi partition to the new one
4. Run `sudo grub-install` and `sudo dpkg --configure grub-efi-amd64`. Should complete successfully.
5. Backup all files from the /boot/efi  partition after successful grub upgrade/install
6. Format /boot/efi partition to HFS+ file system and mount it to the /boot/efi path
7. Copy all files backed up from the /boot/efi partition after grub upgrade/install to the new one
8. Update /etc/fstab to mount the /boot/efi partition during boot

-- 
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/1282375

Title:
  trusty upgrade: grub-install fails with odd file error

Status in “grub2” package in Ubuntu:
  Confirmed

Bug description:
  Grub-efi-amd64 package upgrade to trusty (from saucy) fails.  I get an
  odd error when running

  dpb at starbuck:grub-efi-amd64$ sudo apt-get -f install grub-efi-amd64
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  grub-efi-amd64 is already the newest version.
  The following packages were automatically installed and are no longer required:
    blt gnome-control-center-unity libalgorithm-c3-perl libamd2.2.0 libavformat53:i386 libboost-date-time1.53.0 libboost-iostreams1.53.0 libboost-python1.53.0 libboost-signals1.53.0 libboost-system1.53.0 libboost-thread1.53.0
    libcdt4 libcgraph5 libclass-c3-perl libclass-c3-xs-perl libcmis-0.3-3 libcolamd2.7.1 libcurl3-gnutls:i386 libdb5.1:i386 libebackend-1.2-6 libedata-book-1.2-17 libedata-cal-1.2-20 libexplain30 libfftw3-3 libfm-gtk-bin libgraph4
    libgvpr1 libgweather-3-3 libhud-client2 libllvm3.3 libllvm3.3:i386 libmng1:i386 libmro-compat-perl libpoppler43 libprocps0 libqpdf10 librhythmbox-core7 libseccomp1 libsecret-1-0:i386 libswscale2:i386 libtidy-0.99-0
    libumfpack5.4.0 libwebp4:i386 libwebp4 libxcb-sync0 linux-headers-3.10.0-0 linux-headers-3.10.0-0-generic linux-headers-3.10.0-1 linux-headers-3.10.0-1-generic linux-headers-3.10.0-2 linux-headers-3.10.0-2-generic
    linux-headers-3.10.0-3 linux-headers-3.10.0-3-generic linux-headers-3.11.0-11 linux-headers-3.11.0-11-generic linux-headers-3.11.0-12 linux-headers-3.11.0-12-generic linux-headers-3.11.0-4 linux-headers-3.11.0-4-generic
    linux-headers-3.11.0-9 linux-headers-3.11.0-9-generic linux-headers-3.9.0-7 linux-headers-3.9.0-7-generic linux-image-3.10.0-0-generic linux-image-3.10.0-1-generic linux-image-3.10.0-2-generic linux-image-3.10.0-3-generic
    linux-image-3.11.0-11-generic linux-image-3.11.0-12-generic linux-image-3.11.0-4-generic linux-image-3.11.0-9-generic linux-image-3.9.0-7-generic linux-image-extra-3.11.0-12-generic openbox-themes openjdk-7-jre-lib python-apsw
    python-beautifulsoup python-imaging-compat python-utidylib vgabios
  Use 'apt-get autoremove' to remove them.
  0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
  1 not fully installed or removed.
  After this operation, 0 B of additional disk space will be used.
  Do you want to continue? [Y/n]
  Setting up grub-efi-amd64 (2.02~beta2-6) ...
  Installing for x86_64-efi platform.
  grub-install: error: Can't create file: No such file or directory.
  dpkg: error processing package grub-efi-amd64 (--configure):
   subprocess installed post-installation script returned error exit status 1
  Errors were encountered while processing:
   grub-efi-amd64
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  Then, I follow-on with:

  # grub-install
  grub-install: error: Can't create file: No such file or directory.

  I will attach the -v output to the bug, I'm afraid it doesn't shed any
  more light on the problem for me.

  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: grub-efi-amd64 2.02~beta2-6
  ProcVersionSignature: Ubuntu 3.11.0-15.25-generic 3.11.10
  Uname: Linux 3.11.0-15-generic x86_64
  NonfreeKernelModules: wl
  ApportVersion: 2.13.2-0ubuntu5
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Wed Feb 19 20:46:54 2014
  InstallationDate: Installed on 2012-03-27 (694 days ago)
  InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Beta amd64+mac (20120327.1)
  SourcePackage: grub2
  UpgradeStatus: Upgraded to trusty on 2014-02-18 (1 days ago)

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



More information about the foundations-bugs mailing list