If you are on a non-systemd system, or used a bootloader other than systemd-boot, you may want to use kexec more directly. This is likely to be faster than using sysrq, since it doesn't involve a POST or any other time spent in the board firmware. It will unmount writable filesystems, but it will not do anything to read-only filesystems. If you're on a systemd-based system, loaded with systemd-boot, you can run systemctl kexec -forceĪnd it will boot into your current kernel without shutting down services. If you would like to restart immediately instead of powering off, you can send "b" instead of "o" but keep in mind that while sysrq-trigger is the fastest way to shut down, there may be faster ways to restart.īoard firmware (BIOS/UEFI) can take a lot of time to reinitialize hardware, so it is usually faster to use kexec to effect the restart, because the hardware remains initialized. There is a sysctl option about sysrq, but option only affects triggering by keyboard. You can power off the machine immediately without syncing disks by writing "o" to /proc/sysrq-trigger as root, or as any user with write permissions on that file.Īs a shell script it would look something like #!/bin/sh Only problem was that we had to shutdown the machine and bring it up again as soon as first user leaves the machine.Īnd I wanted that shutdown to be instantly fast ( - that's why the question) and the next boot up to be very fast too for which I researched and tried large number of Linux distributions from Damn Small Linux to Slackware to Debian etc. but we developed a way to always have fresh Operating System (as if it was newly installed) for a new user of the system. How was the system making sure of it? Well, details cannot be shared because that's not public info. System built was making sure that a second user can in no way get information (email, credit cards) of the previous user of that system even if keyloggers kind of softwares somehow get installed. People can use that system for internet surfing, checking their email or even bookings etc. We were building a system to be deployed in public spaces like (airports, hotels etc). Here is the scenario for which this question was asked some years ago. Update (2016): suggested that I should add some information to the question describing nature of the problem - mainly which scenario was I trying to solve. Update (2015): Thank you to those who have suggested to turn off using the power socket. Is there any command / program via which I may shutdown my system instantly (1 to 5 secs)?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |