Open luoyu124578 opened 1 year ago
So, what is the issue?
@Petrprogs 我这里出现问题的根本原因是 update-initramfs命令未找到
bash: update-initramfs: command not found
,且已安装initramfs-tools。查找文件update-initramfs发现它在/sbin里,所以添加环境/sbin
export PATH=/sbin:$PATH
之后再运行vtoyboot.sh就没有报错了
我这里出现问题的根本原因是 update-initramfs命令未找到
bash: update-initramfs: command not found
,且已安装initramfs-tools。查找文件update-initramfs发现它在/sbin里,所以添加环境/sbin
export PATH=/sbin:$PATH
之后再运行vtoyboot.sh就没有报错了
This was a problem of your Debian installation. Fresh-installed Debian is always miss /sbin in PATH. So you should add "export PATH=$PATH:/sbin" at the end of .bashrc file. Its not problem of the script
root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29# bash vtoyboot.sh
Current OS is not supported!
排查了一下发现是update-initramfs命令未找到,但是initramfs-tools已安装
root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29/distros/initramfstool# root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29/distros/initramfstool# update-initramfs bash: update-initramfs:未找到命令 root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29/distros/initramfstool# sudo apt-get install initramfs-tools 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 initramfs-tools 已经是最新版 (0.140)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
后来通过find命令发现其实是有update-initramfs文件的,但是在/sbin里,添加了/sbin环境后就运行成功了。。
root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29# find / -name update-initramfs /usr/sbin/update-initramfs /usr/share/bash-completion/completions/update-initramfs /var/lib/dpkg/triggers/update-initramfs find: ‘/run/user/1000/gvfs’: 权限不够 root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29# export PATH=/sbin:$PATH root@debian-ventoy:/home/vtoy/vtoyboot-1.0.29# bash vtoyboot.sh
Current system use initramfstool as initramfs tool updating the initramfs, please wait ... update-initramfs: Generating /boot/initrd.img-5.19.0-0.deb11.2-amd64 grub mkconfig ... PROBE_PATH=/sbin/grub-probe MKCONFIG_PATH=/sbin/grub-mkconfig /sbin/grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-5.19.0-0.deb11.2-amd64 Found initrd image: /boot/initrd.img-5.19.0-0.deb11.2-amd64 Adding boot menu entry for UEFI Firmware Settings ... done GPT check /dev/sda OK ... PREFIX=/boot/grub CFG=grub.cfg DISK=/dev/sda MOD_PATH=/boot/grub Write loader to /dev/sda ... replace shim efi ... bootx64.efi no need 0
vtoyboot process successfully finished.
以挂载物理u盘的形式,成功在vmware里通过ventoy启动