Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chroot: failed to run command ‘update-initramfs’: No such file or directory #34

Open
yslys opened this issue Mar 24, 2022 · 0 comments

Comments

@yslys
Copy link

yslys commented Mar 24, 2022

I am currently following the instructions on https://github.com/carlosedp/riscv-bringup/tree/master/Qemu, willing to build a RISC-V disk image.

OpenSBI version: v0.8
Linux version: v5.10.0
U-Boot version: v2020.04

While building the disk image, I used the pre-built Debian tarball following this command:

wget -O rootfs.tar.bz2 https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/debian-sid-riscv64-rootfs-20200108.tar.bz2

When I reached the step:

# Generate initrd on rootfs by using chroot
sudo chroot rootfs update-initramfs -k all -c

I think there might be a minor mistake in the tutorial. In the tutorial, it states that:

pushd rootfs
...
# Generate initrd on rootfs by using chroot
sudo chroot rootfs update-initramfs -k all -c

# Unmount and disconnect nbd
popd

I think it should be popd first, then we could execute chroot command.

However, if I execute the chroot command inside the rootfs directory, the error would be:

chroot: cannot change root directory to 'rootfs': No such file or directory

If I execute the chroot command in the parent directory of rootfs, the error I got was:

chroot: failed to run command ‘update-initramfs’: No such file or directory

I have update-initramfs installed on my host machine. May I know how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant