grub-mkconfig n'a pu être exécuté avec succès. Vous devez le lancer en tant que root !

Asked by David Gouzien on 2011-11-02

I'm having a problem with the root access. I start GC then enter my code but it's seems that i'm not root according to the dialog box.
It works on another distrib installed on my computer.

Thanks for helping if you have any time.

Question information

Language:
English Edit question
Status:
Solved
For:
Grub Customizer Edit question
Assignee:
No assignee Edit question
Solved by:
David Gouzien
Solved:
2011-11-03
Last query:
2011-11-03
Last reply:
2011-11-02

This message also appears if there's something wrong on your grub configuration.

Please run

sudo grub-mkconfig

using a terminal and tell me the error message.

David Gouzien (david-gouzien) said : #2

Bonjour !

You were right...
I removed a menu entry in the custom file and it's running ok now.
For info I copy the result of the command you requested :

david@david-desktop:~$ sudo grub-mkconfig
[sudo] password for david:
Generating grub.cfg ...
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set c7bb5555-5871-4813-84a8-b39beb76664f
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set c7bb5555-5871-4813-84a8-b39beb76664f
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/11_linux_xen ###
### END /etc/grub.d/11_linux_xen ###

### BEGIN /etc/grub.d/12_memtest86+ ###
Found memtest86+ image: /boot/memtest86+.bin
menuentry "Memory test (memtest86+)" {
 insmod part_msdos
 insmod ext2
 set root='(hd0,msdos1)'
 search --no-floppy --fs-uuid --set c7bb5555-5871-4813-84a8-b39beb76664f
 linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
 insmod part_msdos
 insmod ext2
 set root='(hd0,msdos1)'
 search --no-floppy --fs-uuid --set c7bb5555-5871-4813-84a8-b39beb76664f
 linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/12_memtest86+ ###

### BEGIN /etc/grub.d/15_custom ###
if [ -f $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
/etc/grub.d/15_custom: 7: menuentry: not found
insmod: can't read 'loopback': No such file or directory
insmod: can't read 'iso9660': No such file or directory
/etc/grub.d/15_custom: 10: Syntax error: Unterminated quoted string
david@david-desktop:~$ ^C
david@david-desktop:~$

I wonder why all the files have changed names (new numbers) and there are now proxified scripts.

/etc/grub.d/bin
/etc/grub.d/proxifiedScripts
/etc/grub.d/00_header
/etc/grub.d/05_debian_theme
/etc/grub.d/10_linux_proxy
/etc/grub.d/11_linux_xen
/etc/grub.d/12_memtest86+
/etc/grub.d/13_os-prober_proxy
/etc/grub.d/14_custom_proxy
/etc/grub.d/15_custom
/etc/grub.d/README

here is the content of my proxifiedscripts folder :

/etc/grub.d/proxifiedScripts/custom
/etc/grub.d/proxifiedScripts/linux
/etc/grub.d/proxifiedScripts/os-prober

One more question : is there any way to modify the custom file of grub directly from your application (without editing it manually) ?

Thanks for your help.

To tell you frankly i tried a few things in grub-customizer to start an Elive distrib of linux that is not detected by os-prober. Maybe it's because the partition is formated in reiser...

Bye and thanks again.

Did you remove the tail command from the custom script? If you did so, grub-mkconfig tries to execute this suff as bash script instead of simply copying its contents to the grub.cfg.

Why the new numbers? -> this is the way to change the order of the scripts. When you're moving the scripts up or down using grub customizer, the prefixes will change. I wonder that it's completely renumbered - newer version of grub customizer are only switching the numbers of the two scripts you're switching in grub customizer.

why the proxified scripts? -> this is the way, grub customizer realizes the ability to edit the entries inside of a script. Instead of running the scripts directly there's a filter which executes one of the scripts and does some modification of the output before sending it back to the grub-mkconfig (through stdout).

Currently there's no way to edit the custom-file, but this is planned for version 3 (please don't expect this is coming out soon - there's still much to do...)

David Gouzien (david-gouzien) said : #4

Thanks !
I will wait for the new version then.
You're doing a great job for the community.

May I suggest a correction about the dialog box above mentioned (since it has nothing to do with root permissions).

My problem is solved and I thank you again for that.

(By the way, I solved my problem with Elive distrib by reformating in ext3. It' now detected by os-prober.)

David from France.