Results 1 to 8 of 8

Thread: Make GRUB hide on boot

  1. #1
    Join Date
    Dec 2008
    Location
    South Carolina
    Beans
    113
    Distro
    Ubuntu 13.04 Raring Ringtail

    Exclamation Make GRUB hide on boot

    Hello everyone!

    I recently lost my laptop, which contained a small 10GB Win XP installation for use with itunes. I decided to recreate the XP partition on my desktop computer since itunes is a must have with an itouch device. (for updating) Everything went fine, I reinstalled GRUB afterwards, and it comes up everytime I boot. That's expected, but I don't use the windows partition that often, so I would like GRUB to hide, and ubuntu boot automatically, and only appear if I hold down [Shift] like it does when ubuntu is the only OS installed. I'm been messing with the GRUB config file all day, and I can't get it to work. If I set the timeout to 0 it still appears.

    Here is my GRUB.cfg file right now.

    Code:
     #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=1280x1024x24
      load_video
      insmod gfxterm
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos1)'
    search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    insmod gettext
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=10
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 44,0,30; then
      clear
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    if [ ${recordfail} != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos1)'
    	search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=cbcf2e6f-fb62-4d61-ac75-498fc4a9d055 ro   quiet splash vt.handoff=7
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos1)'
    	search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    	echo	'Loading Linux 2.6.38-8-generic ...'
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=cbcf2e6f-fb62-4d61-ac75-498fc4a9d055 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos1)'
    	search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos1)'
    	search --no-floppy --fs-uuid --set=root cbcf2e6f-fb62-4d61-ac75-498fc4a9d055
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Microsoft Windows XP Professional (on /dev/sda2)" --class windows --class os {
    	insmod part_msdos
    	insmod ntfs
    	set root='(/dev/sda,msdos2)'
    	search --no-floppy --fs-uuid --set=root DCA0A57EA0A5602E
    	drivemap -s (hd0) ${root}
    	chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # 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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ##

    Any idea what I need to change to get this to work?

    Thanks in advance,
    Nicholas C. Brown
    Dell Vostro, 6GB RAM, Intel Core i5 (Sandy Bridge) @ 2.5GHz, ubuntu 13.04 Raring Ringtail

  2. #2
    Join Date
    May 2006
    Location
    Lake Placid, Florida, USA
    Beans
    2,008
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Make GRUB hide on boot

    set timeout to 0 .......

  3. #3
    Join Date
    Apr 2011
    Location
    Eurasia
    Beans
    26
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Make GRUB hide on boot

    Do you run update-grub after you make any changes? And which file do you edit to set the timeout to 0?

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Make GRUB hide on boot

    Not a good idea to directly edit grub.cfg - it will get overwritten with every grub update. Best to make updates to /etc/default/grub file and files in /etc/grub.d.

    By default, grub will not hide the screen on multi-boot systems. However, intuitive and inquisitive minds have found a way. Have a look at: http://ubuntuforums.org/showthread.php?t=1287602 - specifically #11- Hiding the menu on multi-os systems.

  5. #5
    Join Date
    Apr 2010
    Beans
    1,584
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Make GRUB hide on boot

    Or use Startup Manager.

  6. #6
    Join Date
    Dec 2008
    Location
    South Carolina
    Beans
    113
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Make GRUB hide on boot

    Thanks for the quick replies guys, got it working now!
    Dell Vostro, 6GB RAM, Intel Core i5 (Sandy Bridge) @ 2.5GHz, ubuntu 13.04 Raring Ringtail

  7. #7
    Join Date
    Jan 2008
    Location
    Canada
    Beans
    89
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Make GRUB hide on boot

    Hey,
    How about telling us what worked? I have the same problem!

    Van

  8. #8
    Join Date
    Dec 2008
    Location
    South Carolina
    Beans
    113
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Make GRUB hide on boot

    Quote Originally Posted by vancouverite View Post
    Hey,
    How about telling us what worked? I have the same problem!

    Van
    Check Toz's post. It contains the solution that you're looking for.
    Dell Vostro, 6GB RAM, Intel Core i5 (Sandy Bridge) @ 2.5GHz, ubuntu 13.04 Raring Ringtail

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •