Re: Cannot chroot '/bin/bash': No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, Mar 6, 2013 at 8:32 PM, David C. Rankin
<drankinatty@xxxxxxxxxxxxxxxxxx> wrote:
> Guys,
>
>   Attempting to fix the test box that updating left unable to boot, I cannot
> chroot to fix the system. I've booted from the install medium and done the
> normal mount of the existing system under /mnt:
>
> mount /dev/sda6 /mnt
> mount /dev/sda5 /mnt/home
> mount /dev/sda8 /mnt/boot
> mount -o bind /dev /mnt/dev
> mount -t proc none /mnt/proc
> mount -t sysfs none /mnt/sys
>
>   All files appear in their proper place under /mnt. However, attempting to
> create the chroot fails:
>
> cd /mnt
> chroot /mnt /bin/bash
>
> chroot: failed to run command '/bin/bash': No such file or directory
>
>   /bin/bash is in the new location /usr/bin/bash (moved from /bin/bash by the
> update) with with a proper symlink in /mnt/bin/bash pointing to ../usr/bin/bash
>
>   This if the first time I've ever had difficulty chrooting a system. I suspect
> that this is caused by the last update that pulled in systemd which left the
> system unbootable. Anyone know what could be causing the chroot failure? I've
> tried explicitly pointing the chroot to ./usr/bin/bash, etc... and tried it
> without any executable specified. Regardless, I get the same "No such file or
> directory".
>
>   Thanks in advance for any help or link you can provide.
>
> --
> David C. Rankin, J.D.,P.E.

I had this issue once. It was on a system that had corruption on its
root drive due to power failures. The error can be very misleading; in
my case the file existed and yet the chroot still failed. I ended up
wiping that system, but the most likely conclusion I could come to was
that some very important system .so's got corrupted. If you have
busybox installed, try chrooting into busybox's sh. If that works and
the bash executable really does exist despite that error, I'm afraid
you may have a quite the thrashed system on your hands.

-- 
--Zootboy

Sent from some sort of computing device.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux