08-27-2016, 08:11 PM
(This post was last modified: 08-27-2016, 08:22 PM by gold_finger.)
Tested out solution suggested by 5th poster down on that askubuntu link you referenced and that seemed to do the trick. Going to post steps for you below to duplicate what I did, but note that I did this on a Mint system (not LL), so line for GRUB_DISTRIBUTOR= in my /etc/default/grub file will probably look different than yours. Don't touch that line in yours -- only make changes to yours where I've highlighted in RED.
IMPORTANT NOTE: For initial testing purposes, change the GRUB_DEFAULT= line on yours to have LL be the default boot instead of Windows. Reason for that is because you are going to want to test out whether pressing left <SHIFT> key during startup actually does work to bring up the hidden grub menu. If it doesn't, then you'll be stuck only being able to boot into Windows and will make correcting situation more difficult. (You'll end up having to use a live LL dvd/usb to fix the problem.) Once you confirm that left <SHIFT> does work, then you can change value back to boot Windows as default.
Here we go.
Open a terminal and use this command to make a backup copy of the current /etc/default/grub file.
Use next command to make a new file that will be used by grub telling it to hide the menu.
Make that file executable.
Now use this command to open the file with your text editor -- you'll need to enter your password again and the file will be blank.
gksu leafpad /etc/grub.d/50_hidemenu
Now copy/paste all of the following into the file, then hit "Save".
Now you'll want to make some changes to the /etc/default/grub file. Remember, change the GRUB_DEFAULT= line to make LL the default boot for now. (You can change it back to Windows default after testing that you can show grub menu on startup with the left <SHIFT> key.) Other than that, just change the lines I have highlighted in RED.
Open the file in text editor with this command, then edit lines in red.
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=hidden
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
NOTE: if there is a "#" at beginning of GRUB_HIDDEN_TIMEOUT line, delete the "#" so line appears as above.
Save the changes to the file and close the text editor.
Back in terminal run this command to update grub with the changes.
Reboot computer and see if grub menu is now hidden and computer just boots straight into LL.
Reboot again to test if hitting the left <SHIFT> key immediately after Bios screen displays brings up the grub menu. Timing can be a little tricky on this, so if you don't get it to work on first try do it another time or two. It took me two times to get it. What I did was push and hold down the left <SHIFT> key instead of just tapping on it.
If menu is still not being hidden on startup, run following command in terminal and copy/paste output back here for us to look at.
If all is working well, change default grub boot back to Windows. Open grub file with text editor again with this terminal command.
Change the GRUB_DEFAULT= line to whatever the default value is for Windows, then save file and close editor.
Update grub again to set the change.
Now computer should boot into Windows unless you hit the left <SHIFT> key to bring up grub menu.
IMPORTANT NOTE: For initial testing purposes, change the GRUB_DEFAULT= line on yours to have LL be the default boot instead of Windows. Reason for that is because you are going to want to test out whether pressing left <SHIFT> key during startup actually does work to bring up the hidden grub menu. If it doesn't, then you'll be stuck only being able to boot into Windows and will make correcting situation more difficult. (You'll end up having to use a live LL dvd/usb to fix the problem.) Once you confirm that left <SHIFT> does work, then you can change value back to boot Windows as default.
Here we go.
Open a terminal and use this command to make a backup copy of the current /etc/default/grub file.
Code:
sudo cp /etc/default/grub /etc/default/grub.bak
Use next command to make a new file that will be used by grub telling it to hide the menu.
Code:
sudo tee /etc/grub.d/50_hidemenu
Make that file executable.
Code:
sudo chmod +x /etc/grub.d/50_hidemenu
Now use this command to open the file with your text editor -- you'll need to enter your password again and the file will be blank.
gksu leafpad /etc/grub.d/50_hidemenu
Now copy/paste all of the following into the file, then hit "Save".
Code:
#!/bin/sh
cat <<EOF
if [ "x\${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
set timeout=0
fi
fi
fi
EOF
Now you'll want to make some changes to the /etc/default/grub file. Remember, change the GRUB_DEFAULT= line to make LL the default boot for now. (You can change it back to Windows default after testing that you can show grub menu on startup with the left <SHIFT> key.) Other than that, just change the lines I have highlighted in RED.
Open the file in text editor with this command, then edit lines in red.
Code:
gksu leafpad /etc/default/grub
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=hidden
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
NOTE: if there is a "#" at beginning of GRUB_HIDDEN_TIMEOUT line, delete the "#" so line appears as above.
Save the changes to the file and close the text editor.
Back in terminal run this command to update grub with the changes.
Code:
sudo update-grub
Reboot computer and see if grub menu is now hidden and computer just boots straight into LL.
Reboot again to test if hitting the left <SHIFT> key immediately after Bios screen displays brings up the grub menu. Timing can be a little tricky on this, so if you don't get it to work on first try do it another time or two. It took me two times to get it. What I did was push and hold down the left <SHIFT> key instead of just tapping on it.
If menu is still not being hidden on startup, run following command in terminal and copy/paste output back here for us to look at.
Code:
cat /etc/default/grub
If all is working well, change default grub boot back to Windows. Open grub file with text editor again with this terminal command.
Code:
gksu leafpad /etc/default/grub
Change the GRUB_DEFAULT= line to whatever the default value is for Windows, then save file and close editor.
Update grub again to set the change.
Code:
sudo update-grub
Now computer should boot into Windows unless you hit the left <SHIFT> key to bring up grub menu.
Try Linux Beginner Search Engine for answers to Linux questions.