Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm exploring how grub works, so I changed one of the lines in grub.cfg (I realize this isn't the way it's done, this is just for fun), to
Code:
echo 'Loading Linux linux ... Hello World!'
and also the text of a couple of other menu entries.
But when I reboot, the changes don't show. The second answer to this question (https://askubuntu.com/questions/4373...-edit-grub-cfg) suggests that this should be possible. Am I overlooking something? I haven't updated grub or the kernel, so grub.cfg has the changes after the reboot. Any ideas?
$ sudo cat /boot/grub/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
#
if you want to put echos in your grub, use /etc/default/grub instead. Then update grub, then reboot, then look for your results. (in that order)
Are you doing this on an installed system or are you using a Live DVD or flash drive. If it is a Live system, no changes will be saved on reboot. If it is an installed system and you are making the change in grub.cfg file and saving the change as root (sudo), then the change should be there on reboot. If you run grub-mkconfig after the change is made, it will be lost. A kernel update will usually run grub-mkconfig so any edits to grub.cfg will also be lost in this case.
@yancek, @BW-userx: This is on an installed system, and I am not running grub-mkconfig, or updating the kernel - grub.cfg has my changes after rebooting, as well.
@ondoho: Yes, I am dual booting, OSX with ArchLinux. I think I changed boot.efi or something to recognize Arch, so it starts with Apple's booting screen, and then it passes on to grub once I select Arch. It's the grub.cfg corresponding to Arch I'm editing (I hope). Could this be a problem?
Also, I'm using sudo emacs grub.cfg.
@syg00: I'm positive I'm changing /boot/grub/grub.cfg, is there any other file that grub takes information from?
dual booting with another linux might have been important, but i don't think osx uses grub...
editing /boot/grub/grub.cfg should surely show some effect.
are you sure that nothing performs a grub update in between?
if yes, i suggest you keep trying different things with your /boot/grub/grub.cfg until you can see the effect.
BTW, there's a package to preview grub themes, in AUR. so you don't have to reboot.
I'm positive I'm changing /boot/grub/grub.cfg, is there any other file that grub takes information from?
There are numerous other grub files but none relevant for your purposes. Are you able to boot Arch? If you can you might post the relevant menuentries, at least the section(s) which you changed so we can see where they are entered.
$ cat /etc/default/grub
# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true
echo "BURP"
> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-4.14-x86_64-fallback.img
==> Image generation successful
( 3/20) Updating Grub-Bootmenu
BURP
Generating grub configuration file ...
Found background: /usr/share/grub/background.png
Found linux image: /boot/vmlinuz-4.14-x86_64
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.