Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 23
$ sudo mount /dev/sda3 /mnt $ cd /mnt/grub2/ $ ls Code: device.map fonts grub.cfg grubenv i386-pc locale themes $ sudo cat grub.cfg Code: ### BEGIN /etc/grub.d/00_header ### if [ -s ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,790

    $ sudo mount /dev/sda3 /mnt
    $ cd /mnt/grub2/
    $ ls
    Code:
    device.map  fonts  grub.cfg  grubenv  i386-pc  locale  themes
    $ sudo cat grub.cfg
    Code:
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      load_env
    fi
    set default="0"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    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 load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod lvm
    insmod ext2
    set root='lvm/vg-lv_root'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvm/vg-lv_root'  753d40c0-9f28-4011-a8c6-7b6da842e0ad
    else
      search --no-floppy --fs-uuid --set=root 753d40c0-9f28-4011-a8c6-7b6da842e0ad
    fi
        font="/usr/share/grub/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    set timeout=5
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Fedora (3.5.4-1.fc17.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    	else
    	  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    	fi
    	echo 'Loading Fedora (3.5.4-1.fc17.x86_64)'
    	linux	/vmlinuz-3.5.4-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    	echo 'Loading initial ramdisk ...'
    	initrd /initramfs-3.5.4-1.fc17.x86_64.img
    }
    menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    	else
    	  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    	fi
    	echo	'Loading Linux 3.5.3-1.fc17.x86_64 ...'
    	linux	/vmlinuz-3.5.3-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    	echo	'Loading initial ramdisk ...'
    	initrd	/initramfs-3.5.3-1.fc17.x86_64.img
    }
    submenu 'Advanced options for Fedora' $menuentry_id_option 'gnulinux-advanced-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	menuentry 'Fedora, with Linux 3.5.3-1.fc17.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.3-1.fc17.x86_64-advanced-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    		load_video
    		set gfxpayload=keep
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos3'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    		else
    		  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    		fi
    		echo	'Loading Linux 3.5.3-1.fc17.x86_64 ...'
    		linux	/vmlinuz-3.5.3-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    		echo	'Loading initial ramdisk ...'
    		initrd	/initramfs-3.5.3-1.fc17.x86_64.img
    	}
    	menuentry 'Fedora, with Linux 3.5.3-1.fc17.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.3-1.fc17.x86_64-recovery-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    		load_video
    		set gfxpayload=keep
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos3'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    		else
    		  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    		fi
    		echo	'Loading Linux 3.5.3-1.fc17.x86_64 ...'
    		linux	/vmlinuz-3.5.3-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro single rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    		echo	'Loading initial ramdisk ...'
    		initrd	/initramfs-3.5.3-1.fc17.x86_64.img
    	}
    	menuentry 'Fedora, with Linux 3.3.4-5.fc17.x86_64' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.3.4-5.fc17.x86_64-advanced-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    		load_video
    		set gfxpayload=keep
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos3'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    		else
    		  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    		fi
    		echo	'Loading Linux 3.3.4-5.fc17.x86_64 ...'
    		linux	/vmlinuz-3.3.4-5.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    		echo	'Loading initial ramdisk ...'
    		initrd	/initramfs-3.3.4-5.fc17.x86_64.img
    	}
    	menuentry 'Fedora, with Linux 3.3.4-5.fc17.x86_64 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.3.4-5.fc17.x86_64-recovery-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    		load_video
    		set gfxpayload=keep
    		insmod gzio
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos3'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    		else
    		  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    		fi
    		echo	'Loading Linux 3.3.4-5.fc17.x86_64 ...'
    		linux	/vmlinuz-3.3.4-5.fc17.x86_64 root=/dev/mapper/vg-lv_root ro single rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    		echo	'Loading initial ramdisk ...'
    		initrd	/initramfs-3.3.4-5.fc17.x86_64.img
    	}
    }
    
    ### 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_ppc_terminfo ###
    ### END /etc/grub.d/20_ppc_terminfo ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Ubuntu 12.04.1 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-361a5563-f447-42ea-b5ef-c3be733df368' {
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos1'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  361a5563-f447-42ea-b5ef-c3be733df368
    	else
    	  search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	fi
    	linux /boot/vmlinuz-3.2.0-23-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro quiet splash $vt_handoff
    	initrd /boot/initrd.img-3.2.0-23-generic
    }
    submenu 'Advanced options for Ubuntu 12.04.1 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-361a5563-f447-42ea-b5ef-c3be733df368' {
    	menuentry 'Ubuntu, with Linux 3.2.0-23-generic (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic--361a5563-f447-42ea-b5ef-c3be733df368' {
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos1'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  361a5563-f447-42ea-b5ef-c3be733df368
    		else
    		  search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    		fi
    		linux /boot/vmlinuz-3.2.0-23-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro quiet splash $vt_handoff
    		initrd /boot/initrd.img-3.2.0-23-generic
    	}
    	menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic--361a5563-f447-42ea-b5ef-c3be733df368' {
    		insmod part_msdos
    		insmod ext2
    		set root='hd0,msdos1'
    		if [ x$feature_platform_search_hint = xy ]; then
    		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  361a5563-f447-42ea-b5ef-c3be733df368
    		else
    		  search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    		fi
    		linux /boot/vmlinuz-3.2.0-23-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro recovery nomodeset
    		initrd /boot/initrd.img-3.2.0-23-generic
    	}
    }
    
    ### 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  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    I found following postings;
    installing grub2 to MBR, looking to do this correctly.
    installing grub2 to MBR, looking to do this correctly. - FedoraForum.org

    The command to generate grub2 to MBR;
    Code:
    sudo grub2-install --recheck --root-directory=/ /dev/sda

  2. #12
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Edit Ubuntu's grub.cfg file.
    Code:
    cd /boot/grub2
    sudo chmod +w grub.cfg
    gkdu gedit grub.cfg
    Add following code before "### BEGIN /etc/grub.d/40_custom ###" line in grub.cfg file :

    Code:
    menuentry 'Fedora (3.5.4-1.fc17.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    	else
    	  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    	fi
    	echo 'Loading Fedora (3.5.4-1.fc17.x86_64)'
    	linux	/vmlinuz-3.5.4-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    	echo 'Loading initial ramdisk ...'
    	initrd /initramfs-3.5.4-1.fc17.x86_64.img
    }
    Save file and remove write permission of grub.cfg file.
    Code:
    sudo chmod -w grub.cfg
    Reboot machine and check if Fedora boots up fine.

    Its easy to re-install GRUB2 in distros where root partition is not a Logical Volume. I am not sure about GRUB2 re-install command in LVM system. I don't have LVM in my test machine to experiment GRUB install.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #13
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,790
    Quote Originally Posted by devils casper View Post
    Edit Ubuntu's grub.cfg file.
    Code:
    cd /boot/grub2
    sudo chmod +w grub.cfg
    gkdu gedit grub.cfg
    Add following code before "### BEGIN /etc/grub.d/40_custom ###" line in grub.cfg file :
    - snip -
    grub2 can't be found

    # find / -name grub2
    no printout

    # ls /boot/
    Code:
    abi-3.2.0-23-generic         memtest86+.bin
    abi-3.2.0-29-generic         memtest86+_multiboot.bin
    config-3.2.0-23-generic      System.map-3.2.0-23-generic
    config-3.2.0-29-generic      System.map-3.2.0-29-generic
    grub                         vmlinuz-3.2.0-23-generic
    initrd.img-3.2.0-23-generic  vmlinuz-3.2.0-29-generic
    initrd.img-3.2.0-29-generic
    Only grub is there

  4. #14
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    If Ubuntu's GRUB2 is being used then there must be Ubuntu's grub.cfg file somewhere. Let me check in my Ubuntu machine.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #15
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,790
    Quote Originally Posted by devils casper View Post
    If Ubuntu's GRUB2 is being used then there must be Ubuntu's grub.cfg file somewhere. Let me check in my Ubuntu machine.
    $ sudo find / -name grub.cfg
    Code:
     
    /boot/grub/grub.cfg
    /usr/share/doc/grub-common/examples/grub.cfg
    grub.cfg is under /boot/grub.cfg

    $ sudo find / -name grub2 -type d
    $ sudo find / -name GRUB2 -type d
    both without printout

  6. #16
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Edit that grub.cfg file and add an entry of Fedora in it.

    Code:
    cd /boot
    sudo chmod +w grub.cfg
    gksu gedit grub.cfg
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  7. #17
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,790
    $ cd /boot/grub

    $ ls | grep grub
    Code:
    grub.cfg
    grub.cfg.ORIG_20120930
    grubenv
    $ sudo chmod +w grub.cfg
    $ sudo gedit grub.cfg

    adding follows before
    Code:
    ("### BEGIN /etc/grub.d/40_custom ###" line in grub.cfg file)
    
    menuentry 'Fedora (3.5.4-1.fc17.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    	else
    	  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    	fi
    	echo 'Loading Fedora (3.5.4-1.fc17.x86_64)'
    	linux	/vmlinuz-3.5.4-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    	echo 'Loading initial ramdisk ...'
    	initrd /initramfs-3.5.4-1.fc17.x86_64.img
    }
    $ sudo reboot

    grub (window) didn't start. I have to press "left-shift" key to start it.

    Selected;[code]
    Fedora (3.5.4-1.fc17x86-64)

    to start Fedora.

    Please advise:
    (1) How to make grub (window) start automatically without holding lef-shift key?
    (2) How to add "recovery mode" for Fedora?
    (3) If I need Fedora started automatically how to do it?

    TIA

    satimis

  8. #18
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the contents of grub.cfg file again.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #19
    Linux Guru
    Join Date
    Sep 2004
    Posts
    1,790
    On Ubuntu 12.04

    $ cat /boot/grub/grub.cfg
    Code:
    ### 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='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      insmod part_msdos
      insmod ext2
      set root='(hd0,msdos1)'
      search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
      set locale_dir=($root)/boot/grub/locale
      set lang=en_HK
      insmod gettext
    fi
    terminal_output gfxterm
    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 ###
    function gfxmode {
    	set gfxpayload="${1}"
    	if [ "${1}" = "keep" ]; then
    		set vt_handoff=vt.handoff=7
    	else
    		set vt_handoff=
    	fi
    }
    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 3.2.0-31-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	linux	/boot/vmlinuz-3.2.0-31-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro   quiet radeon.audio=1
    	initrd	/boot/initrd.img-3.2.0-31-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-31-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	echo	'Loading Linux 3.2.0-31-generic ...'
    	linux	/boot/vmlinuz-3.2.0-31-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro recovery nomodeset 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.2.0-31-generic
    }
    submenu "Previous Linux versions" {
    menuentry 'Ubuntu, with Linux 3.2.0-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	linux	/boot/vmlinuz-3.2.0-29-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro   quiet radeon.audio=1
    	initrd	/boot/initrd.img-3.2.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	echo	'Loading Linux 3.2.0-29-generic ...'
    	linux	/boot/vmlinuz-3.2.0-29-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro recovery nomodeset 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.2.0-29-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	gfxmode $linux_gfx_mode
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro   quiet radeon.audio=1
    	initrd	/boot/initrd.img-3.2.0-23-generic
    }
    menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	echo	'Loading Linux 3.2.0-23-generic ...'
    	linux	/boot/vmlinuz-3.2.0-23-generic root=UUID=361a5563-f447-42ea-b5ef-c3be733df368 ro recovery nomodeset 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-3.2.0-23-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='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(hd0,msdos1)'
    	search --no-floppy --fs-uuid --set=root 361a5563-f447-42ea-b5ef-c3be733df368
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ "x${timeout}" != "x-1" ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    ### END /etc/grub.d/30_os-prober ###
    
    menuentry 'Fedora (3.5.4-1.fc17.x86_64)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-753d40c0-9f28-4011-a8c6-7b6da842e0ad' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_msdos
    	insmod ext2
    	set root='hd0,msdos3'
    	if [ x$feature_platform_search_hint = xy ]; then
    	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  4e11a723-32c9-42eb-b549-3ded0494c281
    	else
    	  search --no-floppy --fs-uuid --set=root 4e11a723-32c9-42eb-b549-3ded0494c281
    	fi
    	echo 'Loading Fedora (3.5.4-1.fc17.x86_64)'
    	linux	/vmlinuz-3.5.4-1.fc17.x86_64 root=/dev/mapper/vg-lv_root ro rd.md=0 rd.dm=0  KEYTABLE=us SYSFONT=True rd.lvm.lv=vg/lv_root rd.luks=0 rd.lvm.lv=vg/lv_swap LANG=en_US.UTF-8 rhgb radeon.audio=1 quiet
    	echo 'Loading initial ramdisk ...'
    	initrd /initramfs-3.5.4-1.fc17.x86_64.img
    }
    
    ### 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 ###

  10. #20
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Post the contents of /etc/default/grub folder too.

    You GRUB Menu has a lot of entries. Do you want to keep that all or remove a few? Do you want to keep/require memtest entries too? I would suggest you to remove unused, older Ubuntu kernels too.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

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