Ubuntu18.04挂载错误后修复
由于操作失误,把硬盘挂载到了/home,导致系统启动失败,用Ubuntu的安装U盘进入Try,然后输入以下命令:
sudo gedit ./etc/fstab
发现fstab文件是这样的:
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during installation # /boot/efi was on /dev/sda1 during installation #UUID=ECDD-DE35 /boot/efi vfat umask=0077 0 1 /swapfile none swap sw 0 0 UUID=8f30f29b-b06a-4e21-b789-4f048c53e065 /home ext4 errors=remount-ro 0 1
这明显不对,硬盘的挂载点应该是/而不是/home,将/home改成/.
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda2 during installation # /boot/efi was on /dev/sda1 during installation #UUID=ECDD-DE35 /boot/efi vfat umask=0077 0 1 /swapfile none swap sw 0 0 UUID=8f30f29b-b06a-4e21-b789-4f048c53e065 / ext4 errors=remount-ro 0 1
保存,重启,成功进入了系统.