LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fuduntu (http://www.linuxquestions.org/questions/fuduntu-98/)
-   -   Update Grub (http://www.linuxquestions.org/questions/fuduntu-98/update-grub-4175463431/)

alfredo10 05-25-2013 02:09 PM

Update Grub
 
Hi!
Fuduntu is my main OS, now with Grub 2 (replaced Grub legacy). I know, that "sudo update-grub" will not work.
As far as I remember, the command contains "...mkconfig...".
Who knows the full command?

GlennsPref 05-25-2013 08:10 PM

lmgtfy

grub 2 update grub

http://www.gnu.org/software/grub/man...b_002dmkconfig

syg00 05-25-2013 08:51 PM

Quote:

Originally Posted by alfredo10 (Post 4958835)
... now with Grub 2 (replaced Grub legacy). I know, that "sudo update-grub" will not work.

Depends.
A properly configured package-manager should either replace the script and it'll now work on grub2, or notify you it has deleted the script and replaced it with (for example) update-grub2.
I've seen both happen.

With Ubuntu derivatives you're probably better off using their scripts than mkconfig.

towheedm 05-25-2013 09:44 PM

The correct command for grub-mkconfig is:
Code:

sudo grub-mkconfig -o /path/to/grub2_dir/grub.cfg
If you have a standard installation, then:
Code:

sudo grub-mkconfig -o /boot/grub/grub.cfg
will generate the new configuration file grub.cfg in /boot/grub.

Note that the command:
Code:

update-grub
is simply a wrapper script for grub-mkconfig. This command is standard only on Debian-based distros.

On some distro, Fedora and openSUSE for example, the command is grub2-mkconfig.

alfredo10 05-26-2013 05:30 AM

Hi!
Thanks for the hints - before posting I was searching several hours and did not find a Fuduntu command.
"mkconfig" did not work [my folder is grub2].
Code:

alfredo@notebook-0 ~ $ su -
Passwort:
notebook-0 ~ # grub-mkconfig -o /boot/grub2/grub.cfg
bash: grub-mkconfig: command not found...


syg00 05-26-2013 06:14 AM

Try "sudo update-" (no quotes) and hit the <tab> twice. You should see any commands available (or you could use updatedb/locate).

alfredo10 05-26-2013 08:20 AM

Hi!
Code:

update-alternatives      update-gtk-immodules    update-pciids
update-desktop-database  update-mime-database

No idea!

alfredo10 05-26-2013 08:27 AM

Hi!
Suddenly I had an idea - it worked!

Code:

grub2-mkconfig -o /boot/grub2/grub.cfg

towheedm 05-26-2013 10:14 AM

Fubuntu is based on Fedora. As I said in my previous:
Quote:

On some distro, Fedora and openSUSE for example, the command is grub2-mkconfig.
Glad it worked out eventually.

alfredo10 05-26-2013 12:46 PM

Hi towheedm!
Sorry -overlooked.

syg00 05-26-2013 05:34 PM

Quote:

Originally Posted by towheedm (Post 4959237)
Fubuntu is based on Fedora.

:doh:
Sorry for misleading - I (obviously) was thinking Ubuntu based ...

alfredo10 05-27-2013 03:16 AM

Hello altogether!
Thanks at all - I've learned a lot.


All times are GMT -5. The time now is 07:54 PM.