View previous topic :: View next topic |
Author |
Message |
DeIM Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/8459467464812291dd644d.jpg)
Joined: 11 Apr 2006 Posts: 443
|
Posted: Mon Oct 26, 2015 6:46 am Post subject: [Solved] change GRUB2 boot default from windows/linux |
|
|
I'm connected to distant PC with gentoo via SSH. There are windows too. Grub default boot option is set to windows, so when I reboot PC it boots windows. Is there any way to boot from windows to linux, i.e. e.g. change default boot option from windows? Thanks.
Last edited by DeIM on Sat Oct 31, 2015 7:23 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9891 Location: almost Mile High in the USA
|
Posted: Tue Oct 27, 2015 6:31 pm Post subject: |
|
|
Well, this would be an advantage of installing GRUB on a FAT filesystem, and then Windows could edit that directly. Else you'd have to install some sort of ext2fs or whatever filesystem driver on that machine and then you can use that to edit the grub configuration.
Another possibility if you have a hex editor and search for the file and edit the file that way...very carefully...
You may be SOL, especially if the editing fails and you don't have some sort of remote management hardware... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DeIM Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/8459467464812291dd644d.jpg)
Joined: 11 Apr 2006 Posts: 443
|
Posted: Thu Oct 29, 2015 12:44 pm Post subject: |
|
|
Maybe setting default grub boot option will be more easy from gentoo.
I've found command:
But it's not working for me
When I set to boot windows:
It changes default entry to first entry - windows. But when I reboot it is still set to 0, but default in config is 1 (gentoo). It simply didn't returned to default config before grub2-reboot command.
Is there a bug or am I doing something wrong? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DeIM Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/8459467464812291dd644d.jpg)
Joined: 11 Apr 2006 Posts: 443
|
Posted: Sat Oct 31, 2015 7:25 pm Post subject: |
|
|
Solved myself:
in /etc/default/grub needs to be GRUB_DEFAULT=saved
then
Code: | grub2-mkconfig -o /boot/grub/grub.cfg |
Code: | grub2-set-default 0
grub2-reboot 1 |
now works ![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|