0

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 also tried this with the boot-repair CD, but it gave the same errors)

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

3 Answers 3

0

This error means your system has a deep dpkg problem. If I were you, I would simply reinstall the system files this way: https://help.ubuntu.com/community/UbuntuReinstallation

0

In your terminal do the following:

sudo gedit /etc/default/grub

Search for the line: "quiet splash" and change it to "quiet splash nomodeset"; then,

sudo update-grub

sudo echo FRAMEBUFFER=y > /etc/initramfs-tools/conf.d/splash sudo update-initramfs -u
3
  • When I run sudo updat-grub I get this: /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). Jun 17, 2012 at 8:23
  • Ok. First run: mount dev/sda5 then run those commands. I'm assuming sda5 is your ubuntu hard drive.
    – upapilot
    Jun 17, 2012 at 8:46
  • I already tried that but then i got this error: mount: can't find dev/sda5 in /etc/fstab or /etc/mtab; But I managed to mount it by clicking on '36 GB fileystem' in devices section of the "file explorer"; $mount dev/sda5; according to mtab, /dev/sda5 is already mounted on /media/8bda7c6d-bdb1-4ecd-b17d-4ab94c64eb2a; But when running sudo update-grub, I still get the same error... Jun 17, 2012 at 8:56
0

Maybe this would help: try the boot repair CD.Boot with this CD and let repair the program your grub. https://help.ubuntu.com/community/Boot-Repair

1
  • I tried, the program starts in LXDE, and then asks me the same as it did when I run it on Ubuntu (by running ubuntu from usb). I run the commands in the LXTerminal, and the second command still gives the same error... Jun 17, 2012 at 10:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .