help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to permanently change grub2 prefix without reinstalling?


From: Bruno Dantas
Subject: how to permanently change grub2 prefix without reinstalling?
Date: Wed, 17 Jul 2019 23:26:38 -0400
User-agent: Cyrus-JMAP/3.1.6-731-g19d3b16-fmstable-20190627v1

I have two GNU/Linux operating systems installed: OS1 in sda1, OS2 in sda2. 
Each OS has its own /boot/grub/grub.cfg. Grub2 was installed to MBR while 
booted into OS1, with following command:

$ sudo grub-install /dev/sda

How do I tell grub to look for grub.cfg in sda2 instead of sda1? I know several 
ways to do this (reinstalling grub while booted into OS2, using "configfile" 
command in OS1's grub.cfg, mounting sda2 while running OS1 then reinstalling 
grub using --boot-directory=/mnt/boot or --root-directory=/mnt) but I would 
like to know how to do this by editing grub's "prefix" string directly,
 wherever it is that it hides in /dev/sda.

Is there a command-line tool that tells me the grub's current prefix string, 
with option to modify it? If not, I'm fine with a more hacky approach. I've 
wondered about how to do this for years, and would love to finally learn how.

Thanks,
Bruno "GNUser" Dantas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]