Sometimes I take some serious risks. Like, suddenly, I get the urge to install Ubuntu on my office’s laptop. A Dell Latitude E6500. But, there’s a Windows 7 installed, consuming the entire disk.
So, what I have to use, is the gparted disk resize functionality – something I never trust. But hey, who cares 🙂 So I downloaded the live CD of Ubuntu 10.04 netbook edition (two days before Ubuntu 10.10 should be released – I tend to download ubuntu releases a couple of days before a new version is released), I put in on a USB Flash drive (so that I don’t have to install it on the harddisk) but not much success. The first time it boots great, but then I want to configure some things, install other software (not to do on a live distribution) the OS starts complaining about not enough diskspace, wireless problems and on reboot, no live os was found.
So I took the chance and installed it on the hard drive – resizing the existing NTFS partition. Installation of Ubuntu is painless – as always – and on reboot, except for the check disk that was triggered when booting back into Windows, everything went smooth and Windows 7 just kept working fine. Only with 4GB less hard drive.
In Ubuntu, I installed the NVidia drivers for the screen and after that, the boot screen (ubuntu logo) and the terminal (you know, tty1 to 6, ctrl+alt+f1) didn’t have the 1920×1200 resolution anymore, just a 640×480.
Me not want.
So I kept searching and trying, even adjusting some grub scripts (one hint said to change the “linux” and “initrd” in /etc/grub.d/10_linux to “linux16” and “initrd16” but that didn’t work out and besides, it’s a dirty hack.
You can configure it nicely the way it should be: adjusting /etc/default/grub. Add the lines
and you’re all done. Not using the (deprecated) vga= method, just that. And run update-grub2 afterwards.
This is my working grub.cfg:
# If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. GRUB_DEFAULT=4 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="quiet splash" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 GRUB_GFXMODE=1920x1200x32 GRUB_GFXPAYLOAD_LINUX=keep # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_LINUX_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"
Almost perfect. However, the splash screen is there for just a short amount of time. The console’s are at full resolution, so that’s ok with me, but it would of course be nice that the splash screen and moving dot’s are viewable. I stumbled on on another solution/work-around in which the author states he hates the set gfxpayload=keep solution and gives a better solution… In short, execute these commands
sudo apt-get install v86d hwinfo sudo hwinfo --framebuffer
Then, edit /etc/default/grub
... GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap" ... GRUB_GFXMODE=1920x1200
and additionally, thanks to a comment in the article, I added
Edit /etc/initramfs-tools/modules to include uvesafb by adding uvesafb mode_option=1366x768-24 mtrr=3 scroll=ywrap, then execute commands
echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash sudo update-grub2 sudo update-initramfs -u
Ok, almost perfect. Only, this textual Grub menu… Ok, boring and not anno 2010. So, After a little search, I stumbled upon Burg.
sudo add-apt-repository ppa:bean123ch/burg sudo apt-get update sudo apt-get install burg burg-themes
During installation, it’s installed in the MBR automatically, only, on reboot, my high-res grub menu and tty’s is gone again. Luckily, while the boot screen is displaying, you can hit ‘r’ and choose the wanted resolution (1920×1200 in my case). The tty’s are – sadly, 640 all over again, so I opened /etc/default/burg and noticed the GRUB_GFXMODE is set to “saved” (= the last chosen one in the boot screen) and GRUB_GFXPAYLOAD_LINUX is gone. Now, suppose for one reason or the other I choose another resolution in the boot screen, I want the same resolution in the tty’s, so I added the option GRUB_GFXPAYLOAD_LINUX=keep again. Sorry 🙂
And, since it is nice if, on reboot, the last selected OS is selected by default, I changed GRUB_DEFAULT=0 to GRUB_DEFAULT=saved so that when I have to reboot my Windows installation during the day, I can just reboot the pc, take a break and see that Windows is fully started when I return.
So, my final result is
# If you change this file, run 'update-burg' afterwards to update # /boot/burg/burg.cfg. GRUB_DEFAULT=saved GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodesetvideo=uvesafb:mode_option=1920x1200-24,mtrr=3,scroll=ywrap" GRUB_CMDLINE_LINUX="" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # If you want to enable the save default function, uncomment the following # line, and set GRUB_DEFAULT to saved. GRUB_SAVEDEFAULT=true # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' # In the boot menu, use hotkey 'r' to popup a resolution selection menu. GRUB_GFXMODE=saved GRUB_GFXPAYLOAD_LINUX=keep # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_LINUX_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" # GRUB_THEME's value can be 'saved' or a specific BURG theme name, you can also # set it to the pathname of a GRUB2 theme file. # In the boot menu, use hotkey 't' to popup a theme selection menu GRUB_THEME=saved # GRUB_FOLD's value can be 'saved', 'true' or 'false'. # In the boot menu, use hotkey 'F7' to show the full list, 'f' to toggle # between folding modes. GRUB_FOLD=true # Add user with burg-adduser, then use GRUB_USERS to config authentication. # The following example means user1 can boot Ubuntu, no password is needed to # boot Windows, user1 amd user2 can boot other OS. Superusers can boot any OS # and use hotkeys like `c' to enter console mode. #GRUB_USERS="*=user1,user2:ubuntu=user1:windows=" # For a complete list of supported variables, refer to this wiki page: # http://code.google.com/p/burg/wiki/ConfigurationVariables
GRUB_FOLD=true will make the “recovery” mode being folded into the menu option to boot normal ubuntu. So it’s available if you need it, but it’s hidden by default.
update-burg and you’re done.
Reboot and choose your theme by pressing ‘t’
And I’m done.
Thank you for this!!! The non-graphical nature of GRUB has always been a pet-peeve of mine, and I’m not enough of a coder to submit a patch.
Very nice to find this spelled out so clearly, especially since I’ve spent so very little time with GRUB2 and never stumbled over BURG.
You’ve made a happy nerd here 🙂
Comments are closed.