edit grub

8 risposte [Ultimo contenuto]
GNUbahn
Offline
Iscritto: 02/19/2016

I'm running a dual boot and want to make Trisquel my primary OS. It's now secondary in my grub so I wish to edit the grub. When choosing how to boot there is an option of editing the grub menu but I'm clueless of how to actually edit. Can someone help with info or a link to info?

loldier
Offline
Iscritto: 02/17/2016

https://askubuntu.com/questions/265010/how-do-i-edit-grub-menu

[sudo nano /etc/default/grub]

[sudo update-grub]

GNUbahn
Offline
Iscritto: 02/19/2016

I saw that but I also saw some warning that one can really ess it up. If this is safe (granted that I do it right!) I'll try.

loldier
Offline
Iscritto: 02/17/2016

Provided that you can dualboot now but want to change the order which OS boots first by default, there's no risk if you know how to use the terminal (and an editor like Nano).

I just tried the trick and it worked. The difference is, I installed Trisquel last. The other OS is a non-free proprietary OS.

You'll have to edit the line 'GRUB_DEFAULT=0' to read 'GRUB_DEFAULT=2' (if I understand correctly you only have two operating systems). That will switch the default boot order between the two OS, the menu will stay put.

While you are at it, you can also change the timeout:

'GRUB_TIMEOUT=4' (it used to be 10).

Don't forget to run 'sudo update-grub' before you reboot.

GNUbahn
Offline
Iscritto: 02/19/2016

I actually plan to install a third OS. Can I still use your trick?

loldier
Offline
Iscritto: 02/17/2016

With more menu entries there will be more numbers.

GNUbahn
Offline
Iscritto: 02/19/2016

So

0 = in the written order
1 = the first OS
2 = the second OS
etc.

?

loldier
Offline
Iscritto: 02/17/2016

Entries start from '0' (like the four software freedoms). Not all entries are OS's, though. My entries number three: Trisquel (0), Advanced options (1) and Non-Free Proprietary OS (2). All grub menus are not created equal. Yours may differ from mine.

evoblade
Offline
Iscritto: 10/25/2015