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_execute: command not found (Debian 11 and Debian 12) #72

Open
falxen opened this issue Mar 30, 2024 · 3 comments
Open

chroot_execute: command not found (Debian 11 and Debian 12) #72

falxen opened this issue Mar 30, 2024 · 3 comments

Comments

@falxen
Copy link

falxen commented Mar 30, 2024

I booted into Hetzner's rescue mode, ran the openzfs_install command (in a different iteration I tried zfs), then apt update && apt upgrade and finally ran this script. I did that for both Debian 11 and Debian 12, and I got the chroot_execute error in both cases. Unfortunately the script proceeds despite that failure, and finally goes on to reboot.

root@rescue / #
root@rescue / # chmod 755 "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount/static-route"
root@rescue / #
root@rescue / # chmod 755 "$c_zfs_mount_dir/etc/network/interfaces"
root@rescue / #
root@rescue / # echo "======= update initramfs =========="
======= update initramfs ==========
root@rescue / # chroot_execute "update-initramfs -u -k all"
bash: chroot_execute: command not found
root@rescue / #
root@rescue / # echo "======= update grub =========="
======= update grub ==========
root@rescue / # chroot_execute "update-grub"
bash: chroot_execute: command not found
root@rescue / #
root@rescue / # echo "======= setting up zed =========="
======= setting up zed ==========
root@rescue / # if [[ $v_zfs_experimental == "1" ]]; then
>   chroot_execute "zfs set canmount=noauto $v_rpool_name"
> else
>   initial_load_debian_zed_cache
> fi
bash: initial_load_debian_zed_cache: command not found
root@rescue / #
root@rescue / # echo "======= setting mountpoints =========="
======= setting mountpoints ==========
root@rescue / # chroot_execute "zfs set mountpoint=legacy $v_bpool_name/BOOT/debian"
bash: chroot_execute: command not found
root@rescue / # chroot_execute "echo $v_bpool_name/BOOT/debian /boot zfs nodev,relatime,x-systemd.requires=zfs-mount.service,x-systemd.device-timeout=10 0 0 > /etc/fstab"
bash: chroot_execute: command not found
root@rescue / #                                                                "
bash: chroot_execute: command not found mountpoint=legacy $v_rpool_name/var/log"
root@rescue / # chroot_execute "echo $v_rpool_name/var/log /var/log zfs nodev,relatime 0 0 >> /etc/fstab"
bash: chroot_execute: command not found
root@rescue / # chroot_execute "zfs set mountpoint=legacy $v_rpool_name/var/spool"
bash: chroot_execute: command not found
root@rescue / # chroot_execute "echo $v_rpool_name/var/spool /var/spool zfs nodev,relatime 0 0 >> /etc/fstab"
bash: chroot_execute: command not found                                        "
bash: chroot_execute: command not found mountpoint=legacy $v_rpool_name/var/tmp"
root@rescue / # chroot_execute "echo $v_rpool_name/var/tmp /var/tmp zfs nodev,relatime 0 0 >> /etc/fstab"
bash: chroot_execute: command not found
root@rescue / # chroot_execute "zfs set mountpoint=legacy $v_rpool_name/tmp"
bash: chroot_execute: command not found
root@rescue / # chroot_execute "echo $v_rpool_name/tmp /tmp zfs nodev,relatime 0 0 >> /etc/fstab"
bash: chroot_execute: command not found
root@rescue / #
root@rescue / # echo "========= add swap, if defined"
========= add swap, if defined
root@rescue / # if [[ $v_swap_size -gt 0 ]]; then
>   chroot_execute "echo /dev/zvol/$v_rpool_name/swap none swap discard 0 0 >> /etc/fstab"
> fi
root@rescue / #
root@rescue / # chroot_execute "echo RESUME=none > /etc/initramfs-tools/conf.d/resume"
bash: chroot_execute: command not found
root@rescue / #
root@rescue / # echo "======= unmounting filesystems and zfs pools =========="
======= unmounting filesystems and zfs pools ==========
root@rescue / # unmount_and_export_fs
bash: unmount_and_export_fs: command not found
root@rescue / #
root@rescue / # echo "======== setup complete, rebooting ==============="
======== setup complete, rebooting ===============
root@rescue / # reboot

Broadcast message from root@rescue on pts/1 (Sat 2024-03-30 22:19:34 CET):

The system will reboot now!

root@rescue / # exit
@falxen
Copy link
Author

falxen commented Mar 30, 2024

P.S. I also got the same error with Ubuntu 22.04 in Hetzner's rescue system

@34code
Copy link

34code commented Jul 23, 2024

same on hetzner rescue system

@congzhangzh
Copy link
Contributor

have a look at https://github.com/congzhangzh/daily-scripts-4-us/blob/main/zfs-root-on-linux-4-debian/hetzner-debian12-zfs-setup.sh ?

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

3 participants