The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Is it possible to start different OSs (win/linux) using dedicated laptop buttons?

    Discussion in 'Linux Compatibility and Software' started by mzatanoskas, Jun 2, 2011.

  1. mzatanoskas

    mzatanoskas Notebook Geek

    Reputations:
    8
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    15
    Many (most?) modern laptops have dedicated buttons to start up some linux derivative for quick web access and or recovery of windows (like the Sony VAIO SB).

    I was wondering how difficult it would be to use these buttons to directly launch windows or linux or dualbooting systems?

    I guess there would be a fair bit of hassle because different drivers would be needed for different laptops, but surely possible no?

    Sounds minor but I'd love to be able to use different buttons to start up different OSs, save a couple of seconds of boot time(!) and half the time when I want to boot to windows, I forget to change the selection and have to restart when I hit the ubuntu logon screen!
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    I have seen this question posted about Asus laptops with the expressgate button, but in the end it isn't worth the trouble and I've never seen it done. I am positive it would be possible, but in the case of expressgate it needs a windows partition with the linux kernel on it, which is a bit ridiculous if you think about it (updating the kernel becomes an annoyance).

    Why not just use the following settings in your /etc/default/grub to allow your last OS choice to be saved as the default across reboots?

    First open up the config file in an editor as root, like this:
    Code:
    gksudo gedit /etc/default/grub
    The first line with GRUB_DEFAULT will already exist, change its value to saved. The second you will probably have to add in (anywhere).
    Code:
    GRUB_DEFAULT=saved
    GRUB_SAVEDEFAULT=true
    Then run sudo update-grub and the next time you choose windows at the grub boot menu it will remember that until you choose linux, etc. You can also use the grub-reboot command to reboot into another OS from linux.

    If you run this command you will get a numbered list of the items in your grub boot menu:
    Code:
    grep ^menuentry /boot/grub/grub.cfg | nl -v0
    You can then issue the grub-reboot command as root for the number you want to reboot into, let's say entry number 9 is windows:
    Code:
    sudo grub-reboot 9
    Now when you reboot your grub default will temporarily be windows until you choose another option on a subsequent reboot.

    Documentation for these features can be found in this section of the grub manual: http://www.gnu.org/software/grub/manual/grub.html#Simple-configuration