Page 41 of 94 FirstFirst ... 3139404142435191 ... LastLast
Results 401 to 410 of 931

Thread: Grub 2 Basics

  1. #401
    Join Date
    Jun 2007
    Location
    NYC
    Beans
    2,179
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Basics

    I'm trying to figure out how to do something very simple that isn't explicitly shown in any guide.

    I have dual boot between Ubuntu 9.10 and Windows XP.
    I want it to:
    • Make XP the default (done)
    • not show any menu unless I hold shift

    That second one I cannot find out how to do, I'm guessing some script with 40_custom script but I don't know what.

    Basically I just want the appearance that GRUB doesn't even exist, it boots to XP without any visual change (currently it shows the GRUB menu which made other users feel Windows did not shut down properly)
    If the only reason you think your software is better is because it's FOSS, you need to write better software

  2. #402
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by Merk42 View Post
    I'm trying to figure out how to do something very simple that isn't explicitly shown in any guide.

    I have dual boot between Ubuntu 9.10 and Windows XP.
    I want it to:
    • Make XP the default (done)
    • not show any menu unless I hold shift

    That second one I cannot find out how to do, I'm guessing some script with 40_custom script but I don't know what.

    Basically I just want the appearance that GRUB doesn't even exist, it boots to XP without any visual change (currently it shows the GRUB menu which made other users feel Windows did not shut down properly)
    EDIT: Go to post #408 for a workaround on a dual-boot system to allow no menu with the capability to interrupt the boot using the SHIFT key.

    There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout.

    In your current situation, does the system boot eventually without your intervention? If not, and you must press ENTER, you may have a "recordfail" event that is preventing automatic boot. If it currently boots but displays the menu for a while before proceeding without your input, the above setting should allow it to boot without the menu.
    Last edited by drs305; March 31st, 2010 at 10:01 PM.
    GRUB2

    Retired.

  3. #403
    Join Date
    Jun 2007
    Location
    NYC
    Beans
    2,179
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Basics

    Quote Originally Posted by drs305 View Post
    There should be no # symbol at the start of the line: GRUB_HIDDEN_TIMEOUT=0 line. "0" will boot the system without a timeout.

    In your current situation, does the system boot eventually without your intervention? If not, and you must press ENTER, you may have a "recordfail" event that is preventing automatic boot. If it currently boots but displays the menu for a while before proceeding without your input, the above setting should allow it to boot without the menu.
    There is no # in front of GRUB_HIDDEN_TIMEOUT=0

    Currently it shows GRUB, with Windows XP selected by default, counts down, then boots XP.


    I do want XP as default, I'd just like the GRUB menu to not show at all (unless I actively hold SHIFT during boot)
    If the only reason you think your software is better is because it's FOSS, you need to write better software

  4. #404
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by Merk42 View Post
    There is no # in front of GRUB_HIDDEN_TIMEOUT=0

    Currently it shows GRUB, with Windows XP selected by default, counts down, then boots XP.


    I do want XP as default, I'd just like the GRUB menu to not show at all (unless I actively hold SHIFT during boot)
    I forgot that on multi-system computers the GRUB_HIDDEN_TIMEOUT feature doesn't work (as you have found). Leave it set at 0 however, and set the GRUB_TIMEOUT to 0 and it should boot without hesitation.

    One problem is that it also won't allow the SHIFT key to be active if 30_os-prober is deactivated, as the SHIFT keystatus check is part of the 30_os-prober script. If you want to bypass 30_os-prober and use a custom entry you can modify the scripts to re-add this feature back which is a good idea since otherwise you can't manually override the automatic boot.

    In your case, as long as 30_os-prober is executable, setting GRUB_TIMEOUT=0 should be sufficient.
    Last edited by drs305; March 31st, 2010 at 06:16 PM.
    GRUB2

    Retired.

  5. #405
    Join Date
    Jun 2007
    Location
    NYC
    Beans
    2,179
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Basics

    Quote Originally Posted by drs305 View Post
    One problem is that it also won't allow the SHIFT key to be active if 30_os-prober is deactivated, as it bypasses this part of the 30_os-prober script. If you want to bypass 30_os-prober and use a custom entry you can modify the scripts to re-add this feature back which is a good idea since otherwise you can't manually override the automatic boot.

    In your case, as long as 30_os-prober is executable, setting GRUB_TIMEOUT=0 should be sufficient.
    How do I do this?
    If the only reason you think your software is better is because it's FOSS, you need to write better software

  6. #406
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Basics

    Quote Originally Posted by Merk42 View Post
    How do I do this?
    To be clear, copying the keystatus check is only necessary if you plan on not using /etc/grub.d/30_os-prober. But if you do plan on using a custom script and disabling 30_os-prober, here is the section which activates the keystatus check for a depressed SHIFT key:
    if [ \${timeout} != -1 ]; then
    if keystatus; then
    if keystatus --shift; then
    set timeout=-1
    else
    set timeout=0
    fi
    else
    if sleep$verbose --interruptible 3 ; then
    set timeout=0
    fi
    fi
    fi
    You could add this section to another script which would be run, such as 00_header or even your custom script. Start the new section with:
    cat << EOF
    and end the section with:
    EOF
    GRUB2

    Retired.

  7. #407
    Join Date
    Jun 2007
    Location
    NYC
    Beans
    2,179
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Basics

    Welp, added the timeout 0 and now it won't boot to Ubuntu at all. Tried to run a LiveCD to increase the timeout but I can't run 'sudo update-grub' because "grub-probe: error: cannot find a device for /"

    Why would I not use "/etc/grub.d/30_os-prober"? I don't even understand what that is!

    All I did was set the default to XP and then try and get the menu to not show up unless I hold shift. Apparently that's far toooo complicated of a suggestion to do for this GRUB2. Since now I can't even boot Ubuntu, I guess I'm stuck with installing it all over again.
    If the only reason you think your software is better is because it's FOSS, you need to write better software

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

    Re: Grub 2 Basics

    Updating this post:
    The problem appears to be that the keystatus check is embedded in the /etc/grub.d/30_os-prober script. If the first conditional isn't met, the keystatus check is not run.

    The solution is to comment out the first condition, which checks to see if another OS is located. If you disable the first conditional the keystatus check will work and SHIFT will interrupt the boot. Find the section below in /etc/grub.d/30_os-prober and place a comment where indicated. On both my Grub 1.97~beta and 1.98 versions, the lines to change are currently lines 28 and 62.

    gksu gedit +27 /etc/grub.d/30_os-prober
    adjust_timeout () {
    # if [ "x${found_other_os}" = "x" ] ; then
    if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
    if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
    verbose=
    else
    verbose=" --verbose"
    fi

    if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
    cat <<EOF
    if [ \${timeout} != -1 ]; then
    if keystatus; then
    if keystatus --shift; then
    set timeout=-1
    else
    set timeout=0
    fi
    else
    if sleep$verbose --interruptible 3 ; then
    set timeout=0
    fi
    fi
    fi
    EOF
    else
    cat << EOF
    if [ \${timeout} != -1 ]; then
    if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
    set timeout=0
    fi
    fi
    EOF
    fi
    fi
    # fi
    }
    Save the file and then run "sudo update-grub" to put the changes into grub.cfg
    Last edited by drs305; March 31st, 2010 at 09:33 PM.
    GRUB2

    Retired.

  9. #409
    Join Date
    Dec 2006
    Beans
    78

    Re: Grub 2 Basics

    Quote Originally Posted by drs305 View Post
    I don't know the specifics of which partitions Grub2 is writing to on your system. Here are some options:
    I fixed this by removing the /boot/grub/grubenv file.

  10. #410
    Join Date
    Jun 2007
    Location
    NYC
    Beans
    2,179
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Basics

    Been busy, but that did indeed work drs305
    If the only reason you think your software is better is because it's FOSS, you need to write better software

Page 41 of 94 FirstFirst ... 3139404142435191 ... 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
  •