Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
howto manually set boot screen?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Oct 25, 2015 10:25 am    Post subject: howto manually set boot screen? Reply with quote

ok, so I'm kinda dumb with grub.cfg files, BUT I also write them manually (because, for whatever reason, grub2-mkconfig never properly identifies my LVM partitions and I end up having to rewrite the UUIDs anyway).

I would like the bootup screen (the part with the text scroll checking off each part of the bootup process) to have a decent resolution, and maybe a nice background. What is the syntax for having this manually set in my grub.cfg file? I don't see instructions for it in the gentoo handbook, and every guide I've found online so far just tells me to use grub2-mkconfig (which is also not hardcore), which I'm trying to avoid.

Thanks for the help!

EE
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sun Oct 25, 2015 10:52 am    Post subject: Reply with quote

https://www.google.at/search?q=screen+grub2.cfg&ie=utf-8&oe=utf-8&gws_rd=cr&ei=kbIsVpoHhf9oiKGnyA4#q=grub2+boot+resolution

Quote:

GRUB_GFXMODE sets the resolution of GRUB
GRUB_GFXPAYLOAD_LINUX controls whether the linux kernel will keep the resolution, and if you want the linux kernel to use different resolution than GRUB, you can set it with this variable in form widthxheight.

To show all modes you can use:

hwinfo --framebuffer in linux terminal
vbeinfo in GRUB prompt

Sample configuration of framebuffer resolution

These lines are inserted to /etc/default/grub:

GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep


It seems it depends on the framebuffer in use and

those two lines


GRUB_GFXMODE=1024x768x32
GRUB_GFXPAYLOAD_LINUX=keep

1024x768 is hte resolution and x32 is the bits afaik.

I think it belongs there

### END /etc/grub.d/00_header ###
GRUB_GFXMODE=1920x1080x32
GRUB_GFXPAYLOAD_LINUX=keep
### BEGIN /etc/grub.d/10_linux ###

...
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Oct 25, 2015 11:44 am    Post subject: Reply with quote

Hey, thank you for the info. However, /etc/grub.d/00_header is the file used by grub2-mkconfig to generate /boot/grub/grub.cfg, not grub.cfg itself. Are those two lines copied verbatim into grub.cfg, or do they follow a different syntax there?

This is my problem: I can find plenty of guides to edit the files in /etc/grub.d/ to generate my grub.cfg, but none to tell me how to write crub.cfg myself from scratch. It's the latter that I'm trying to do.

Cheers,

EE
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 318

PostPosted: Sun Oct 25, 2015 1:37 pm    Post subject: Reply with quote

ExecutorElassus wrote:
Hey, thank you for the info. However, /etc/grub.d/00_header is the file used by grub2-mkconfig to generate /boot/grub/grub.cfg, not grub.cfg itself. Are those two lines copied verbatim into grub.cfg, or do they follow a different syntax there?

This is my problem: I can find plenty of guides to edit the files in /etc/grub.d/ to generate my grub.cfg, but none to tell me how to write crub.cfg myself from scratch. It's the latter that I'm trying to do.

Cheers,

EE


I use the grub2-mkconfig to generate /boot/grub/grub.cfg
In /etc/defaults/grub I have
Code:
GRUB_TIMEOUT=30
GRUB_GFXMODE=1920x1080
GRUB_BACKGROUND="/boot/grub/family-photo.jpg"


which end up in /boot/grub/grub.cfg as
Code:
if loadfont $font ; then
  set gfxmode=1920x1080
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  caed82da-ddd1-4da2-9fdf-483b6a255788
else
  search --no-floppy --fs-uuid --set=root caed82da-ddd1-4da2-9fdf-483b6a255788
fi
insmod jpeg
background_image -m stretch /boot/grub/family-photo.jpg
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=30
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=30
fi
### END /etc/grub.d/00_header ###


So you can see it is not a straight copy, you can take a look at /usr/sbin/grub2-mkconfig to see how it does it ;)

In my case I want the default menu entry 0 (the first menu entry) to be something I set, and have a few other entries for using a systemrescuecd image, to do this I have a file /etc/grub.d/06_custom which contains the following info (original was 40_custom). This information is copied straight into the /etc/grub/grub.cfg after the 00_header information
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
#

# jonathan password
#grub2-mkpasswd-pbkdf2
#PBKDF2 hash of your password is grub.pbkdf2.sha512.#####password info #######

# other user password
#grub2-mkpasswd-pbkdf2
#PBKDF2 hash of your password is grub.pbkdf2.sha512.#####password info #######


set superusers="jonathan"
password_pbkdf2 jonathan grub.pbkdf2.sha512.#####password info #######

password_pbkdf2 family grub.pbkdf2.sha512.#######password info #######


menuentry 'Halt system' --unrestricted {
   echo   'Halting system using grub halt ...'
   halt
}

menuentry 'System BIOS setup' --users "" {
   echo   'Entering system BIOS setup ...'
   fwsetup
}

menuentry "SYSRESCUECD 64 bit kernel iso image on sda9 - OK for distro fixing but not Mint :-(" --users "" {
   insmod part_msdos
   insmod ext2
   set root='(hd0,gpt9)'
   search --no-floppy --fs-uuid --set 229f7a75-d77c-4fee-a60b-03d1933a5f46
   set iso=/systemrescuecd-x86-3.8.1.iso
   loopback loop ${iso}
   linux  (loop)/isolinux/rescue64 grml2ram fb1920x1080 keyboard=uk setkmap=uk isoloop=${iso} iommu=soft
   initrd (loop)/isolinux/initram.igz
}
menuentry "SYSRESCUECD 32 bit kernel iso image on sda9 - OK for distro fixing but not Mint :-(" --users "" {
   insmod part_msdos
   insmod ext2
   set root='(hd0,gpt9)'
   search --no-floppy --fs-uuid --set 229f7a75-d77c-4fee-a60b-03d1933a5f46
   set iso=/systemrescuecd-x86-3.8.1.iso
   loopback loop ${iso}
   linux  (loop)/isolinux/rescue32 grml2ram fb1920x1080 keyboard=uk setkmap=uk isoloop=${iso} iommu=soft
   initrd (loop)/isolinux/initram.igz
}


I use the 10_linux entry and then also have some information in 40_custom which started off as entries generated with 10_linux and 30_os-prober scripts.
The grub2 manual http://www.gnu.org/software/grub/manual/grub.html may also be useful when creating your manual entries. I also found http://dedoimedo.com/computers/grub-2.html useful
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Oct 25, 2015 1:57 pm    Post subject: Reply with quote

thanks for the links! I'll look into them.

Do you have lines in your grub.cfg file that specify a background image for the boot sequence? That is, after you select a boot option? Is that different from the one set for grub's menu screen? How would I set that manually?

Cheers,

EE


Last edited by ExecutorElassus on Sun Oct 25, 2015 2:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sun Oct 25, 2015 2:17 pm    Post subject: Reply with quote

ExecutorElassus,

Heh. Others have answered the question you asked about grub but from the way you asked it, it was the wrong question.
Thu grub image is only displayed until grub hands over to the kernel.

I think you intended to ask about framebuffer splash, or boot splash, or whatever its called today.This gives you a nice console graphic during the boot process.
The liveDVD uses it.

You can have both if you want. A custom image behind grub and a custom image during boot.
It can even be the same image all the way through to your Xorg wallpaper.
Setting that up is left as an exercise for the reader :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Sun Oct 25, 2015 2:26 pm    Post subject: Reply with quote

Neddy, why do you hate my happiness??

That's exactly what I've been trying to figure out! Sigh, I guess I'll go back to searching for sample grub.cfg files to see how they do it :(
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sun Oct 25, 2015 2:47 pm    Post subject: Reply with quote

ExecutorElassus,

Grub doesn't do it. Here's the process in outline, end to end.

Grub loads and displays its menu over an image of your choice. It usually user 640x480 as that all it can be sure the display offers.
The kernel starts and clears the screen. It actually switches to using a different region of video RAM for the pixel buffer.
If you use a framebuffer console, you can decorate the console with an image of you choice.
Its usual to tell the kernel and boot sequence not to output text progress messages, or send them to another console as they make a mess of your image.
Instead, you add graphics icons as boot progresses, they actually overwrite part of the image but you don't want it back, so that's OK.

When xorg starts it may use a different resolution and yet another area of video RAM.

You know how to do the grub bit.
The framebuffer bit is from the wiki.

The very hard bit (I've never seen it) is to make the transisitions from grub/framebuffer/Xorg seamless.
You would need something to draw the framebuffer image before the grub image was removed.
That sounds like a kernel patch.
You would need to draw the Xorg image before switching away from the framebuffer image.
That sounds like an Xorg patch.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 318

PostPosted: Sun Oct 25, 2015 4:48 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Others have answered the question you asked about grub ...


my response attempted to dealt with the grub graphic and how it ends up in /etc/grub/grub.cfg only :oops:

NeddySeagoon wrote:
You know how to do the grub bit.
The framebuffer bit is from the wiki.


for me being able to easily read the text and be able to see messages during the boot process rather than attempting to suppress output is important, so a background image for the console is the last thing I would want ... so the information I posted is only going to help displaying information before the grub menu selection is made.
I like the fact an option is available to show background images should I want it 8) but I don't think I will be choosing to use it any time soon ...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Sun Oct 25, 2015 7:18 pm    Post subject: Reply with quote

jonathan183,

You answered the question that was asked. ExecutorElassus didn't ask the right question.

Asking the right question is very difficult when you don't know exactly what you want.
Then its always better to describe the problem to be solved, rather than ask about the perceived solution.

You get to keep your boot messages and have the eye candy.
The boot messages can be sent to another console.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Mon Oct 26, 2015 10:26 am    Post subject: Reply with quote

FWIW, I use the "Gentoo cycle" image on my bootscreen, passing the following to the kernel:

Code:
video=1600x900 quiet net.ifnames=0 splash=verbose,theme:emergence resume=/dev/sda5 CONSOLE=/dev/tty1


The progress messages as services start (after the kernel loads) are plenty visible in tty1. One of the last services starts fbconder, putting a different image on each of tty2-tty6. Those decorations are also behind the output of mingetty (or agetty, or whatever one uses for that function).

Just saying, the decorations are behind startup program output (at least for OpenRC), not covering it up.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Oct 26, 2015 7:26 pm    Post subject: Reply with quote

cboldt,

cboldt wrote:
Just saying, the decorations are behind startup program output ...

That's new since about 2010 then, which is when I last played with fbdecor on my netbook.
Maybe the handovers are fixed too.?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Mon Oct 26, 2015 10:13 pm    Post subject: Reply with quote

Whether or not the decoration is on top or behind is configurable. On the kernel line, "splash=verbose" puts the decoration behind.

/usr/share/doc/splashutils-*/kernel_parameters.bz2

As for handover, I have no idea. Boot via lilo, which is decoration free ;-). The Gentoo cycle appears before the fsck in my initramfs routine runs.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Mon Nov 02, 2015 8:49 am    Post subject: Reply with quote

So, I've been (slowly) setting up my bootsplash, and I have some questions.

I followed Neddy's guide for setting up an initrd (back when that was necessary to get around /usr being on a separate vg; is this still necessary?) to pre-mount my /usr and /var partitions. Now, though, the bootsplash guide is telling me to append the fbsplash stuff to an "initramfs".

Is this the same thing? Do I need to append the bootsplash stuff to the initrd.cpio.gz file that's sitting in /boot? Or somewhere else?

Thanks for the help!

EE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Nov 02, 2015 7:10 pm    Post subject: Reply with quote

ExecutorElassus,

It all depends when you want framebuffer splash to start.

To put the image on the screen as early as possible in the boot process, the image goes into the initrd and the instructions to use it are kernel command line parameters.
The kernel needs the fbdecor stuff either built in or in the initrd too, so you start the framebuffer and decorate it before root is mounted.
Most people do it this way.

You can also start your framebuffer and decorate it once root is mounted and you can read modules and images from root.
If you do this you get several seconds of blank screen between grub going away and root being mounted to start the framebuffer.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Mon Nov 02, 2015 7:19 pm    Post subject: Reply with quote

I'm all for early-as-possible eyecandy. In that case, where the guide says:

Quote:
Updating an initramfs image without using genkernel

If you have an existing initramfs (like one you have created with dracut) you want to use this feature. To append the theme to an existing initramfs:

root #splash_geninitramfs --verbose --res NxN --append /path/to/initramfsimage theme


the /path would in this case then be /boot/initrd.cpio.gz, correct? And here I would name the theme after the folder under /etc/splash, yes? So,

Code:
 … /boot/initrd.cpio.gz natural_gentoo


(on a side, holy crap are those packages full of absolutely terrible themes from like a decade ago. Yeesh)

And then it gets built into the initrd I built from your guide back in … 2012 (which still works great, btw)?

Thanks, as always, for the guidance.

Cheers,

EE
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Nov 02, 2015 7:34 pm    Post subject: Reply with quote

ExecutorElassus,

I've never done the initrd update. On my netbook, the eye candy was the only reason for the initrd.
It booted equally well (except the splash) with or without the initrd.

You can make your own themes.
I didn't quite go that far but there were no 1024x600 themes, so I had to crop one.
There may be a selection of themes on the liveDVD too. Ask about that in #gentoo-ten on freenode.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Tue Nov 03, 2015 5:55 pm    Post subject: Reply with quote

okay, so I rebooted into the new kernel, and holy crap! I finally have a pretty-looking bootup! Huzzah!

However, while the resolution sets to 1920x1200 as requested while the initrd is still going through its pre-mounting checks of /var and /usr, the actual image does not get set until much later in the process, after handing off to "real" / and right before entering 'init 3'.

Did I do something wrong with setting it up? My grub.cfg line looks like this:

Code:
menuentry 'Gentoo' {
root=hd0,1
linux /boot/kernel-4.3.0-gentoo root=UUID=74d54c6f-6a2d-47a6-acf3-5a902d13899f video=uvesafb:1920x1200-32,mtrr:3,ywrap splash=verbose,theme:natural_gentoo
initrd /boot/initrd.cpio.gz
}
I ran the following command before rebooting:
Code:
splash_geninitramfs --verbose --res 1920x1200 --append /boot/initrd.cpio.gz natural_gentoo
and it ran without apparent error.

Did I do something wrong here?

Cheers,

EE
Back to top
View user's profile Send private message
ExecutorElassus
Veteran
Veteran


Joined: 11 Mar 2004
Posts: 1435
Location: Berlin, Germany

PostPosted: Thu Dec 10, 2015 1:23 pm    Post subject: Reply with quote

ran into another issue:When I am at the login screen (which is lightdm in my case), if I try to quit to console, it spits me back to the nice framebuffer background, but there's just a blinking cursor, with no prompt or anything. I can't input any commands, thus can't re-start the X server or do anything else besides reboot the thing from an ssh session from my smartphone.

This is super annoying. Is there some reason this might be happening?

Cheers,

EE
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Dec 10, 2015 1:57 pm    Post subject: Reply with quote

ExecutorElassus wrote:
ran into another issue: When I am at the login screen (which is lightdm in my case), if I try to quit to console, it spits me back to the nice framebuffer background, but there's just a blinking cursor, with no prompt or anything. I can't input any commands, thus can't re-start the X server or do anything else besides reboot the thing from an ssh session from my smartphone.

ExecutorElassus ... when your DM ("login screen") starts it opens an xsession on vt7, this vt doesn't have getty running on it, only vt1 to vt6 have this. If you kill the DM then you're still at vt7 (and so see the framebuffer background and blinking cursor) so you need to switch vt's to get a login prompt: CNTL+ALT+F1 (for vt1, with the respective numbers corresponding to the similarly numbered vt). You'll then be able to login and restart the xsession, DM, or whatever it is you need to do.

HTH & best ... khay

Edit: corrected vt numbering/key ... thanks to NeddySeagoon.


Last edited by khayyam on Thu Dec 10, 2015 11:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Thu Dec 10, 2015 4:50 pm    Post subject: Reply with quote

khayyam.

Not CNTL+ALT+{Fn} ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Dec 10, 2015 7:21 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Not CNTL+ALT+{Fn} ?

Neddy ... no, {n} ... with '{n}' being a number between 1 and 6 ... or 7 (for the vt where the x11-session is normally started). Why, does it not work for you?

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Thu Dec 10, 2015 7:34 pm    Post subject: Reply with quote

khayyam,

When Xorg is running, its ctrl-alt-Fn here, when its not, I don't need the alt.
ctrl-alt-n does not work for me with Xorg running. I'll try it at the console later.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Dec 10, 2015 9:25 pm    Post subject: Reply with quote

NeddySeagoon wrote:
When Xorg is running, its ctrl-alt-Fn here, when its not, I don't need the alt.
ctrl-alt-n does not work for me with Xorg running. I'll try it at the console later.

Neddy ... I'm not sure why that is, that's always been the combination I've used, and I'm almost 99% sure I've not configured it. If you use CNTL-ALT-Fn how do you select which vt, or does it cycle through? CNTL-ALT-Fn does nothing here. In case it matters ... pc105, en_US layout.

best ... khay
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Thu Dec 10, 2015 10:06 pm    Post subject: Reply with quote

khayyam,

Ctrl-Alt-F1 for VT1 ... Ctrl-Alt-F7 for VT7 (Xorg)
Not the Fn key itself.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum