Sbin reboot input output error

Linux for freshers Linux Administration, Interview Question, Tips And Tricks Thursday, October 1, 2020 Input/Output Error How to Reboot or shutdown the Linux server? Input/Output Error : Bad Blocks — How to Reboot or shutdown the Linux server? Input/output error while running the command mostly due to it could be bad blocks on the […]

Содержание

  1. Linux for freshers
  2. Thursday, October 1, 2020
  3. Input/Output Error How to Reboot or shutdown the Linux server?
  4. [SOLVED] “errno 5 input/output error” fixes
  5. “[Errno 5] Input/output error” causes
  6. “errno 5 input/output error” when trying to install Ubuntu/Debian
  7. “errno 5 input/output error” when using Google Colab
  8. “OSError: errno 5 input/output error” with Python
  9. unixforum.org
  10. input/output error
  11. input/output error
  12. Re: input/output error
  13. Re: input/output error
  14. Re: input/output error
  15. Re: input/output error
  16. Re: input/output error
  17. Re: input/output error
  18. Re: input/output error
  19. Re: input/output error
  20. Re: input/output error
  21. unixforum.org
  22. input/output error
  23. input/output error
  24. Re: input/output error
  25. Re: input/output error
  26. Re: input/output error
  27. Re: input/output error
  28. Re: input/output error
  29. Re: input/output error
  30. Re: input/output error
  31. Re: input/output error
  32. Re: input/output error
  33. Arch Linux
  34. #1 2019-01-04 21:50:30
  35. [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  36. #2 2019-01-04 22:42:30
  37. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  38. #3 2019-01-04 23:39:22
  39. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  40. #4 2019-01-05 08:27:04
  41. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  42. #5 2019-01-05 15:11:22
  43. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  44. #6 2019-01-05 16:12:18
  45. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  46. #7 2019-01-05 16:27:12
  47. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  48. #8 2019-01-05 16:41:53
  49. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  50. #9 2019-01-05 22:49:34
  51. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  52. #10 2019-01-05 23:26:45
  53. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  54. #11 2019-01-06 10:38:29
  55. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  56. #12 2019-01-06 13:41:08
  57. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  58. #13 2019-01-06 14:27:09
  59. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  60. #14 2019-01-06 14:34:45
  61. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  62. #15 2019-01-06 14:41:08
  63. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  64. #16 2019-01-06 14:53:23
  65. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  66. #17 2019-01-06 14:56:31
  67. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  68. #18 2019-01-06 14:59:34
  69. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  70. #19 2019-01-06 15:13:19
  71. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  72. #20 2019-01-06 15:16:07
  73. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  74. #21 2019-01-06 15:21:11
  75. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  76. #22 2019-01-06 15:21:49
  77. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  78. #23 2019-01-06 19:20:34
  79. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error
  80. #24 2019-01-06 19:27:16
  81. Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

Linux for freshers

Linux Administration, Interview Question, Tips And Tricks

Thursday, October 1, 2020

Input/Output Error How to Reboot or shutdown the Linux server?

Input/Output Error : Bad Blocks — How to Reboot or shutdown the Linux server?

Input/output error while running the command mostly due to it could be bad blocks on the disk.

In this situation, first suggestion would be to check /var/log/messages for any disk-related alerts (might see some sense key alerts).

tail -n 100 /var/log/messages or tail -n 100 /var/log/syslog

tail -f /var/log/messages

bash: /usr/bin/du: Input/output error

Now if try to reboot,it can also give the same output. You can try to init 6.

# reboot or init 6

bash: /sbin/reboot: Input/output error

bash: /sbin/shutdown: Input/output error

If the above reboot commands don’t work try either forced reboot or shutdown

echo «number» >/proc/sys/kernel/sysrq

The number may be written here either as decimal or as hexadecimal with the 0x prefix. CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE must always be written in hexadecimal.

Note that the value of /proc/sys/kernel/sysrq influences only the invocation via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always allowed (by a user with admin privileges).

0 — disable sysrq completely

1 — enable all functions of sysrq

Where b Will immediately reboot the system without syncing or unmounting your disks.

Источник

[SOLVED] “errno 5 input/output error” fixes

Input/output error is a general error message that happens all the time under different situation. It indicates a problem in filesystem level, more specifically, the operating system cannot access a certain part of the disk drive (or virtual disk drive).

In this article, we will explain the possible reasons why the “errno 5 input/output error” message happens and a few solutions that might help solving it.

“[Errno 5] Input/output error” causes

Before we get into any further, let’s make it clear that the error indicates a problem happens with the disk while the operating system is writing or reading from it. The error is specific to Linux machines.

Sometimes, especially in situation where you’re running Linux as a virtual machine, the cause of “[Errno 5] Input/output error” might be related to the hypervisor. Try updating VMware or VirtualBox to see if the problem goes away.

Windows is currently under heavy development with changes are made every few months, that makes running a virtual machine more complex than ever. On Windows machines, you have to pay attention to Hyper-V to see if it plays nicely with VirtualBox or VMware. If Hyper-V causes the problem, you would have no choice but update VMware or VirtualBox (or reinstall Windows, of course).

“errno 5 input/output error” when trying to install Ubuntu/Debian

The error might look like the image above.

Not only happens on Ubuntu/Debian, the identical error message can also be displayed in Linux Mint (as it is a Ubuntu derivative).

Now there are several things you can try :

  • Make sure your CD/DVD or flash drive contents are not corrupted. Usually the only thing you need to do is verifying MD5 hash of the ISO file you’ve downloaded against the official value from Ubuntu/Debian/Linux Mint website.
  • Backup the existing disk (the whole HDD, not only the important partition) then delete all of them to reformat the whole disk. Or you could choose “Erase disk and install Ubuntu” to avoid manually deleting partitions.
  • Test your RAM for defects. You can use MemTest86 to conduct this type of test. If you have a defect RAM, remove or replace it.
  • Last resort : Replace the HDD to see if the error message goes away.
  • “errno 5 input/output error” when using Google Colab

    Colaboratory, also known as Google Colab, is a product from Google Research, it allows running Python code through the browser, especially suitable for data analysis, machine learning and education. Colab also allows running terminal commands prefix with the exclamation mark.

    Sometimes, running terminal commands in Colab returns “”[Errno 5] Input/output error”. Another form of this error is “OSError: [Errno 5] Input/output error” when you try to run Python code that access the filesystem.

    Google Drive integration in Colab is handy, but since these are 2 different services running in a cloud of thousands of servers, sometimes it performs not as well as if it is a physical server. If you’re connecting to Google Drive and mounted it to Colab, remember these rules of thumb to avoid input/output error :

    • Number of files or subfolders in a folder should not be too large. We recommend keeping them under 50 subfolders/files.
    • Try not to perform too many read/write operations to mounted Google Drive folder. Instead of that, write to the virtual environment disk, then move all of them to Google Drive mounted folder. The moving data functionality must have been thoroughly coded and tested before they launch Google Colab.
    • Try not to run any snippet of code for too long since it may cause Colab to raise timeout error.
    • Try not to move too much data at a short period of time. There are quota set by Google which are not necessary shown while using Colab. Basically, once the limit is passed you get the [Errno 5] Input/output error independent on the file or the operation you were doing.
    • When in doubt, move files and folders out of /content/drive before manipulating them might solve your problem.

    “OSError: errno 5 input/output error” with Python

    It doesn’t really matter that you are using Django, Odoo, PyTorch or low-level libraries like pexpect or shutil, if there’s something wrong while reading/writing data to the disk, “OSError: errno 5 input/output error” might be the first error you will see.

    There’s a couple of things you can try, depends on your specific scenario :

    • Check the disk for errors. On Windows, you can run chkdsk . On Linux, there is fsck . If there are recoverable errors, they’ll be fixed. After that, your Python program may run without any issue.
    • Carefully inspect the permissions of the folder/directory you’re working in. It should include appropriate read/write permission.
    • Replace the disk drive to see if the problem goes away. If it does, then your disk drive is faulty.

    We hope that the solutions above help you solve your problem and learn something along the way. If you’re new to Linux, you might want to checkout our guide on common error messages such as “ifconfig: command not found” and “cannot stat”. Backing up is important to avoid losing data, too, so we conducted 10+ practical Rclone examples – Rclone tutorial for beginners to get you started quicker.

    Источник

    unixforum.org

    Форум для пользователей UNIX-подобных систем

    • Темы без ответов
    • Активные темы
    • Поиск
    • Статус форума

    input/output error

    Модератор: Bizdelnick

    input/output error

    Сообщение Ellen » 21.03.2009 11:10

    Заранее прошу прощения, если эта тема уже обсуждалась. В таком случае прошу ссылку на топик.

    Я работаю в Линукс Минт. С недавнего времени при попытке загрузить что-либо под рут мне выдается ошибка ввода-вывода. Причем запрос пароля для рут даже не появляется. Сразу Failed run as user root input/output error. Гномовская консоль пишет, что не может найти команду судо. Alt+Shift+F1 не работает.

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:18

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:23

    действительно, имела ввиду, что именно ctrl+alt+F* не работает. /usr/bin/sudo уже пробовала. та же ошибка ввода-вывода.

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:33

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:36

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:55

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:59

    Re: input/output error

    Сообщение agentprog » 21.03.2009 12:10

    Re: input/output error

    Сообщение AlexFilth » 21.03.2009 12:13

    Re: input/output error

    Сообщение Ellen » 21.03.2009 12:15

    [ 7204.326313] operapluginwrap[13383]: segfault at 0 ip 00000000 sp bfc332cc error 4 in operapluginwrapper[8048000+22000]
    [ 7375.928968] operapluginwrap[13509]: segfault at 0 ip 00000000 sp bfdfac9c error 4 in operapluginwrapper[8048000+22000]
    [ 7391.828521] operapluginwrap[13525]: segfault at 0 ip 00000000 sp bfe14cac error 4 in operapluginwrapper[8048000+22000]
    [ 7423.908615] operapluginwrap[13563]: segfault at 0 ip 00000000 sp bff7be1c error 4 in operapluginwrapper[8048000+22000]
    [ 7469.781298] operapluginwrap[13611]: segfault at 0 ip 00000000 sp bf98101c error 4 in operapluginwrapper[8048000+22000]
    [ 7474.776890] operapluginwrap[13620]: segfault at 0 ip 00000000 sp bfb329cc error 4 in operapluginwrapper[8048000+22000]
    [ 7540.270923] operapluginwrap[13686]: segfault at 0 ip 00000000 sp bfa4d0ec error 4 in operapluginwrapper[8048000+22000]
    [ 7547.900128] operapluginwrap[13695]: segfault at 0 ip 00000000 sp bfdc545c error 4 in operapluginwrapper[8048000+22000]
    [ 7626.948360] operapluginwrap[13790]: segfault at 0 ip 00000000 sp bfc8531c error 4 in operapluginwrapper[8048000+22000]
    [ 7806.505606] operapluginwrap[13989]: segfault at 0 ip 00000000 sp bfc272cc error 4 in operapluginwrapper[8048000+22000]

    вот такая ерунда

    Источник

    unixforum.org

    Форум для пользователей UNIX-подобных систем

    • Темы без ответов
    • Активные темы
    • Поиск
    • Статус форума

    input/output error

    Модератор: Bizdelnick

    input/output error

    Сообщение Ellen » 21.03.2009 11:10

    Заранее прошу прощения, если эта тема уже обсуждалась. В таком случае прошу ссылку на топик.

    Я работаю в Линукс Минт. С недавнего времени при попытке загрузить что-либо под рут мне выдается ошибка ввода-вывода. Причем запрос пароля для рут даже не появляется. Сразу Failed run as user root input/output error. Гномовская консоль пишет, что не может найти команду судо. Alt+Shift+F1 не работает.

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:18

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:23

    действительно, имела ввиду, что именно ctrl+alt+F* не работает. /usr/bin/sudo уже пробовала. та же ошибка ввода-вывода.

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:33

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:36

    Re: input/output error

    Сообщение agentprog » 21.03.2009 11:55

    Re: input/output error

    Сообщение Ellen » 21.03.2009 11:59

    Re: input/output error

    Сообщение agentprog » 21.03.2009 12:10

    Re: input/output error

    Сообщение AlexFilth » 21.03.2009 12:13

    Re: input/output error

    Сообщение Ellen » 21.03.2009 12:15

    [ 7204.326313] operapluginwrap[13383]: segfault at 0 ip 00000000 sp bfc332cc error 4 in operapluginwrapper[8048000+22000]
    [ 7375.928968] operapluginwrap[13509]: segfault at 0 ip 00000000 sp bfdfac9c error 4 in operapluginwrapper[8048000+22000]
    [ 7391.828521] operapluginwrap[13525]: segfault at 0 ip 00000000 sp bfe14cac error 4 in operapluginwrapper[8048000+22000]
    [ 7423.908615] operapluginwrap[13563]: segfault at 0 ip 00000000 sp bff7be1c error 4 in operapluginwrapper[8048000+22000]
    [ 7469.781298] operapluginwrap[13611]: segfault at 0 ip 00000000 sp bf98101c error 4 in operapluginwrapper[8048000+22000]
    [ 7474.776890] operapluginwrap[13620]: segfault at 0 ip 00000000 sp bfb329cc error 4 in operapluginwrapper[8048000+22000]
    [ 7540.270923] operapluginwrap[13686]: segfault at 0 ip 00000000 sp bfa4d0ec error 4 in operapluginwrapper[8048000+22000]
    [ 7547.900128] operapluginwrap[13695]: segfault at 0 ip 00000000 sp bfdc545c error 4 in operapluginwrapper[8048000+22000]
    [ 7626.948360] operapluginwrap[13790]: segfault at 0 ip 00000000 sp bfc8531c error 4 in operapluginwrapper[8048000+22000]
    [ 7806.505606] operapluginwrap[13989]: segfault at 0 ip 00000000 sp bfc272cc error 4 in operapluginwrapper[8048000+22000]

    вот такая ерунда

    Источник

    Arch Linux

    You are not logged in.

    #1 2019-01-04 21:50:30

    [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Hi guys, and first of all, sorry for my poor english.
    I’ll go straight to the point.
    I’ve a Cloud VPS hosted to OVH.
    I need to recover it after a kernel panic so i ran into Rescue Mode.
    Basically OVH create a new VPS (Linux rescue-pro 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64) in witch there is a mounted SDB1 (my original disc with ARCHLinux).
    I Just wanted to execute chroot to reintall all pacman packages!
    But when i try to use chroot (as described here: https://wiki.archlinux.org/index.php/Chroot ) i got this error: chroot: failed to run command «/bin/bash»: Input/output error

    The structure is

    I’ve tried theese steps:

    STEP A

    extract arch-chroot and place it into /mnt/sdb1/home/arch/arch-chroot

    calling /mnt/sdb1/bin/bash works without errors!

    STEP B

    but when i call chroot the return is

    I’ve check disk with fsck and badblocks and all seems normal.

    Do you guys have any suggestions?

    Last edited by magiusche (2019-01-06 23:35:26)

    Hope i help you!
    and
    VICE.VERSA

    #2 2019-01-04 22:42:30

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    locale issue?
    Check the output of «locale» on the rescue system and try to remember the locales of your arch system (some_SOME-UTF-8?)
    In case they differ, try to export the correct LC_ALL to chroot.

    #3 2019-01-04 23:39:22

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    locale issue?
    Check the output of «locale» on the rescue system and try to remember the locales of your arch system (some_SOME-UTF-8?)
    In case they differ, try to export the correct LC_ALL to chroot.

    first.. thx for anwere 🙂

    outpout of locale in the Rescue (debian)

    (i’ve already tried to change only LANG to it_IT.UTF-8 (like the arch)

    Do you know where i can find a sort of log more detailed about error of the last chroot fail?

    Last edited by magiusche (2019-01-04 23:42:03)

    Hope i help you!
    and
    VICE.VERSA

    #4 2019-01-05 08:27:04

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    You could strace it.
    Could it be that there’s simply some junk in /mnt/sdb1/etc/* or /mnt/sdb1/root/.* sourced by bash?

    #5 2019-01-05 15:11:22

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Seth, wouldn’t that result in bash itself returning the error? It looks like chroot is not even able to start bash (although a strace would really determine this one way or the other).

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    #6 2019-01-05 16:12:18

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Omg. i’ve just used strace but it is out of mine comprehension!
    I’ll post resutl here. can you please help me to figure out something usefull from it?
    thx in advance!

    Last edited by magiusche (2019-01-05 16:12:37)

    Hope i help you!
    and
    VICE.VERSA

    #7 2019-01-05 16:27:12

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    make it «strace -f chroot …» to cover child processes and skip the arch-chroot noise.

    #8 2019-01-05 16:41:53

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    straces are a bit arcane, but there are small details you can learn to pick up on pretty quickly. Most strace output is still beyond my comprehension, but I know enough to be able to filter what is and is not comprehensible to me, and I know how to look for a few expected bits. For example, in this strace I’m looking for the execve line calling bash — but it’s not there. Seth almost certainly has the reason for that: the line I want to see (and the lines immediately after it) are in a child process which was not included in this trace, but can be obtained as noted above.

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    #9 2019-01-05 22:49:34

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Ok! I’ve tried this (in the meantime my MasterCooler CRASHED. so i’m writing from my Laptop)

    Again.. thx in advance for the help!

    Hope i help you!
    and
    VICE.VERSA

    #10 2019-01-05 23:26:45

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    It’s from the execve in chroot, bash is never started.
    Let’s see whether it’s specific to that binary:

    #11 2019-01-06 10:38:29

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Here the results. thx again

    Hope i help you!
    and
    VICE.VERSA

    #12 2019-01-06 13:41:08

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Same problem, entirely unrelated to the bash binary.

    Can you do a chroot to root, ie.

    #13 2019-01-06 14:27:09

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Please also post the output of

    Sakura:-
    Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

    Making lemonade from lemons since 2015.

    #14 2019-01-06 14:34:45

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    If the execve of the rescue system doesn’t throw ENOEXEC for what I suspect WorMzy suspects, I’ll throw a tantrum…

    #15 2019-01-06 14:41:08

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    I have seen reports of execve failing with EIO due to the wrong path. It is notable here that the chroot is trying /bin/bash and /bin/false rather than /usr/bin/bash (please try `chroot /mnt/sdb1 /usr/bin/bash`). There could be a problem with the /bin symlink on sdb1 and/or chroot/exec could be failing to follow the symlink properly.

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    #16 2019-01-06 14:53:23

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    after reboot i’ve ran:

    Hope i help you!
    and
    VICE.VERSA

    #17 2019-01-06 14:56:31

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Please also post the output of

    here the results:

    Hope i help you!
    and
    VICE.VERSA

    #18 2019-01-06 14:59:34

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    I have seen reports of execve failing with EIO due to the wrong path. It is notable here that the chroot is trying /bin/bash and /bin/false rather than /usr/bin/bash (please try `chroot /mnt/sdb1 /usr/bin/bash`). There could be a problem with the /bin symlink on sdb1 and/or chroot/exec could be failing to follow the symlink properly.

    No. it fails even with this:

    Hope i help you!
    and
    VICE.VERSA

    #19 2019-01-06 15:13:19

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    OK, I’m pretty much stumped. But so far we have been really focused on all the common or most like sources of issues. I don’t think we’ve really accounted for where this all started: something is wrong on the sdb1 system.

    So lets gather some data on that. First, can you fsck sdb1? After that, mount it and check the output of `ldd /mnt/sdb1/usr/bin/bash`. Depending on the results, you may need to download some arch package (.pkg.tar.xz files) and «manually» install (unpack them) into sdb1 to replace broken components.

    Last edited by Trilby (2019-01-06 15:14:12)

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    #20 2019-01-06 15:16:07

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    after reboot i’ve ran:

    Not the same error.

    To be very sure, can you re-confirm

    calling /mnt/sdb1/bin/bash works without errors!

    #21 2019-01-06 15:21:11

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Oops, I missed that there was a new situation in the strace. It would be good to confirm that calling /mnt/. /bash works, but if it does it may support my suspicion as running it directly would use the libs on the debian system rather than the arch system (I think).

    Come to think of it, I’m not sure if we’ll get what I’m looking for from `ldd /mnt/. /bash` as the debian-based ldd may resolve the libraries from it’s own. But at very least we can check the state of each of the needed libs on the sdb1 system (perhaps starting with `file /mnt/sdb1/usr/lib/. `).

    Last edited by Trilby (2019-01-06 15:22:47)

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    #22 2019-01-06 15:21:49

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    OK, I’m pretty much stumped. But so far we have been really focused on all the common or most like sources of issues. I don’t think we’ve really accounted for where this all started: something is wrong on the sdb1 system.

    So lets gather some data on that. First, can you fsck sdb1? After that, mount it and check the output of `ldd /mnt/sdb1/usr/bin/bash`. Depending on the results, you may need to download some arch package (.pkg.tar.xz files) and «manually» install (unpack them) into sdb1 to replace broken components.

    Ok i will.
    Now i have to go to repair my Desktop (CoolMaster crashed) and i need to reassemble it all.
    After that.. maybe tonight i will start to do what you suggested.

    Btw i’ve already performed a fsck sdb1 (at very beginning of my voyage) and it found some trouble but them should be full repaired.

    I guess too i need to donwload some package manually and reinstall it (but i need some assisteance there).

    Thx again for all and see you later.

    Hope i help you!
    and
    VICE.VERSA

    #23 2019-01-06 19:20:34

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    Oops, I missed that there was a new situation in the strace. It would be good to confirm that calling /mnt/. /bash works, but if it does it may support my suspicion as running it directly would use the libs on the debian system rather than the arch system (I think).

    Come to think of it, I’m not sure if we’ll get what I’m looking for from `ldd /mnt/. /bash` as the debian-based ldd may resolve the libraries from it’s own. But at very least we can check the state of each of the needed libs on the sdb1 system (perhaps starting with `file /mnt/sdb1/usr/lib/. `).

    ok, this is the output of

    should i try to start fresh arch install via arch install scripts overwrite the esiting one in sdb1? (i need to save etc and mariadb file)
    I dunno if this is possibile starting from debian!

    Last edited by magiusche (2019-01-06 19:22:03)

    Hope i help you!
    and
    VICE.VERSA

    #24 2019-01-06 19:27:16

    Re: [Solved] chroot: failed to run command «/bin/bash»: Input/output error

    I meant the libs linked to by bash, not just all of them, but I can find them in the list and it confirms my suspicion:

    Many of your essential libs are totally borked. Ncurses being «ASCII text» is particularly odd.

    You’ll need to manually copy over the appropriate libs for *at least* these libs before you can even chroot to use bash. But from there you will not be able to do much else. I didn’t check all the libs pacman links to, for example.

    EDIT: I removed libncurses from the list, apparently `file` reads it as ASCII text on my system too, so that may be fine (edit 3: yup, it just reads in libncursesw). So glibc seems borked at least.

    EDIT 2: your borked packages seem to be limted to glibc, libunwind, python, and slang. Only glibc is critical to get back into your system and run pacman. So manually download and extract the glibc package and copy it’s contents over to the appropriate locations in sdb1. Then you should be able to chroot and run pacman ensuring to reinstall the other three broken packages.

    Last edited by Trilby (2019-01-06 19:35:45)

    «UNIX is simple and coherent. » — Dennis Ritchie, «GNU’s Not UNIX» — Richard Stallman

    Источник

    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 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.

    user202729's user avatar

    asked Dec 26, 2010 at 7:23

    rplevy's user avatar

    1

    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.

    answered Dec 26, 2010 at 8:29

    bahamat's user avatar

    bahamatbahamat

    5,5861 gold badge26 silver badges26 bronze badges

    3

    If you’re using a VM it’s quite likely that there was some interruption in the filesystem mounts, and linux switch the mounts to read only as a failsafe measure.

    Unfortunately, it leaves your system practically unusable.

    If you check /proc/mounts, and look for the root filesystem, there should be a line like this:

    /dev/dm-0 / ext4 ro,relatime,errors=remount-ro,data=ordered 0 0
    

    You’ll see that the root filesystem has been mounted readonly.

    Basically the only thing to do at this point (assuming this is the problem) is to reboot (via a KVM or other console power-off switch).

    answered May 28, 2017 at 19:14

    elbie's user avatar

    elbieelbie

    511 silver badge4 bronze badges

    2

    Ответ на:

    комментарий
    от KernelPanic 28.02.18 11:54:04 MSK

    Ответ на:

    комментарий
    от burato 28.02.18 12:25:10 MSK

    Есть смысл также в dmesg посмотреть.

    bormant ★★★★★

    (28.02.18 13:05:00 MSK)

    • Ссылка

    Обычно это означает, что блочное устройство с / куда-то пропало. Детали зависят уже от топологии.

    anonymous

    (28.02.18 13:18:20 MSK)

    • Ссылка

    Анонимус прав. Сату системного диска задел, пропал контакт.

    burato ★★★★★

    (28.02.18 16:43:34 MSK)

    • Ссылка

    Полез ребутить тут сервак на слаке:

    Для вас только вчера стало открытием команда ssh, и вы тут же полезли своими грязными рученками на слаку?
    Попросите системного администратора больше не допускать вас до консоли.

    anc ★★★★★

    (01.03.18 01:00:07 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от anc 01.03.18 01:00:07 MSK

    Кастую bormant

    Друг, подскажи хороший, годный барбос на слаку. Мне надо, чтоб он на диск смотрел и случись чего ребутил систему. Ну и в сеть бы тоже неплохо смотреть.

    Моё, скриптовое, башевое совершенно бесполезно в обозначенном случае, так как команды просто не работали.

    burato ★★★★★

    (01.03.18 09:48:54 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от burato 01.03.18 09:48:54 MSK

    Ответ на:

    комментарий
    от anonymous 01.03.18 09:52:12 MSK

    Ответ на:

    комментарий
    от burato 01.03.18 10:01:21 MSK

    Не должно.
    Если bash уже запущен, его с диска читать не нужно. echo у него встроенная. /proc псевдо-ФС в памяти. Не вижу причин, отчего б не сработало.

    Да и проверить легко: погрузить машину, сдернуть SATA кабель, выполнить команду.

    Вот только не возьму в толк, какой смысл в этом случае перезагружаться? Она ж не загрузится все-равно, да?

    А за SMART-ом и smartd следить может с рассылкой уведомлений.

    bormant ★★★★★

    (01.03.18 10:10:44 MSK)



    Последнее исправление: bormant 01.03.18 10:13:28 MSK
    (всего

    исправлений: 1)

    • Показать ответы
    • Ссылка

    Ответ на:

    комментарий
    от bormant 01.03.18 10:10:44 MSK

    Не, ну сдёргивать провод я больше не буду. Дело в том, что переехал на старый диск, который иногда не отвечает. Но с перезагрузки продолжает работать.

    Да и не забывай, что я ж учусь. Как перезагружать проблемное железо я должен знать.

    burato ★★★★★

    (01.03.18 10:13:39 MSK)

    • Ссылка

    Ответ на:

    комментарий
    от bormant 01.03.18 10:10:44 MSK

    OP вроде говорит, что он задел контакт sata, назад он же его воткнул?

    надо еще не забыть заранее сказать
    echo 1 > /proc/sys/kernel/sysrq, чтобы это заработало.

    anonymous

    (01.03.18 10:15:00 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от anonymous 01.03.18 10:15:00 MSK

    Раз задел — значит физически присутствовал, значит перезагрузить по питанию никогда не поздно ^)
    А если не присутствовал, то смысла мало. То есть, так себе задача…
    Вариант с умирающим диском более реальный.

    Но тут систему на рамдиск и не трогать инвалида по пустякам ^)

    bormant ★★★★★

    (01.03.18 10:20:04 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от bormant 01.03.18 10:20:04 MSK

    Ответ на:

    комментарий
    от burato 01.03.18 10:24:04 MSK

    Тут вариантов больше одного. Например, можно посмотреть на готовое — сценарии liveslak (используются в Slackware Live от Эрика, использовались в додебиановом Slax).
    Самый дуболомный вариант: разместить на рамдиске только небольшой корень, содержащий все необходимое для действий в аварийной ситуации (классика), остальное примонтированным. Возможно, в этом случае удастся гасить и поднмать диск без перезагрузки всей системы.

    bormant ★★★★★

    (01.03.18 10:35:01 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от bormant 01.03.18 10:35:01 MSK

    А эта, может мне на флешке систему поднят? Посмотрел тут диск-30МБ/сек скорость, у флешки столько же? Как будет работать?

    burato ★★★★★

    (01.03.18 10:48:14 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от burato 01.03.18 10:48:14 MSK

    Флешки хорошо работают на чтение, но дохнут от записи. Вынести логи отдельно, можно корень монтировать из сжатого образа в ro, держать интенсивно записываемые данные отдельно от системы, и все будет жить долго и счастливо. Можно глянуть, как почти то же самое сделано в liveslak (это bash-евы сценарии).

    Все по сути построено вокруг squashfs+overlayfs. Slax раньше имел смысл, поскольку этих систем не было в родном ядре, Томаш собирал Slax, притаскивая патчи со стороны. Теперь все необходимое есть в штатном ядре, как результат — Slackware Live Edition на ровно тех же принципах.

    bormant ★★★★★

    (01.03.18 11:13:59 MSK)



    Последнее исправление: bormant 01.03.18 11:20:26 MSK
    (всего

    исправлений: 2)

    • Ссылка

    Ответ на:

    комментарий
    от burato 01.03.18 06:13:20 MSK

    Троллинг не удачен. Я сам все свои серваки создавал.

    Дааа что вы говорите? Используя путти… ну ну… создатель фигов

    anc ★★★★★

    (01.03.18 20:38:50 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от anc 01.03.18 20:38:50 MSK

    Да, используя путти, с онтопика.

    Нет, естественно сервак я поднимал с самого сервака.

    burato ★★★★★

    (01.03.18 22:23:33 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от burato 01.03.18 22:23:33 MSK

    Понимаете ли, выражения «админ не знающий команду ssh» и «поднимал серваки» как-то не сходятся. Установил слаку, да, такое возможно, это не rocketscience.

    anc ★★★★★

    (02.03.18 16:46:39 MSK)

    • Показать ответ
    • Ссылка

    Ответ на:

    комментарий
    от anc 02.03.18 16:46:39 MSK

    Есть админ, знающий все команды?

    burato ★★★★★

    (02.03.18 18:05:09 MSK)

    • Ссылка

    Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.

    • Печать

    Страницы: [1]   Вниз

    Тема: ничего не работает inputoutput error  (Прочитано 19964 раз)

    0 Пользователей и 1 Гость просматривают эту тему.

    Оффлайн
    dj—alex

    Приехал с праздников,…
    а на сервере нихрена не работает кроме www, ftp  ,sh
    причем даже простые команды вроде dir i reboot  не выполняются по причине
    вроде этой -bash: /usr/bin/mc: Input/output error

    можете подсказать как можно перезагрузить эту машину, или выключить ее
    автовключатель на ней стоит, просто физически доступа к машине нет до 11 января.

    al@wow:~$ mysql
    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (111)
    al@wow:~$ mc                                                                   
    -bash: /usr/bin/mc: Input/output error
    al@wow:~$                                                                     
    al@wow:~$
    al@wow:~$
    al@wow:~$ apt-get
    Bus error
    al@wow:~$ top
    ‘xterm’: unknown terminal type.
    al@wow:~$                                                                     
    al@wow:~$ su
    -bash: /bin/su: Input/output error
    al@wow:~$ sudo                                                                 
    usage: sudo -h | -K | -k | -L | -l | -V | -v
    usage: sudo [-bEHPS] [-p prompt] [-u username|#uid] [VAR=value]
                {-i | -s | <command>}
    usage: sudo -e [-S] [-p prompt] [-u username|#uid] file …
    al@wow:~$ sudo atp                                                             
    [sudo] password for al:
    sudo: atp: command not found
    al@wow:~$ sudo reboot                                                         
    sudo: unable to execute /sbin/reboot: Input/output error
    al@wow:~$ reboot                                                               
    -bash: /sbin/reboot: Input/output error
    al@wow:~$                                                                     
    al@wow:~$ process
    -bash: process: команда не найдена
    al@wow:~$ dir
    -bash: /bin/dir: Input/output error
    al@wow:~$ cd ..                                                               
    al@wow:/home$ dir                                                             
    -bash: /bin/dir: Input/output error
    al@wow:/home$ cat                                                             
    ^C
    al@wow:/home$ cd ..                                                           
    al@wow:/$ hardinfo                                                             
    Программа ‘hardinfo’ на данный момент не установлена.  Вы можете установить ее, напечатав:
    sudo apt-get install hardinfo
    -bash: hardinfo: команда не найдена
    al@wow:/$ sudo apt-get install hardinfo                                       
    Bus error
    al@wow:/$ sudo service mysql restart
    sudo: unable to execute /usr/bin/service: Input/output error
    al@wow:/$ telinit 5                                                           
    Segmentation fault
    al@wow:/$ sudo telinit 5                                                       
    Segmentation fault


    Оффлайн
    maksvlad

    как я понял, reboot не работает… а halt? может его пока не затронула зараза?

    openSUSE 12.3 > openSUSE 13.1 > Ubuntu-minimal 14.04 x64 + KDE 4.14.2 > Gentoo + Plasma 5.8 @ Acer ASPIRE V3-571G-736b8G75BDCa
    LinuxMint Mate @ Asus EEEPC 1000H


    Оффлайн
    dj—alex


    Оффлайн
    maksvlad

    openSUSE 12.3 > openSUSE 13.1 > Ubuntu-minimal 14.04 x64 + KDE 4.14.2 > Gentoo + Plasma 5.8 @ Acer ASPIRE V3-571G-736b8G75BDCa
    LinuxMint Mate @ Asus EEEPC 1000H


    Оффлайн
    dj—alex

    echo 1 > /proc/sys/kernel/sysrq

    после выполнения этой операции сервер все таки окончательно повис


    Оффлайн
    MA3X

    скорее всего, при таких глю речь идет о помирающем винте.
    новый год, перепады напряжения…
    как ни абыдна, но только вскрытие покажет…

    Microsoft isn’t the answer.
    Microsoft is the question, and the answer is NO.


    Оффлайн
    dj—alex

    недавно на сервер было вместо 3 линеек по 1гб памяти поставлено 8гб  памяти  (по 2гб линейки)
    может памяти слишком много, может 6гб максимум?
    разгон убрал который пожизненно стоит…

    опять таже фигня начинается. скоро опять все упадет, а машина должна без перерывов работать!
    уже половина сервисов отказала и часть команд не выполняется  и снова разумеется нет ключей от серверной и от сигнализации..

    начинается не сразу, не запираться же там на весь день чтобы выяснитть.

    пытаешься копировать  не читаються половина файлов
    пытаешься работать —  ro file system, хотя полчаса назад все прекрасно редактировалось, и даже сейчас кое что.

    на скрине все…
    http://dj.chg.su/inside/filemgr.php?c=c8510d5679e376461f545a627d1fa6c7

    вотчерез свой скрипт

    server:127.0.0.1 type=mysql
    debug:connect=Resource id #36
    Обнаружена ошибка
    6 — Error on delete of ‘./swdb//db.opt’ (Errcode: 30)

    на дисках ntfs еще возможна работа…

    « Последнее редактирование: 05 Января 2010, 15:39:33 от dj—alex »


    Оффлайн
    Mam(O)n

    Похоже, что навернулась файловая система. fsck покажет. Заодно неплохо было бы проверить s.m.a.r.t., проверить на бедблоки и глянуть в лог на момент начала чудес.


    Оффлайн
    dj—alex

    отключил один из хардов, редкоиспользуемых,  и перевел ddr2  из ganged v unganged
    пока все работает,  уже cутки

    « Последнее редактирование: 06 Января 2010, 13:00:15 от dj—alex »


    • Печать

    Страницы: [1]   Вверх

    18 Oct 2016 | Автор: dd |

    Начал дурковать один из серверов – с периодичностью в месяц залипал намертво, т.ч оживляла только перезагрузка. Учитывая, что на серваке заведено несколько /24 сеток, то каждый раз подъем занимал какое то время + время простоя.

    Оттрейсить причину никак не получалось. Точнее я пришел сначала к выводу, что все дело в ip-спуфинге; но перезаточка сервера и обновление софта от которого все могло идти, особой проблемы не решило, т.к сервер стабильно отработал два месяца и снова начал падать с заветной периодичностью.

    И все бы ничего, если бы у него рандомно не приключались зависоны по нескольку раз в неделю, после которых он снова мог отработать месяц.

    В одно из падений, полез смотреть диск. Т.к на подключенную партицию система ругалась что чекать не может
    /dev/sda2 is mounted
    e2fsck: Cannot continue, aborting
    то пришлось проглядеть, что и как в режиме просмотра:
    # fsck -nf /dev/sda2
    где n – только проверять без правок,
    f – форсить выполнение

    На диске обнаружились какие то ошибки, для полноценного устранения которых надо было перегружать сервак, размонтировать тома и фиксить. Но поскольку я уже до этого договорился о смене сервера, то мне просто махнули сервак.

    Поскольку дело происходило в субботней ночи, то я не стал его тестить, а просто настроил с нуля и отправил в 6 утра спать. Все воскресение отходил, а в понедельник полез смотреть что там с ним.

    И тут вылезло прекрасное, ибо на большую часть команд сервер отвечал Input/output error
    -bash: /bin/vi: Input/output error
    -bash: /bin/cat: Input/output error

    Тут уже четко было ясно, что “новый” диск посыпался, т.ч еще до запуска fsck было понятно что диск надо менять. Запуск сканера лишь подтвердил эту уверенность, ибо полетели нечитаемые области.

    Решил ребутнуть сервер, но перезагрузка тоже выдавала ошибки IO
    # reboot
    bash: /sbin/reboot: Input/output error

    Так что пришлось ребутить жестко и принудительно через sysrq (машина естественно под линем, CentOS):
    сначала включаем System Request Key
    # echo 1 > /proc/sys/kernel/sysrq
    говорим принудительно перегрузить ядро без синхронизации и размонтирования
    # echo b > /proc/sysrq-trigger

    если сервак надо не ребутнуть, а выключить, то вместо b посылаем o, более подробно на офф.сайте.

    После чего, в моем случае, сервак уже не захотел подниматься и опять пришлось полночи заниматься настройкой и переносом информации.

    В этом раз я правда поглядел, что за диск мне дали, с помощью smartmontools. Но это уже другая история.

    Rating: 10.0/10 (2 votes cast)

    Rating: +2 (from 2 votes)

    Принудительная перезагрузка Linux, 10.0 out of 10 based on 2 ratings

    Теги: centos

    If you have ever had a hard drive fail on a remote server you may remember the feeling you had after trying to issue the following commands:

        # 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 and /sbin/shutdown binaries from the disk so that it can execute them.

    A fsck on the next boot might be able to correct whatever is wrong with the disk, but first you need to get the system to 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 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 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.

    Понравилась статья? Поделить с друзьями:
  • Sbin mount vboxsf mounting failed with the error protocol error
  • Sbin mount vboxsf mounting failed with the error no such file or directory
  • Sbin mount vboxsf mounting failed with the error no such device
  • Sbin mount vboxsf mounting failed with the error invalid argument
  • Sbie1222 error with security token c0000058 62