#/sbin/bin local-install libpam0g bash_5 passwd_4 grub-installer arch-install grub efi di-utils-mapdevfs partman-utils local-install dpkg mawk local-install vim.tiny depmod . /root/miniconda3/etc/profile.d/conda.sh conda activate sh -c "xz -d -c /mnt/images/rootfs.acosail2-RC2-Base-0221-runtime.txz | tar -x -C /target/" genfstab -pU /target/ > /target/etc/fstab mkdir -p /target/run mkdir -p /target/proc mkdir -p /target/sys mkdir -p /target/dev mkdir -p /target/dev mkdir -p /target/media mount -t tmpfs none /target/run mount -t proc proc /target/proc mount -t sysfs sys /target/sys mount -o bind /dev /target/dev mount -o bind /mnt /target/media echo "====>>>>dpkg install liba lvm2 cryptsetup..." chroot /target bash -c "dpkg -i /media/pool/main/liba/libaio/*.deb" chroot /target bash -c "dpkg -i /media/pool/main/l/lvm2/*.deb" chroot /target bash -c "dpkg -i /media/pool/main/c/cryptsetup/*.deb" mkdir -p /target/tmp echo "====>>>>cp /mnt/pool/other/kernel /target/tmp..." cp -ar /mnt/pool/other/kernel /target/tmp chroot /target bash -c "dpkg -i /tmp/kernel/linux-*.deb" chroot /target bash -c "dpkg -i /tmp/kernel/mwv207-*.deb" chroot /target bash -c 'depmod `ls /lib/modules | tail -n 1`' echo "====>>>>depmod kernel modules ..." rm -fr /target/tmp/kernel bash -c "cp -a /mnt/pool/other/grub-pc*.deb /target/tmp" chroot /target bash -c "dpkg -i /tmp/grub-pc*.deb" echo "====>>>>grub-install $1" chroot /target bash -c "grub-install $1" echo """deb http://mirrors.huaweicloud.com/debian/ bullseye main deb-src http://mirrors.huaweicloud.com/debian/ bullseye main """ >/target/etc/apt/sources.list echo "====>>>>grub-mkconfig" chroot /target bash -c "grub-mkconfig >> /boot/grub/grub.cfg" echo "====>>>>succeed,you can reboot system!"