I recently found out that reboot
works just as well as sudo reboot
, from what I can tell. However, in a lot of instances, I see people saying to sudo reboot
. Why is this? Are they the same, and just personal preference? Or are they different? Does sudo reboot
do more than reboot
?
Under what circumstances is a reboot of an Ubuntu system necessary? I often read in answers that after changes in the system the system is to be restarted, but is that absolutely necessary?
A Thinkpad X220 (Core-i5, SandyBridge, Intel GMA) running Precise 64-bit has rebooted hard twice in the last four days. I was doing nothing more than writing an email. No warning. It just went black, and the next thing I saw was the Lenovo boot screen.
Where should I look to find the cause? I fear that this immediate reboot does not leave time for logs to be written...
Thanks!
I'm looking for a way to reboot into Windows from Ubuntu on a 10.10/Vista dual boot system. The specific use case is that I would like to be able to ssh into my running Ubuntu instance and issue a command that will initiate a reboot directly into Windows.
I found a promising blog post, but the script that it suggests isn't working:
#!/bin/bash
WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
sudo grub-reboot $MENU_NUMBER
sudo reboot
man grub-reboot
isn't much help, but it seems to be leading me in the right direction:
set the default boot entry for GRUB, for the next boot only
WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg | grep --line-number Windows`
MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 ))
echo $MENU_NUMBER
This returns the expected value, but on reboot the first menu entry is still highlighted. Any ideas why this isn't working or suggestions for other solutions?
On occasion, my laptop has become stuck so I've used the magic key combination of Alt + SysRq + REISUB to perform a safe reboot. However, it doesn't seem to work for me as when I press the B key to complete the magic key command it simply says, "resetting..." and doesn't do anything.
All of the other keys seem to work fine as it resets the keyboard layout, kills all tasks etc., but it doesn't seem to complete with a reboot.
I was under the impression that my laptop should reboot after the magic keys have all been pressed in the order of REISUB.