![升级后,Ubuntu 启动到“只读文件系统”](https://linux22.com/image/982138/%E5%8D%87%E7%BA%A7%E5%90%8E%EF%BC%8CUbuntu%20%E5%90%AF%E5%8A%A8%E5%88%B0%E2%80%9C%E5%8F%AA%E8%AF%BB%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E2%80%9D.png)
我最近升级到了 15.04,但当我的电脑重新启动时,它无法启动到 GUI,并显示它是一个“只读文件系统”,我遇到了这个问题
并运行此命令 mount
-o remount,rw /
它启动了 GUI,但速度非常慢,而且很不稳定,我该如何修复它
我读过这篇文章
http://www.randomhacks.co.uk/read-only-file-system-after-upgrade-from-ubuntu-14-10-to-ubuntu-15-04/
说我必须编辑 fstab,我该怎么做?
答案1
使用 live-dvd/usb 启动计算机。
加载后打开一个终端,
按Ctrl++AltT
运行:
$ sudo -i
# fdisk -l
Fdisk 将会告知你的分区名称,例如:
Disk /dev/sda: 74,5 GiB, 80032038912 bytes, 156312576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xab6eab6e
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 54750094 54748047 26,1G 83 Linux
/dev/sda2 54751230 156311551 101560322 48,4G 5 Extended
/dev/sda5 54751232 56702975 1951744 953M 82 Linux swap / Solaris
/dev/sda6 56705024 156311551 99606528 47,5G 83 Linux
对于每个 Linux 分区,运行以下命令:
# umount /dev/sda?
# fsck -y /dev/sda?
在示例中:
# umount /dev/sda1
# umount /dev/sda6
# fsck -y /dev/sda1
# fsck -y /dev/sda6
然后继续运行,假设/
是/dev/sda1
:
# mount /dev/sda1 /mnt
# mount --bind /dev /mnt/dev
# mount --bind /dev/pts /mnt/dev/pts
# mount --bind /proc /mnt/proc
# mount --bind /sys /mnt/sys
# mount --bind /etc/resolv.conf /mnt/etc/resolv.conf
# chroot /mnt
# dpkg --configure -a
# apt-get -f install
# apt-get update
# apt-get dist-upgrade
# apt-get autoremove
# apt-get clean
# umount /mnt
# exit
# reboot