Grub Customizer, update-grub command not found

Asked by Stan Kapelkin

Ok, i've been struggling with this for couple of days now, googled everything I could, but still can't find an answer. When I lunch Grub Customizer in Ubuntu 10.04, i get this error message:

grub-mkconfig couldn't be executed successfully.
error message:
sudo: update-grub#: command not found

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stan Kapelkin (slavyan) said :
#1

My bad, I'm running it in Ubuntu 12.04

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#2

The proper way to update the grub,cfg file is with the following command
sudo update-grub

Revision history for this message
Jeet (gour-jitendrasingh) said :
#3

is the same for 12.04

sudo grub-mkconfig
sudo grub-update

what is the output of lb_release -a; uname -a

thanks

Revision history for this message
Stan Kapelkin (slavyan) said :
#4

That's the whole problem, the sudo update-grub does not work, it keep giving me this error:
sudo: update-grub#: command not found

Revision history for this message
Stan Kapelkin (slavyan) said :
#5

btw, the uname -a gives me this:
Linux kristina-VGN-NW125J 3.2.0-24-generic-pae #37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012 i686 i686 i386 GNU/Linux

Revision history for this message
Stan Kapelkin (slavyan) said :
#6

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
Codename: precise

Revision history for this message
Jeet (gour-jitendrasingh) said :
#7

i suspect grub2 is making problem

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#8

Hard to tell if it is something with grub or a problem with your path environment variable. Try...
sudo /usr/sbin/update-grub

Revision history for this message
Jeet (gour-jitendrasingh) said :
#9

what does command
sudo grub says ??

Revision history for this message
Jeet (gour-jitendrasingh) said :
#10

yes Wyatt can be right try running command
sudo /usr/sbin/update-grub

and also provide output of

sudo grub

thanks

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#11

If the last command I gave you fails please tell the output of
echo $PATH ; ls /usr/sbin/ | grep grub

Revision history for this message
Stan Kapelkin (slavyan) said :
#12

yeh both sudo /usr/sbin/update-grub and sudo grub (command not found).

output of echo $PATH ; ls /usr/sbin/ | grep grub:

/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
grub-install
grub-mkconfig
grub-mkdevicemap
grub-mknetdir
grub-probe
grub-reboot
grub-set-default
grub-setup
update-grub
update-grub2
update-grub-gfxpayload
upgrade-from-grub-legacy

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#13

Path environment variable is ok. Grub files exist. Files might not be executable. Lets check
ls -l /usr/sbin/ | grep grub

Revision history for this message
Stan Kapelkin (slavyan) said :
#14

lrwxrwxrwx 1 root root 32 May 13 15:12 grub-install -> ../lib/grub/i386-pc/grub-install
-rwxr-xr-x 1 root root 7888 Apr 17 11:16 grub-mkconfig
-rwxr-xr-x 1 root root 83856 Apr 17 11:16 grub-mkdevicemap
lrwxrwxrwx 1 root root 33 May 13 15:12 grub-mknetdir -> ../lib/grub/i386-pc/grub-mknetdir
-rwxr-xr-x 1 root root 358216 Apr 17 11:16 grub-probe
-rwxr-xr-x 1 root root 3378 Apr 17 11:16 grub-reboot
-rwxr-xr-x 1 root root 2887 Apr 17 11:16 grub-set-default
lrwxrwxrwx 1 root root 30 May 13 15:12 grub-setup -> ../lib/grub/i386-pc/grub-setup
-rwxr-xr-x 1 root root 64 Apr 17 10:53 update-grub
lrwxrwxrwx 1 root root 11 May 13 15:12 update-grub2 -> update-grub
-rwxr-xr-x 1 root root 241 Aug 16 2011 update-grub-gfxpayload
-rwxr-xr-x 1 root root 1524 Apr 17 10:53 upgrade-from-grub-legacy

Revision history for this message
Wyatt Smith (wyatt-smith) said :
#15

That is very strange, you should not be getting command not found. The files are in you path and are executable. It does look like there are some links though. I suggest reinstalling grub

sudo apt-get install grub-pc --reinstall

Revision history for this message
Stan Kapelkin (slavyan) said :
#16

Looks like there is a problem with re-install as well:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 140 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main grub-pc i386 1.99-21ubuntu3 [140 kB]
Fetched 140 kB in 1s (139 kB/s)
Preconfiguring packages ...
sudo: update-grub#: command not found
grub-pc failed to preconfigure, with exit status 1
(Reading database ... 173222 files and directories currently installed.)
Preparing to replace grub-pc 1.99-21ubuntu3 (using .../grub-pc_1.99-21ubuntu3_i386.deb) ...
Unpacking replacement grub-pc ...
Processing triggers for man-db ...
Setting up grub-pc (1.99-21ubuntu3) ...
sudo: update-grub#: command not found
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Jeet (gour-jitendrasingh) said :
#17

grub-pc will install grub2 if you want to change to old GRUB you can remove grub 2

please follow that

https://help.ubuntu.com/community/Grub2/Upgrading

Revision history for this message
Jeet (gour-jitendrasingh) said :
#18
Revision history for this message
Jeet (gour-jitendrasingh) said :
#19

you can check your current grub version with

sudo grub-install -v

GRUB2 will have version 1.99 and later

Thanks

Revision history for this message
Stan Kapelkin (slavyan) said :
#20

Followed the link, but again after running sudo apt-get install grub-pc, i'd get "sudo: update-grub#: command not found" error

This is so frustration, i've been hunting for an answer all this time and not sure if I'll find one. It seems that whole Ubuntu 12.04 installation has a problem or something. Wonder if I can re-install it into previouse version as 12.04 seem to be buggy.

BTW, sudo grub-install -v gives me:

sudo: update-grub#: command not found
grub-install (GRUB) 1.99-21ubuntu3

Revision history for this message
Jeet (gour-jitendrasingh) said :
#21

try this

sudo grub-install /dev/sdX (where X is drive later where you installed Linux)

thanks

Revision history for this message
Jeet (gour-jitendrasingh) said :
#22

remember do not add drive number .. it can generate error...

for example

sudo grub-install /dev/sda

Thanks and revert if unclear

Revision history for this message
Stan Kapelkin (slavyan) said :
#23

Again getting update-grub#: command not found error

Revision history for this message
Jeet (gour-jitendrasingh) said :
#24

Have you done as my last comment?
If you did then i suggest you to report bug...
On May 15, 2012 8:31 PM, "Stan Kapelkin" <
<email address hidden>> wrote:

> Question #197261 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/197261
>
> Status: Answered => Open
>
> Stan Kapelkin is still having a problem:
> Again getting update-grub#: command not found error
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Stan Kapelkin (slavyan) said :
#25

Still problem with grub. I create a bug.

Revision history for this message
Barry Drake (b-drake) said :
#26

I can't understand why you have a # character at the end of sudo update-grub Am I to understand that you are entering it with the # character? If so, the command update-grub# does not exist. Try again without the #.

Revision history for this message
Sam_ (and-sam) said :
#27
Revision history for this message
Stan Kapelkin (slavyan) said :
#28

Ended up dumping Ubuntu 12.04 and installing Ubuntu 10. Have no problems with grub now. Seems like Ubuntu 12.04 still needs to be worked on.

Can you help with this problem?

Provide an answer of your own, or ask Stan Kapelkin for more information if necessary.

To post a message you must log in.