Interruption during the update leads to "Input/Output error" message.
Interruption during the update leads to "Input/Output error" message.
I shared this on the EndeavourOS forums, but it didn’t work. So here it is: My machine tends to pause mid-update. Usually it’s just a bother; I usually switch in from a live USB and reinstall if something goes wrong. This time, however, I received this message when running arch-chroot on the mounted drive: [[email protected] share]$ sudo arch-chroot /mnt/main chroot: failed to run command ‘/bin/bash’: Input/output error. Confused, I looked it up, and it looks like this kind of problem can stem from locale settings. I ran strace and got something like this (shortened): <... after some setup> chroot("/mnt/main") = 0 chdir("/") = 0 execve("/usr/bin/bash", ["/usr/bin/bash", "-i"], 0x7ffe87901720 /* 18 vars */) = -1 EIO (Input/output error) openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0 read(3, "# Locale name alias data base.\n#"..., 4096) = 2998 read(3, "", 4096) = 0 close(3) = 0 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/coreutils.mo") = -1 ENOENT (No such file or directory) write(2, "chroot: ", 8chroot: ) = 8 write(2, "failed to run command ‘/usr/bin/bash’") = 41 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
Usually this signals an failing hard drive. Does dmesg log any I/O issues too? If only remnants of past "strace and replace" work, it should be fine. Locale creation is weak in the lower parts of the dependency tree, so if you need exact files, a VM might be a better option for reproducing them.
The issue seems unrelated to a locale problem. Ensure LC_MESSAGES files are only used for translation and logging; missing them shouldn't cause crashes. It's more likely your bash is damaged or the disk is failing. Consider using pacstrap to reinstall coreutils without needing to change directories.
Have you checked the disk first? A corrupted filesystem might cause IO issues, otherwise the problem is likely on the storage device itself.