Boot-repair commands not found in PATH or not executable

Posted by Bram Meerten on Ask Ubuntu See other posts from Ask Ubuntu or by Bram Meerten
Published on 2012-06-17T08:10:49Z Indexed on 2012/06/17 9:22 UTC
Read the original article Hit count: 445

Filed under:

I recently had problems with my ubuntu partition (after the battery died), I managed to fix them by running ubuntu from usb and run gparted. It worked I can access my files on the partition by running ubuntu from usb. But when I restart the computer, after selecting ubuntu in Grub, I get a black screen with a white underscore.

I googled the problem, and tried to solve it by setting nomodeset, but it didn't work.

Next I wanted to try to fix Grub using boot-repair, I clicked on 'Recommended repair', it tells me to type the following commands in the terminal:

sudo chroot "/mnt/boot-sav/sda5" apt-get install -fy
sudo chroot "/mnt/boot-sav/sda5" dpkg --configure -a
sudo chroot "/mnt/boot-sav/sda5" apt-get purge -y --force-yes grub-common

But when running the second command, I get this error:

dpkg: warning: 'sh' not found in PATH or not executable.
dpkg: warning: 'rm' not found in PATH or not executable.
dpkg: warning: 'tar' not found in PATH or not executable.
dpkg: error: 3 expected programs not found in PATH or not executable.
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.

I didn't edit /etc/environment (or any other files), this is what it looks like:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
RUNNING_UNDER_GDM="yes"

I have no idea how to fix this. I'm running dualboot Ubuntu 12.04 and Windows 7, Windows boots fine.

© Ask Ubuntu or respective owner

Related posts about boot-failure