[Bug 673438] Re: update-grub: cannot restore the original directory
cd /tmp also helps -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/673438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
I can reproduce it with `grub-efi 2.04-1ubuntu26.7` $ apt-cache policy grub-efi grub-efi: Installed: 2.04-1ubuntu26.7 Candidate: 2.04-1ubuntu26.7 Version table: *** 2.04-1ubuntu26.7 500 500 http://mirror.yandex.ru/ubuntu focal-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.04-1ubuntu26.2 500 500 http://mirror.yandex.ru/ubuntu focal-security/main amd64 Packages 500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 2.04-1ubuntu26 500 500 http://mirror.yandex.ru/ubuntu focal/main amd64 Packages $ lsb_release -a LSB Version: core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch Distributor ID: Ubuntu Description:Ubuntu 20.04.1 LTS Release:20.04 Codename: focal -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/673438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: grub2 (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/673438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
A nicer error message would be nice. Or use /tmp for tempfiles instead of current working directory. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/673438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
@Yozen, thanks for adding that comment that was exactly what was happening to me, as I was receiving the same described failure message. I was attempting to run sudo update-grub from my nfs mounted home at work. I cd'd into /tmp and re-ran the command and it completed without any issues. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/673438/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
Not sure if this is your problem Martin, but this could happen if you are updating grub-pc, or running update-grub, as a user with a Kerberized NFS home directory. If you are anywhere in the home directory, and use sudo to run those commands, then you will get errors like the above (if local root is not given root privileges on the NFS mount). I just encountered this bug myself and it prevented grub-pc from updating. This shouldn't be a show-stopper: grub-pc should report that grub was installed correctly and just print a warning that it couldn't cd back to the original directory, as other packages seem to do. For example, openoffice.org-emailmerge didn't fail, but just said this: Setting up openoffice.org-emailmerge (1:3.2.0-7ubuntu4.2) ... cd: 84: can't cd to /home/yozen and continued. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/673438 Title: update-grub: cannot restore the original directory -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 673438] Re: update-grub: cannot restore the original directory
That sounds like you were running update-grub from a directory that had been removed. Try making sure that the directory exists first (e.g. run 'cd $PWD', which will fail in much the same kind of way if that isn't the case). The package you probably have installed is 'grub-pc'. grub2 is a metapackage, and you don't have to have it installed. -- update-grub: cannot restore the original directory https://bugs.launchpad.net/bugs/673438 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs