Script for choose between kexec-tools (fast) & normal reboot

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

Script for choose between kexec-tools (fast) & normal reboot

Postby linmint777 on Wed Mar 30, 2011 3:37 am

hi, first of all sorry for my bad English.
I bring a solution to the problem caused by the kexec-tools, no need to remove it, use only the script that I offer you to choose between faster with kexec reboot or restart normally (with bios and grub).

1 .- download the file and extract the content (a folder called kexec switch)

2 .- Within the folder are 2 scripts, one in Spanish and in English.

3 .- Select the correct language script and copy it where you like.

4 .- Give execution permission:

Code: Select all
sudo chmod + x filename.sh


5 .- create a launcher for the script or copy it to your desktop.

6 .- Now we will edit the sudoers file
Open a terminal & run:

Code: Select all
EDITOR=nano
sudo visudo


Scroll to bottom of this file and add two lines:

Code: Select all
ALL ALL=NOPASSWD:/sbin/shutdown
ALL ALL=NOPASSWD:/sbin/coldreboot


save the file and exit.

7.- run the script and enjoy !!!
Attachments
kexec switch.tar.gz
(1.39 KiB) Downloaded 84 times
Last edited by linmint777 on Wed Mar 30, 2011 9:01 pm, edited 1 time in total.
Linux Mint #1 Distro.
http://mintyubuntu.blogspot.com
User avatar
linmint777
Level 5
Level 5
 
Posts: 648
Joined: Thu Nov 26, 2009 11:00 am

Linux Mint is funded by ads and donations.
 

Re: Script for choose between kexec-tools (fast) & normal re

Postby mads on Wed Mar 30, 2011 6:18 am

Thanks, but I use to disable/enable it by running "sudo dpkg-reconfigure kexec-tools".
Answer 'No' to deactivate or 'Yes' to activate when asked "Should kexec-tools handle reboots?
User avatar
mads
Level 6
Level 6
 
Posts: 1309
Joined: Wed Nov 03, 2010 3:44 pm

Re: Script for choose between kexec-tools (fast) & normal re

Postby linmint777 on Wed Mar 30, 2011 8:59 pm

Thanks, but I use to disable/enable it by running "sudo dpkg-reconfigure kexec-tools".
Answer 'No' to deactivate or 'Yes' to activate when asked "Should kexec-tools handle reboots?


yes, another way is to edit the file /etc/default/kexec "LOAD_KEXEC=TRUE" change to FALSE and run /etc/init.d/kexec start.
but, both ways involves opening the terminal (manually), with the script with 2 clicks automatically restart in the form you need.
Linux Mint #1 Distro.
http://mintyubuntu.blogspot.com
User avatar
linmint777
Level 5
Level 5
 
Posts: 648
Joined: Thu Nov 26, 2009 11:00 am


Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 1 guest