Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] grub2 significant boot delay
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gotyaoi
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2013
Posts: 95

PostPosted: Fri Oct 25, 2013 6:10 pm    Post subject: [SOLVED] grub2 significant boot delay Reply with quote

I upgraded my grub recently, following the gentoo migration document. It... works, in that it boots gentoo, but it's not the best experience, at the moment. I've set GRUB_GFXMODE=text and made sure there's no GRUB_GFXPAYLOAD_LINUX set just to rule that out, as I read in various places that themes and such were really slow. Still, however, the menu itself takes about a second to register a keypress. Even worse, when I select the entry I want to boot, it shows the booting gentoo message for about a second, and then the screen blanks for about 30 seconds before it show the kernel booting, after which everything proceeds as it did before upgrading. This is on a fairly gimped virtualbox VM, old mobo/processor on the host, no vt/x etc, so I guess that could be a cause, but I'm not sure how to determine that one way or the other. I was reading the article on the arch wiki, which mentioned "set pager=1" "set debug=all", but when I set those, the instructions went so slowly that I eventually had to go in with a rescue disk and remove those lines.

If anyone has a pointer about where to start looking, that would be much appreciated.


Last edited by gotyaoi on Fri Nov 22, 2013 6:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 841
Location: Montréal

PostPosted: Fri Oct 25, 2013 8:04 pm    Post subject: Reply with quote

In VirtualBox on an old computer host, any guest will be slow. How much memory can you give to the virtual machine, keeping it optimise according to VirtualBox?

Your 30 seconds boot delay problem seem's coming from the Linux kernel that miss the good framebuffer and/or the appropriate firmware files in itself or in the initramfs. In that case, you have a black screen until the real root partition is mounted. Than the kernel can access all it's modules and the modules can access the firmware files.

The kernel configuration can be in cause.
_________________
Paul
Back to top
View user's profile Send private message
gotyaoi
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2013
Posts: 95

PostPosted: Fri Oct 25, 2013 9:55 pm    Post subject: Reply with quote

Thank you for the quick reply. Yeah, I kind of figured that some of my options were limited based on my hardware, so I guess I'm okay with a slightly sluggish grub menu. I can't give the vm any more memory without *really* impacting the host.

The 30 second wait thing is more annoying to me. On that note, I was browsing the grub2 docs and noticed the the 'linux' command boots the kernel using what they call 'the 32 bit protocol' as opposed the 'traditional 16 bit protocol'. On a hunch, I switched the kernel line from

"linux /kernel-3.10.7-gentoo-r1 root=/dev/sda3 ro" to
"linux16 /kernel-3.10.7-gentoo-r1 root=/dev/sda3 ro"

And the delay went away. I'm going to read more about boot protocols now, but if anyone has insight on what the difference would be, I'd be interested to hear it.
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 841
Location: Montréal

PostPosted: Sat Oct 26, 2013 1:19 am    Post subject: Reply with quote

I read that linux16 Grub2 command make Grub2 (32 bits application) behave like Grub1 (16 bits application). Some BIOS services like APM and EDD who are not available with the Grub2 linux command are with linux16. linux16 also accept the kernel vga= boot parameter like Grub1. Grub2 linux command do not accept vga= . It allow to pass the Grub2 resolution or an other to the Linux kernel with the gfxmode and gfxpayload Grub2 variables.

One possible thing is that linux16 make your kernel boot properly in text mode what's linux Grub2 command dont do. To resolv this problem, in /etc/default/grub set
Code:
GRUB_GFXPAYLOAD_LINUX=text

and use the Grub2 linux command to see if it work. Do not forget to
Code:
grub2-mkconfig -o /boot/grub/grub.cfg


If you have some framebuffer configuration problems in your kernel and the Grub2 linux command make your kernel not to boot in text mode, I understand a 30 seconds delay like I said before. An other possibility is that your virtual machine can only boot in text mode.

Did you activate the 3D acceleration and give enough memory to your video card in the machine configuration? Linux use VESA framebuffer (vesafb) with my own virtual machine. So activate the VESA framebuffer directly (*) in your kernel should allow you to boot in an other mode than text.

For more occurate information read
Code:
info grub

_________________
Paul
Back to top
View user's profile Send private message
gotyaoi
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2013
Posts: 95

PostPosted: Tue Oct 29, 2013 12:57 am    Post subject: Reply with quote

I tried explicitly setting GRUB_GFXPAYLOAD_LINUX=text and regenerating grub.cfg, no change, still the 30 second wait before boot. 3D acceleration on or off for the VM seems to make no difference, and it's currently set to 12MB of video memory. CONFIG_FB_VESA is built in to my kernel. The VM can definitely boot into graphical mode to match my screen, it never stopped doing that (I was passing the vga=xxx parameter to the kernel in grub-legacy, now using GRUB_GFXPAYLOAD_LINUX=axb), just now it takes 30 seconds before it ever reaches the point where it mentions decompressing the kernel.
Back to top
View user's profile Send private message
gotyaoi
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2013
Posts: 95

PostPosted: Fri Nov 15, 2013 1:41 am    Post subject: Reply with quote

I've been fiddling with this for a couple weeks now, updated the kernel, virtualbox, virtualbox-guest additions, pared down my kernel to the bare essential, tried pappy's seeds... nothing. I guess grub is having trouble going straight to 32 bit protected mode with this setup. I found some 5 year old ubuntu ticket that sounds pretty similar to what's going on, in case that jogs anyone's memory, but I'm probably going to set it to linux16 and be done with it.

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/577120
Back to top
View user's profile Send private message
gotyaoi
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2013
Posts: 95

PostPosted: Fri Nov 22, 2013 6:26 pm    Post subject: Reply with quote

Well, I'm at a loss for words. I decided to give reconfiguring my kernel one more shot, started with pappy's seeds, made extra sure everything was appropriate for this setup and now it boots without a delay. I... I don't even. I guess the lesson here is... I don't know, never give up hope? Be obsessive compulsive?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
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