jorgicio Posted November 1, 2014 Report Share Posted November 1, 2014 Is there a way to setting the Grub GFX Theme using files such as /etc/boot.conf ? Or adding some other entries such as memtest+. Thanks :D Link to comment Share on other sites More sharing options...
0 sputnik Posted November 2, 2014 Report Share Posted November 2, 2014 This is the beginning section of my /etc/boot.conf, if it gives any ideas: boot { generate grub default "And we're gonna have Funtoo!" timeout 3 } display { gfxmode 1440x900x32 background /boot/grub-startup.png } color { normal light-blue/black highlight white/light-blue } The memtest+ could be trickier, some of those things are not yet implemented in boot-update. Although I vaguely recall seeing someone doing it with memtest on the old (now non-existent) funtoo forum. A couple of weeks ago I submitted the following code that adds a loop mounted sysrescuedisk entry to grub. But it's either been trashed or is still in limbo. Probably because the right way to do it would be to submit a patch to boot-update, only I'm not so hot on python, which is what it's coded in. Here it is: #!/bin/bash # boot-fix FILENAME=`ls /opt/sysrcd/systemrescuecd*` sed -i 's/gfxpayload=text/gfxpayload=keep/g' /boot/grub/grub.cfg sed -i 's%set menu_color_highlight=white/light-blue%set menu_color_highlight=white/light-blue\ set color_normal=brown/black%' /boot/grub/grub.cfg sed -i 's%set default%menuentry "SystemRescueCd (isoloop with backstore)" {\ insmod part_gpt\ insmod ext2\ set root=(hostdisk//dev/sda,gpt4)\ loopback loop (hd0,gpt4)'$FILENAME'\ linux (loop)/isolinux/rescue64 setkmap=us backstore=alldev,/opt/sysrcd/sysrcd.bs docache isoloop='$FILENAME'\ initrd (loop)/isolinux/initram.igz\ }\n\ menuentry "SystemRescueCd (isoloop no backstore)" {\ insmod ext2\ insmod part_gpt\ set root=(hostdisk//dev/sda,gpt4)\ loopback loop (hd0,gpt4)'$FILENAME'\ linux (loop)/isolinux/rescue64 setkmap=us backstore=off docache isoloop='$FILENAME'\ initrd (loop)/isolinux/initram.igz\ }\n\ set default%' /boot/grub/grub.cfgIt's a bash bandage with just a bunch of sed statements modifying your grub.cfg after boot-update generates it. If all else fails, you can do something like that. Link to comment Share on other sites More sharing options...
0 jorgicio Posted November 10, 2014 Author Report Share Posted November 10, 2014 WOW! I'd give an opportunity to that to know how it's going on. Thanks. Also... how can I generate a fallback kernel? Link to comment Share on other sites More sharing options...
0 sputnik Posted November 12, 2014 Report Share Posted November 12, 2014 Hmm, not sure what you mean. If you just make another kernel and it gets placed in /boot by make install, then boot-update will find it and happily put it on your grub startup list. If that's what you're looking for. You can make as many kernels as you have room for on disk. Link to comment Share on other sites More sharing options...
0 jorgicio Posted November 12, 2014 Author Report Share Posted November 12, 2014 Well, I mean another initramfs image fallback kernel. When I used Gentoo and compiled the kernel with genkernel, it generated 2 images: a normal one and a fallback one. Funtoo genkernel generates only one. Just saying... Link to comment Share on other sites More sharing options...
0 uudruid74 Posted November 12, 2014 Report Share Posted November 12, 2014 Well, I mean another initramfs image fallback kernel. When I used Gentoo and compiled the kernel with genkernel, it generated 2 images: a normal one and a fallback one. Funtoo genkernel generates only one. Just saying... Take your known "good/stable" kernel image and initrd and copy them to new names that genkernel won't overwrite. The problem with automatically doing this is that you might be running genkernel because the old one doesn't work, which would overwrite the other ".old" that is good, or you end up with a million copies of kernels (like my Ubuntu-based system that likes to upgrade the kernel and break shit all the time and leave with a million kernels in my grub menu. Link to comment Share on other sites More sharing options...
0 uudruid74 Posted November 12, 2014 Report Share Posted November 12, 2014 Couple questions since we are on the topic. Will Grub scale the given image to the current resolution, or do you have to provide a copy of the image in every resolution? Is there a tutorial on how to change the menu size? I've seen the menus placed in various parts of the screen, changed to use icons, and all sorts of stuff. The last Gentoo live DVD is a good example. Its a big download, but the grub on it is newer than what funtoo has available and the configuration is very well done! In the loopback mount that you did, have you ever tried to grab the ISO off NFS? I think its possible. And if grub can do that (would need NFS drivers in grub) then you should be able to chainload the ISO image as if it was a CD without having to give it the kernel and initrd lines ... just chainload to whatever secondary bootloader is on the medium. I was thinking that with some careful scripting, you could have an NFS server with a bunch of ISOs and a script that generates a grub config file for all those entries. You would then just need a grub menu item that loads the remote config file. I guess grub can load files through tftp. Anyone tried to load a whole ISO via tftpboot and loopback it in grub? Link to comment Share on other sites More sharing options...
0 sputnik Posted November 13, 2014 Report Share Posted November 13, 2014 Couple questions since we are on the topic. Will Grub scale the given image to the current resolution, or do you have to provide a copy of the image in every resolution? Is there a tutorial on how to change the menu size? I've seen the menus placed in various parts of the screen, changed to use icons, and all sorts of stuff. The last Gentoo live DVD is a good example. Its a big download, but the grub on it is newer than what funtoo has available and the configuration is very well done! In the loopback mount that you did, have you ever tried to grab the ISO off NFS? I think its possible. And if grub can do that (would need NFS drivers in grub) then you should be able to chainload the ISO image as if it was a CD without having to give it the kernel and initrd lines ... just chainload to whatever secondary bootloader is on the medium. I was thinking that with some careful scripting, you could have an NFS server with a bunch of ISOs and a script that generates a grub config file for all those entries. You would then just need a grub menu item that loads the remote config file. I guess grub can load files through tftp. Anyone tried to load a whole ISO via tftpboot and loopback it in grub? I don't think it will scale the image, but frankly I forget. Try it! Menu size (including font) changes with the resolution changes. AFAIK you need to size the picture to match gfxmode. But not the box, it fills the screen no matter what, I don't know how to change that. Also you can try dinking around with changing the default grub font, too much to go into here, but you can find lots of info on that on the web. I haven't tried the NFS idea. Sounds like a cool idea, but I think you would have to modify the initrd for sysrescue, that could be hairy because it's a compressed filesystem. I have made custom sysrescue iso's and it's a several step process because of that. And then the same for any other iso's. It would be cool though. Link to comment Share on other sites More sharing options...
0 uudruid74 Posted November 14, 2014 Report Share Posted November 14, 2014 Have you see the way grub is configured on the Gentoo liveCD? Doesn't look like grub at all except for the "Welcome to Grub" printed by the EFI loader right before the graphical menu starts. Even boots the kernel in a little window! I have no idea how they pulled that off yet, but I'll be looking into it. Link to comment Share on other sites More sharing options...
Question
jorgicio
Is there a way to setting the Grub GFX Theme using files such as /etc/boot.conf ? Or adding some other entries such as memtest+.
Thanks :D
Link to comment
Share on other sites
8 answers to this question
Recommended Posts