Associate a key to dual boot and reduce time

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Joao_costa

Associate a key to dual boot and reduce time

Post by Joao_costa »

Hello all. I installed Linux Mint 12 on my laptop and at the dual boot screen, i have about 9 seconds to choose the boot i want. My question is, is it possible to instead of having a dual boot choice, to have a key press choice (like F7) and if that key is not pressed while the system is booting, it starts windows directly, but if i press F7, i would enter Linux, like F8 in windows for choosing several boot choices. I would also like to know if i can reduce the 9 seconds obtion at dual boot, like to 3 seconds or something, is that possible? Thank you in advance for all or any help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: Associate a key to dual boot and reduce time

Post by DrHu »

OK, I'll bite..

You can reduce the boot time by changing your boot manager/loader (either Grub2 or windows NTLDR setting)
--you will; have to search how to do that
http://en.wikipedia.org/wiki/Comparison_of_boot_loaders

As to that first point, bypassing a default setting, that is normally boot windows, but use a bypass hotkey to boot Linux, possible but fairly pointless if you are using a multi-boot (dual-boot) system: the default boot will always be used
--and the menu is there to select any alternative
--you can make the boot menu display as short a time as you need, eg 3 secs, but then you have to be quick on the trigger to interrupt the default selected boot, in order to select another choice
  • It matters little if it is F8 or just rapidly selecting from the boot menu
    --the usual bios F(unction) keys can work or esc or whatever
Inkit

Re: Associate a key to dual boot and reduce time

Post by Inkit »

You can reduce the boot time by changing your boot manager/loader
To expand on Dr Hu's answer, there is an application called startup manager in the repositories that allows you to do this graphically. You can not only reduce the boot times, but you can change the default boot to whichever option you want. If you set the timer to 0 then you don't get a grub screen at all. And when you do want to enter the grub screen, I believe you press the shift key once the bios boots up. I'm not too sure of the key though, so check up on that.
Aging Technogeek

Re: Associate a key to dual boot and reduce time

Post by Aging Technogeek »

Most of what you want can be accomplished by editing the file /etc/default/grub as root.

Open a terminal and enter

Code: Select all

sudo gedit /etc/default/grub
To change the time out, change the number in this line "GRUB TIMEOUT=*"

To change the default boot from Mint to Windows, edit this line "GRUB DEFAULT = 0". Replace the 0 with the number of the entry in the boot menu corresponding to the OS you want to boot automatically. To determine this number,, press any key when the boot menu is on screen to stop the timer. Now count the number of lines from the top to the OS you want as default. Start the count at 0, not 1, as this is the way Grub numbers lines (so if Windows is the fifth line, you would enter 4 as the Grub Default ).

When you have made all the changes you want, click the "Save" button to save the changes, and run

Code: Select all

auso update-grub
to transfer the changes to the /boot/grub/grub.cfg file.
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

First of all, thank you all for your answers. Maybe i didn't explained me well so, this is the deal. I work on a company that develops their own software under windows. I have a company laptop where i want to install Linux Mint but, i don't want the company to know that. So i want to install Linux but when i turn the laptop on i want it to boot in windows unless i press some key, like shift that i've heard. Now i've followed some topics on this forum like changing a file in grub.d from 30 to 09, enabling in that file the shift function detection key, but none of that worked. Can anyone help me hide the menu and make it happear when i press a key? I even tried startup manager but i don't know if it affects all the files necessary for grub 2 because it has the option to disable text and background image and i thought that would hide the menu but it didn't worked. Thank you in advanced for all or any answer.
Inkit

Re: Associate a key to dual boot and reduce time

Post by Inkit »

If you set the timer to 0 then you don't get a grub screen at all. And when you do want to enter the grub screen, I believe you press the shift key once the bios boots up. I'm not too sure of the key though, so check up on that.
I believe that will solve your problem. By setting the countdown timer to 0 you do not get the 'menu' screen at all, but go straight to your default boot option. You only get the menu screen when you press the shift key.
wayne128

Re: Associate a key to dual boot and reduce time

Post by wayne128 »

Joao_costa wrote:First of all, thank you all for your answers. Maybe i didn't explained me well so, this is the deal. I work on a company that develops their own software under windows. I have a company laptop where i want to install Linux Mint but, i don't want the company to know that. So i want to install Linux but when i turn the laptop on i want it to boot in windows unless i press some key, like shift that i've heard. Now i've followed some topics on this forum like changing a file in grub.d from 30 to 09, enabling in that file the shift function detection key, but none of that worked. Can anyone help me hide the menu and make it happear when i press a key? I even tried startup manager but i don't know if it affects all the files necessary for grub 2 because it has the option to disable text and background image and i thought that would hide the menu but it didn't worked. Thank you in advanced for all or any answer.

Seriously, if you want to install Linux onto laptop that does not belong to you and you DO NOT want 'them' to know.......

I can tell you this, Don't do it, Don't touch the laptop internal hard disk....


just do this
get a 15G USB stick
install Linux OS to usb stick
when you felt like running Linux, plug in usb stick, and boot and run
when you want to run windows, reboot and it goes to windows as if linux does not exist..

one more thing, you can install virtualbox on Linux, then add windows os as a guess OS, that way you can even run linux and windows parallel ( at the same time, but winOS will be slower).
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

wayne128, Thank you for your answer. It's not like if the company would know, anything bad would happens, they probably would't even mind, but they would ask why i installed it, and bug me with that, but nothing serious would happen. As for your ideia os a usb boot, i already have that but, it's slower, it's buggy, and that's not what i want. Anyway, is there or is there not a way to hide grub menu and call it when i want? Thank you.
wayne128

Re: Associate a key to dual boot and reduce time

Post by wayne128 »

Joao_costa wrote:wayne128, Thank you for your answer. It's not like if the company would know, anything bad would happens, they probably would't even mind, but they would ask why i installed it, and bug me with that, but nothing serious would happen. As for your ideia os a usb boot, i already have that but, it's slower, it's buggy, and that's not what i want. Anyway, is there or is there not a way to hide grub menu and call it when i want? Thank you.
Instead of USB stick, you use 2.5 in USB drive, it will be quite fast!! I had it for a long time.

You can also install Linux OS, but no grub.
Then on Win7, go to NeoSmart, get EasyBCD, install it, add entry of grub2 and it will boot Linux OS.
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

Again wayne128, thank you for your answer but i really want a way to hide the menu having dual O.S. installed on the same hard drive, that's what i want. Even if the usb mettod with a 2.5 disk work well, i want what i said. Thank you.
Inkit

Re: Associate a key to dual boot and reduce time

Post by Inkit »

Under pain of being ignored again, I'll repeat what I said earlier. You can install mint on to the HD, and then install an application called startup manager. This application gives you the option of setting the countdown timer for grub as well as choosing the default OS to boot up with. By setting the countdown timer to 0 you ensure that the grub screen does not come up at all, and that the default boot (which you would presumably have set to windows) will start.
When you do want to use mint, all you do is tap the shift key during boot up. when you do this the grub screen appears and you can go down the menu choosing the OS you want to boot up.
I believe this will solve your question because you will not even get a flash from the grub screen and to all intents and purposes everyone will think that you only have windows on your system.
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

inkit, thank you for your reply and i'm sorry if i made you feel ignored. I've already tried startup manager and another software that i don't remember de name but, i also read in other foruns that when you have 1 linux os and another none linux, that method to hide the grub menu will not work and i saw for myself after trying several times and methods that it does't work. I've seen a laptop with windows 7 that had grub 4 dos installed and, the boot screen for grub 4 dos would only happear after pressing F8. i've searched a little about that but i didn't had much time. Has anyone used grub 4 dos that can help me setting it up? Will grub 4 dos solve my hidden menu problem? If not, what other method can i use? Is there a way to hide winxp boot menu instead of grub menu and call it with a key press?
wayne128

Re: Associate a key to dual boot and reduce time

Post by wayne128 »

I used one command in grub legacy to hide menu:
hiddenmenu

Just copy part of the /boot/grub/menu.lst for your reference

I must say this: YMMV. :mrgreen:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,10)
# kernel /boot/vmlinuz-version ro root=/dev/sda16
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda16
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title Fuduntu 2012 (Punny Name Serious Distro) (3.2.15-1.fu2012.i686)
root (hd0,5)
kernel /boot/vmlinuz-3.2.15-1.fu2012.i686 ro root=UUID=c2a04d09-cf5e-44$
initrd /boot/initramfs-3.2.15-1.fu2012.i686.img
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

wayne128, thank you for your answer. What do you mean with ymmv? I'll try it as soon as possible, and post result after.
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

I Just try to do what wayne128 said but i can't find menu lst, i'm trying to change grub cfg in boot/grub and grub in etc/default. Where should i put the hiddenmenu option? After do that, i just need to do the update-grub? Thank you.
wayne128

Re: Associate a key to dual boot and reduce time

Post by wayne128 »

Joao_costa wrote:I Just try to do what wayne128 said but i can't find menu lst, i'm trying to change grub cfg in boot/grub and grub in etc/default. Where should i put the hiddenmenu option? After do that, i just need to do the update-grub? Thank you.

The one I mentioned is grub legacy or grub 0.97.

You probably cannot use it on grub2 or grub 1.9x.
Joao_costa

Re: Associate a key to dual boot and reduce time

Post by Joao_costa »

wayne128, so, in other words, i just can't do it? Isn't there another way to hide the menu. Even by using the windows menu?

Than you all for your answers
Locked

Return to “Beginner Questions”