Debian /sbin/reboot Input/output Error
Contents |
# reboot bash: /sbin/reboot: Input/output error # shutdown -r now bash: /sbin/shutdown: Input/output error Obviously, there is a problem with your drive. These commands are failing because the kernel is unable to load the /sbin/reboot bash sbin reboot input output error and /sbin/shutdown binaries from the disk so that it can execute them. A fsck on sbin shutdown input output error the next boot might be able to correct whatever is wrong with the disk, but first you need to get the system to linux bash: input/output error reboot. If your machine is located at a managed hosting provider then you could submit a reboot ticket, but you'll have to wait for someone to take responsibility. Wouldn't it be nice if there was a way to ask input/output error ubuntu the kernel to reboot without needing to access the failing drive? Well, there is a way, and it is remarkably simple. The "magic SysRq key" provides a way to send commands directly to the kernel through the /proc filesystem. It is enabled via a kernel compile time option, CONFIG_MAGIC_SYSRQ, which seems to be standard on most distributions. First you must activate the magic SysRq option: echo 1 > /proc/sys/kernel/sysrq When you are ready to reboot the machine simply
/proc/sys/kernel/sysrq Permission Denied
run the following: echo b > /proc/sysrq-trigger This does not attempt to unmount or sync filesystems, so it should only be used when absolutely necessary, but if your drive is already failing then that may not be a concern. In addition to rebooting the system the sysrq trick can be used to dump memory information to the console, sync all filesystems, remount all filesystems in read-only mode, send SIGTERM or SIGKILL to all processes except init, or power off the machine entirely, among other things. Also, instead of echoing into /proc/sys/kernel/sysrq each time you can activate the magic SysRq key at system boot time using sysctl, where supported: echo "kernel.sysrq = 1" >> /etc/sysctl.conf If you would like to learn more about magic SysRq you can read the sysrq.txt file in the kernel documentation. ______________________ Cory Wright https://www.corywright.org/
Login to save this as favorite Comments Comment viewing options Flat list - collapsedFlat list - expandedThreaded list - collapsedThreaded list - expanded Date - newest firstDate - oldest first 10 comments per page30 comments per page50 comments per page70 comments per page90 comments per page150 comments per page200 comments per page250 comments per page300 comments per page Select your preferred way to display the comments and click "Save settings" to activate your changes. echo 1 > Submitted by asr (not verified) on Fri, 01/08/2010 - 07:18. echo 1 > /proc/sys/kernel/sysrq banot working (/sbin/reboot: Input/output error) - Reboot Linux in emergency using MagicSysRQ kernel sysctl variable I've been in a situation today, where one Linux server's hard drive SCSI driver or the physical drive is starting to break
Echo B Proc Sysrq Trigger
off where in dmesg kernel log, I can see a lot of errors like: [178071.998440] sd linux kernel reboot system call 0:0:0:0: [sda] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGEST_OK [178071.998440] end_request: I/O error, dev sda, sector 89615868 I tried a number of things to remount the hdd sudo input/output error which was throwing out errors in read only mode, but almost all commands I typed on the server were either shown as missng or returning an error: Input/output error Just ot give you an idea what I mean, http://www.linuxjournal.com/content/rebooting-magic-way here is a paste from the shell: linux-server:/# vim /etc/fstab
-bash: vim: command not found
linux-server:/# vi /etc/fstab
-bash: vi: command not found
linux-server:/# mcedit /etc/fstab
-bash: /usr/bin/mcedit: Input/output error
linux-server:/# fdisk -l
-bash: /sbin/fdisk: Input/output error After I've tried all kind of things to try to diagnose the server and all seemed failing, I thought next a reboot might help as on server boot the filesystems will get checked with http://www.pc-freak.net/blog/how-to-reboot-remotely-linux-server-if-reboot-shutdown-and-init-commands-are-not-working-sbinreboot-inputoutput-error-reboot-linux-in-emergency-using-magicsysrq-kernel-sysctl-variable/ fsck and fsck might be able to fix (at least temporary) the mess. I went on and tried to restart the system, and guess what? I got: /sbin/reboot init Input/output error I hoped that at least /sbin/shutdown or /sbin/init commands might work out and since I couldn't use the reboot command I tried this two as well just to get once again: linux-server:/# shutdown -r now
bash: /sbin/shutdown: Input/output error
linux-server:/# init 6
bash: /sbin/init: Input/output error You see now the situation was not pinky, it seemed there was no way to reboot the system … Moreover the server is located in remote Data Center and I the tech support there is conducting assigned task with the speed of a turtle. The server had no remote reboot, web front end or anything and thefore I needed desperately a way to be able to restart the machine. A bit of research on the issue has led me to other people who experienced the /sbin/reboot init Input/output error error mostly caused by servers with failing hard drives as well as due to HDD control driver bugs in the Linux kernel. As I was looking for another alternative way to reboot my Linux machine in hope this would help. I came across a blog post Rebooting the Magic Way - http://www.linuxjournal.com/content/rebooting-magic-way As it was suggested in Cory's blog a nic
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the http://superuser.com/questions/225788/ubuntu-input-output-error company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top ubuntu input/output error up vote output error 5 down vote favorite 2 I'm having a problem with Ubuntu that I'm finding hard to troubleshoot for reasons that will become clear: reboot -bash: /sbin/reboot: Input/output error dmesg -bash: /bin/dmesg: Input/output error ps -e ps: error while loading shared libraries: /lib/libproc-3.2.8.so: cannot read file data: Input/output error lsof -bash: /usr/bin/lsof: Input/output error fsck -bash: /sbin/fsck: Input/output error badblocks -bash: /sbin/badblocks: Input/output error So I can't see what is going on, and I can't input output error remotely reboot. What can I do to get to the bottom of this? Interestingly: init 0 Segmentation fault I can cat /var/syslog but not /var/log/messages or several other important files. less and more don't work, neither do tail or head, etc. linux ubuntu share|improve this question edited Dec 26 '10 at 7:52 asked Dec 26 '10 at 7:23 rplevy 147116 1 Sounds pretty similar to what you get after running sudo rm -rf /. (I did it on purpose, just to see what actually happens.) –AJMansfield Sep 12 '13 at 19:27 add a comment| 1 Answer 1 active oldest votes up vote 6 down vote accepted The system is having severe trouble reading off of your hard disk. It's likely that the disk is dead (almost certain), but it could be something as simple as a loose/disconnected cable (don't count on it). There isn't anything you can do to troubleshoot it from here. Just power it off. Check for loose connections on your hard disk. If everything is fine there boot from a rescue disk and run fsck or badblocks from there. I hope you have a back up. share|improve this answer answered Dec 26 '10 at 8:29 bahamat 4,17011323 1 The weird thing though is that when I was able to physically reboot the machine and di