Page 50 of 94 FirstFirst ... 40484950515260 ... LastLast
Results 491 to 500 of 931

Thread: Grub 2 Basics

  1. #491
    Join Date
    May 2010
    Beans
    1

    Re: Grub 2 Basics

    Hello !
    Even with the solution done a few messages above the saved option still doesn't work for me !
    I change the /etc/default/grub as you can see below.
    Made an update with
    Code:
    sudo update-grub
    My config lynx 64bits
    grub version1.98.1

    any idea ?


    my /etc/default/grub
    Code:
     If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    
    GRUB_DEFAULT=saved
    GRUB_SAVEDEFAULT=true
    #GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=false
    GRUB_TIMEOUT="8"
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    
    # 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=1024x768
    
    # 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 entrys
    #GRUB_DISABLE_LINUX_RECOVERY="true"
    My

    Code:
    cat /boot/grub/grub.cfg 
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/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
      load_env
    fi
    set default="${saved_entry}"
    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
    }
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=1024x768
      insmod gfxterm
      insmod vbe
      if terminal_output gfxterm ; then true ; else
        # For backward compatibility with versions of terminal.mod that don't
        # understand terminal_output
        terminal gfxterm
      fi
    fi
    insmod ext2
    set root='(hd0,7)'
    search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
    set locale_dir=($root)/boot/grub/locale
    set lang=fr
    insmod gettext
    if [ ${recordfail} = 1 ]; then
      set timeout=-1
    else
      set timeout=8
    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
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, avec Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        linux    /boot/vmlinuz-2.6.32-22-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro   quiet splash
        initrd    /boot/initrd.img-2.6.32-22-generic
    }
    menuentry 'Ubuntu, avec Linux 2.6.32-22-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        echo    'Chargement de Linux 2.6.32-22-generic ...'
        linux    /boot/vmlinuz-2.6.32-22-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro single 
        echo    'Chargement du disque mémoire initial...'
        initrd    /boot/initrd.img-2.6.32-22-generic
    }
    menuentry 'Ubuntu, avec Linux 2.6.31-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        linux    /boot/vmlinuz-2.6.31-20-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro   quiet splash
        initrd    /boot/initrd.img-2.6.31-20-generic
    }
    menuentry 'Ubuntu, avec Linux 2.6.31-20-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        savedefault
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        echo    'Chargement de Linux 2.6.31-20-generic ...'
        linux    /boot/vmlinuz-2.6.31-20-generic root=UUID=1cc43d08-4c75-41f1-ad23-7681465167a2 ro single 
        echo    'Chargement du disque mémoire initial...'
        initrd    /boot/initrd.img-2.6.31-20-generic
    }
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod ext2
        set root='(hd0,7)'
        search --no-floppy --fs-uuid --set 1cc43d08-4c75-41f1-ad23-7681465167a2
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Microsoft Windows XP Professionnel (on /dev/sda1)" {
        savedefault
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 5aa492ada4928ae1
        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 ###

  2. #492
    Join Date
    May 2010
    Beans
    9

    Re: Grub 2 Basics

    Quote Originally Posted by drs305 View Post
    External Drive Installs - Bug bug/496435
    Installs of Ubuntu on external drives can cause problems as grub-install uses device names (e.g. sda, sdb) rather than UUIDs in certain circumstances. If connected to another machine when an update of grub-pc is made, the upgrade may be written to the incorrect device and make the computer unbootable.

    A workaround is posted on the bug link above.

    The workaround (run "sudo dpkg-reconfigure grub-pc") does NOT work. Please tell me how to boot Ubuntu from my external disk. Now I am forced to use only on the pc I have installed it.

  3. #493
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by saccard View Post
    The workaround (run "sudo dpkg-reconfigure grub-pc") does NOT work. Please tell me how to boot Ubuntu from my external disk. Now I am forced to use only on the pc I have installed it.
    First, subscribe to the bug report if you believe that bug is what is causing your problems. You can then get emails when others offer solutions within the bug report thread.

    Secondly, please start a thread of your own restating what you have done and what your problem is. You are more likely to have success in a new thread.

    Post the results of meierfra's boot info script. Place the results between "code" tags by selecting the "#" icon in the post's menu. Run the script with your external drive connected so the script will see it.
    http://bootinfoscript.sourceforge.net/

    With that information someone familiar with booting with an external drive will hopefully be able to help with this issue.
    GRUB2

    Retired.

  4. #494
    Join Date
    Dec 2006
    Location
    Stockholm
    Beans
    314
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Grub 2 Basics

    Quote Originally Posted by Callius View Post
    I had (still have, actually) Vista installed on one of my HDDs and installed 10.04 on one of my other HDDs (both SATA).

    Now, I can't boot into Vista. Whenever I do update-grub I get the following output:

    Code:
    Generating grub.cfg ...
    Found linux image: /boot/vmlinuz-2.6.32-22-generic
    Found initrd image: /boot/initrd.img-2.6.32-22-generic
    Found linux image: /boot/vmlinuz-2.6.32-21-generic
    Found initrd image: /boot/initrd.img-2.6.32-21-generic
    Found memtest86+ image: /boot/memtest86+.bin
    done
    I've tried reading through the grub2 tutorial stuff and holy crap it's confusing... Can anyone help me figure out why my Vista partition isn't being picked up by Grub?

    Thanks!
    Callius, the problem seems to be the manner in which the update rewrites your machine's MBR file. You might want to take a look at the testdisk workaround, which repairs the file. This has worked for me in a situation similar to yours, as well as for many others....

    Henri

  5. #495
    Join Date
    Jan 2008
    Beans
    32
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Grub 2 Basics

    Thanks for the tip on removing entries. As the latest version of StartUp-Manager won't do that I'll have to do it via Synaptic.
    Hack to learn, not learn to hack

  6. #496
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    @drs305

    hello,

    scenario - karmic on sda8 with grub2 v197 lucid on sda10 with 198 ubuntu6 grub2. after lucid install 298 became the bootloader w afferent menu.

    problem/issue - as usual during update procedure grub.cfg on karmic was updated; the procedure could 'see' the new ...-22 kernel as well as lucid. but, upon the mandatory restart grub2 197 became active all of a sudden and displayed ONLY the old kernel ...-20 version AND NO lucid boot option, contrary to what was presented during update.

    rebooted again and edited 197 entry asking to boot ...-22 kernel - t did it with no problem then grub.cfg was checked - all entries are exactly as displayed during update.

    then I booted up with a backup floppy - it booted 198 as it was before karmic update; grub.cfg in lucid intact.

    I tried several time to recover 198 in lucid using live CD chroot procedure - no joy, every time I was informed that grub2 was installed and upom reboot the karmic crippled 197 keeps on displaying regardless.

    no update-grub command could do any good neither in karmic nor in lucid.

    do have any idea/solutions as to how to get 198 menu displayed again ? do I miss any entries in /etc/default/grub on either karmic or lucid ? quie possible maybe with all those rapid upgrades from 197 to 198.

    thank you and best regards.

  7. #497
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    sorry drs305, correction pls ....'lucid install 298'... should read ...'lucid install 198'...

  8. #498
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    peter b, Are these installs on different drives or did you install Grub2 to specific partitions?

    You can try running the following command from your Lucid install:
    Code:
    sudo dpkg-reconfigure grub-pc
    You can accept the defaults for the entries on the Linux lines (tab to "OK"). If asked if you want to keep the local version or use the maintainer's version, I'd recommend the maintainer's version to get any changes to Grub2. (If you have made a lot of customizations you could back up your /etc/default/grub file and the /etc/grub.d folder).

    When the command gets to the drives/partitions, select only your primary Lucid drive and deselect any partitions which may be designated by an asterisk. Deselect them with the space bar, then tab to OK.

    If this doesn't resolve things, post the results of the following script between 'code' tags (click the # icon in the post's menu).
    http://bootinfoscript.sourceforge.net
    GRUB2

    Retired.

  9. #499
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: Grub 2 Basics

    First I would boot to 10.04 (known to me as Lounge Lizard) and run;
    [code]
    sudo update-grub
    [/code/
    Then;
    Code:
    sudo grub-mkconfig
    this will read out your /boot/grub/grub.cfg file and you can see if the right kernel shows up. If it does great. If not, not so great.

    In either case I would then run;
    Code:
    sudo grub-install /dev/sda
    because that version of grub is better.

    Boot to 9.10 and, if you are not running on the new kernel, go to synaptic and make sure the bugger is installed.

    You can see what it is running on by;
    Code:
    uname -a
    If it is not on the new kernel and the kernel is installed put this in your 10.04 /etc/grub.d/40_custom file;
    echo "Adding Main on sda6" >&2
    cat << EOF
    menuentry "Karmic on sda8" {
    set root=(hd0,8)
    linux /vmlinuz root=/dev/sda6 ro quiet splash
    initrd /initrd.img
    }
    EOF
    and then run;
    Code:
    sudo update-grub
    and;
    Code:
    sudo grub-mkconfig
    make sure that is down toward the end of the read out and reboot and try that.

    If none of that works start a new thread, with a link to it here, and post the entire results text from;

    http://bootinfoscript.sourceforge.net/
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

  10. #500
    Join Date
    Sep 2006
    Beans
    39

    Re: Grub 2 Basics

    drs305.

    re ...'Are these installs on different drives or did you install Grub2 to specific partitions?'...no on both accounts. grub2 on neither karmic nor lucid (at their respective install times) required any interventions/editing or customization - on both installs they are in a plain 'vanilla'state , in a pristine state as the os installed it. they worked to my satisfaction right off the box so to speak.

    I'll try a reconfig of grub-pc in lucid as suggested and see how it goes; I was tempted to do it but hesitated because never did it before and was afraid of wrecking maybe both, the currently crippled 197 in karmic as well as 198 in lucid. before running it I'll try to document myself as far as I can with the inner workings of grub-pc reconfigure cmd.

    @ranch hand

    update-grub and grub-mkconfig cmd from what I could see 'sees' everything that was and is in the grub.cfg - I compared the backup with the newly created file - no diff at all.

    sudo grub-install /dev/sda tells me 'Installation finished. No error reported.' in lucid. in karmic I did not do it because karmic option was always under grub 198 menu in lucid install. I do not really know whether it would be wise to try/attempt a karmic grub v197 repair if I can get eventually grub 198 under lucid repaired/installed/recovered that will see karmic too

    re
    echo "Adding Main on sda6" >&2
    cat << EOF
    menuentry "Karmic on sda8" {
    set root=(hd0,
    linux /vmlinuz root=/dev/sda6 ro quiet splash
    initrd /initrd.img
    }
    EOF

    I think you meant sda8 above not sda6.

    thank you both; I'll keep you posted how things developed either here or a new thread as suggested. interesting stuff though. in the meantime I'm getting the stuff that I care about backed up just in case - maybe I'll have to hose both and reinstall.

Page 50 of 94 FirstFirst ... 40484950515260 ... LastLast

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
  •