![挂载点不存在](https://linux22.com/image/1142754/%E6%8C%82%E8%BD%BD%E7%82%B9%E4%B8%8D%E5%AD%98%E5%9C%A8.png)
为了更改忘记的 root 密码,我执行了以下步骤:
从 LiveUSB 启动并运行以下命令:
sudo mount /dev/sda1 /mnt
for d in dev sys run proc; do sudo mount --bind /$d /mnt/$d; done
错误如下:
mount: mount point /mnt/dev does not exist
mount: mount point /mnt/sys does not exist
mount: mount point /mnt/run does not exist
mount: mount point /mnt/proc does not exist
有什么提示吗?
答案1
听起来你没有击中根设备。此外,与设置 chroot 相比,更方便的做法是简单地执行以下操作:
sudo mount --bind /mnt/etc/shadow /etc/shadow
sudo passwd # in the host system (!)