Announcement

Collapse
No announcement yet.

Can someone help me figure out my grub.cfg, thank you in advance :]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can someone help me figure out my grub.cfg, thank you in advance :]

    Acording to this site http://askubuntu.com/questions/43732...-edit-grub-cfg , I should be able to
    Edit /etc/grub.d/10_linux instead and run sudo update-grub when you are done. This is a more reliable method, otherwise every time you upgrade to a new kernel your /boot/grub/grub.cfg will be overwritten and you will lose your changes.
    but when I attempt to edit /etc/grub.d/10_linux , no such file exists. So I have posted my /boot/grub/grub.cfg and I would hope someone could take a look at it and see if anything is wrong with it. I am using Kubuntu 14.04_64 / single boot / with kernel 3.17.2-031702-generic #201410301416 SMP. I had to resort to using Grub Customizer to configure my grub, however I had a few questions. Why is MSDOS included in the set root='hd0,msdos1' part of the .cfg file. Why do I have a /etc/grub.d/10_linux_proxy, is this normal? I have compared my grub.cfg to fresh post install .cfg grub configs and it looks different.

    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
    if [ "${next_entry}" ] ; then
       set default="${next_entry}"
       set next_entry=
       save_env next_entry
       set boot_once=true
    else
       set default="0"
    fi
    
    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 recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; 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 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  c2590e88-813b-4481-b1e2-cfc449cedb00
    else
      search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
    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
    if [ "${recordfail}" = 1 ] ; then
      set timeout=-1
    else
      if [ x$feature_timeout_style = xy ] ; then
        set timeout_style=menu
        set timeout=10
      # Fallback normal timeout code in case the timeout_style feature is
      # unavailable.
      else
        set timeout=10
      fi
    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
    #set_background_image "images/tile.png";
    
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 0,0,0; then
      clear
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux_proxy ###
    menuentry "Ubuntu, with Linux 3.17.2-031702-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.17.2-031702-generic-advanced-c2590e88-813b-4481-b1e2-cfc449cedb00' {
            recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            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  c2590e88-813b-4481-b1e2-cfc449cedb00
            else
              search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
            fi
            echo    'Loading Linux 3.17.2-031702-generic ...'
            linux    /boot/vmlinuz-3.17.2-031702-generic root=UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 ro selinux=0 security=selinux quiet splash crashkernel=384M-:128M $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.17.2-031702-generic
    }
    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
    
    menuentry "Ubuntu, with Linux 3.17.2-031702-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.17.2-031702-generic-recovery-c2590e88-813b-4481-b1e2-cfc449cedb00' {
            recordfail
            load_video
            insmod gzio
            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  c2590e88-813b-4481-b1e2-cfc449cedb00
            else
              search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
            fi
            echo    'Loading Linux 3.17.2-031702-generic ...'
            linux    /boot/vmlinuz-3.17.2-031702-generic root=UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 ro recovery nomodeset selinux=0 security=selinux
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.17.2-031702-generic
    }
    menuentry "Ubuntu, with Linux 3.16.2-031602-generic" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.2-031602-generic-advanced-c2590e88-813b-4481-b1e2-cfc449cedb00' {
            recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            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  c2590e88-813b-4481-b1e2-cfc449cedb00
            else
              search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
            fi
            echo    'Loading Linux 3.16.2-031602-generic ...'
            linux    /boot/vmlinuz-3.16.2-031602-generic root=UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 ro selinux=0 security=selinux quiet splash crashkernel=384M-:128M $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.16.2-031602-generic
    }
    menuentry "Ubuntu, with Linux 3.16.2-031602-generic (recovery mode)" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.2-031602-generic-recovery-c2590e88-813b-4481-b1e2-cfc449cedb00' {
            recordfail
            load_video
            insmod gzio
            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  c2590e88-813b-4481-b1e2-cfc449cedb00
            else
              search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
            fi
            echo    'Loading Linux 3.16.2-031602-generic ...'
            linux    /boot/vmlinuz-3.16.2-031602-generic root=UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 ro recovery nomodeset selinux=0 security=selinux
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.16.2-031602-generic
    }
    menuentry "Ubuntu" --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c2590e88-813b-4481-b1e2-cfc449cedb00' {
        recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        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  c2590e88-813b-4481-b1e2-cfc449cedb00
        else
          search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
        fi
        linux    /boot/vmlinuz-3.17.2-031702-generic root=UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 ro selinux=0 security=selinux quiet splash crashkernel=384M-:128M $vt_handoff
        initrd    /boot/initrd.img-3.17.2-031702-generic
    }
    ### END /etc/grub.d/10_linux_proxy ###
    
    ### 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'
        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  c2590e88-813b-4481-b1e2-cfc449cedb00
        else
          search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
        fi
        knetbsd    /boot/memtest86+.elf
    }
    menuentry 'Memory test (memtest86+, serial console 115200)' {
        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  c2590e88-813b-4481-b1e2-cfc449cedb00
        else
          search --no-floppy --fs-uuid --set=root c2590e88-813b-4481-b1e2-cfc449cedb00
        fi
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ### 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 also noticed ( and I apologize for adding this in here ) this is part of my fstab
    Code:
    UUID=c2590e88-813b-4481-b1e2-cfc449cedb00 /               ext4    noatime,nodiratime,commit=600,errors=remount-ro 0       1
    # /home was on /dev/sda2 during installation
    UUID=ac1aefd2-69aa-4ce2-9341-3f28a1c816b9 /home           ext4    defaults,noatime       0       2
    # swap was on /dev/sda5 during installation
    UUID=f7c78b56-7e43-40b7-8764-f1b69c256066 none            swap    sw              0       0
    Should each partition have a different UUID or is that for the entire disk? In my dmesg (SDA1) / partition shows up as this
    Code:
    EXT4-fs (sda1): re-mounted. Opts: commit=600,errors=remount-ro
    I am wondering why the noatime nor nodiratime is shown up, not to mention that this SSD is stuck in UDMA5 mode and it is a 256gb SSD Crucial M4 2.5 Model Number: M4-CT256M4SSD2 with firmware 070H which ran just fine under Windows, no I am NOT bashing Kubuntu, but I wish to somehow get some answers. Thank you for your time, whoever responds to this, really I appreciate it.
    Last edited by bonkers; Nov 21, 2014, 10:08 AM.

    #2
    What is it you're trying to accomplish?

    Edits to 10_linux might get wiped out also if grub gets updated so why edit it either? There's really no reason to muck about with grub.cfg at all as it gets wiped every time you run update-grub (like when a kernel is installed). I suspect you have 10_linux_proxy because you installed and used grub customizer - but that's just a guess. The "msdos" reference is to the partition table entry and has no other effects - so again - why mess with it? Is something not working right?

    If you want to change something in grub you should edit /etc/default/grub (and then run update-grub) or use System Settings > Start Up and Shut Down > GRUB2 Bootloader. If you need to add custom entries to grub, you're supposed to edit /etc/grub.d/40_custom or 41_custom.

    Also: Don't apologize for adding the part about your fstab and mounting questions - start another thread. You buried those questions in a thread about grub. You'll get a lot more help with those questions if you post a new thread with an appropriate title.

    Please Read Me

    Comment


      #3
      Originally posted by oshunluvr View Post
      Edits to 10_linux might get wiped out also if grub gets updated so why edit it either?
      Actually /etc/grub.d/10_linux is a so called "conffile" (of package grub-common), so it should not get automatically overwritten on upgrades (http://raphaelhertzog.com/2010/09/21...naged-by-dpkg/)

      Originally posted by oshunluvr View Post
      There's really no reason to muck about with grub.cfg at all as it gets wiped every time you run update-grub (like when a kernel is installed).
      Yup, directly editing grub.cfg is futile (as is resistance).

      Originally posted by oshunluvr View Post
      I suspect you have 10_linux_proxy because you installed and used grub customizer - but that's just a guess.
      Probably a good guess at that, although I haven't used grub-customizer and can't really confirm it.

      Originally posted by oshunluvr View Post
      What is it you're trying to accomplish?
      Yes, tell us what you wish to accomplish and we'll be better equipped to provide directions.

      Comment


        #4
        The file you're supposed to edit is /etc/grub.d/40_custom. Also, you can add your own scripts to that directory. If you don't want what's in 10_linux, you're supposed to chmod -x it.

        If you really want to take control, though, and hack grub.cfg as is your wont, one way is to create a small partition and install just grub on it. This is good when you've got several linux installs that you keep updated; they don't trample on each other, You can keep one as the master install, but if you want then to reinstall that one, and the reinstall fails, you get the grub rescue prompt.
        Of course, you have to update your grub.cfg manually, but ****, it's just a boot loader, so long as it does the job who cares how old and out of date it is. I update mine when there's a new install, and every few years have a look at where grub has got to and maybe redo my customizations on a recently generated grub.cfg. Last time I just ripped out all sorts of junk, my grub.cfg is about 100 lines, Trusty's one is 445.
        Regards, John Little

        Comment


          #5
          Kubicle: I assumed if grub-common got an upgrade, it might include 10_linux. I didn't think about the "keep the current version" pop-up. Thanks for the correction.

          Please Read Me

          Comment


            #6
            Guys I just realized, I have
            Code:
            BEGIN /etc/grub.d/10_linux_proxy
            NOT /etc/grub.d/10_linux, is this normal behavior.

            Comment

            Working...
            X