更新到15.04后,文件系统是否为只读?

我愚蠢地决定从14.04LTS更新到14.10然后再到15.04。

由于这样做,我的网站已经关闭,文件系统已变为只读。 由于更新成功完成,我不知道出了什么问题。

这是我到目前为止所发现的:

root@lew:/# service apache2 status apache2.service - LSB: Apache2 web server Loaded: loaded (/etc/init.d/apache2) Active: failed (Result: exit-code) since Sun 2015-07-12 08:36:18 EDT; 31min ago Docs: man:systemd-sysv-generator(8) Process: 901 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) Jul 12 08:36:18 lew.im systemd[1]: Starting LSB: Apache2 web server... Jul 12 08:36:18 lew.im apache2[901]: * Starting web server apache2 Jul 12 08:36:18 lew.im apache2[901]: mktemp: failed to create file via template '/tmp/tmp.XXXXXXXXXX': Read-only file system Jul 12 08:36:18 lew.im apache2[901]: /etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent Jul 12 08:36:18 lew.im apache2[901]: * Jul 12 08:36:18 lew.im apache2[901]: * The apache2 configtest failed. Jul 12 08:36:18 lew.im systemd[1]: apache2.service: control process exited, code=exited status=1 Jul 12 08:36:18 lew.im systemd[1]: Failed to start LSB: Apache2 web server. Jul 12 08:36:18 lew.im systemd[1]: Unit apache2.service entered failed state. Jul 12 08:36:18 lew.im systemd[1]: apache2.service failed. 

那么fdisk -l:

 root@lew:/# fdisk -l Disk /dev/vda: 20 GiB, 21476933632 bytes, 41947136 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: gpt Disk identifier: 06F7B3C9-8E13-42CD-AD52-7A02301B6F16 Device Start End Sectors Size Type /dev/vda1 2048 41945087 41943040 20G Linux filesystem 

和fsck /

 root@lew:/# sudo fsck / fsck from util-linux 2.25.2 fsck.ext4: Unable to resolve 'UUID=815063a9-c956-44a6-ab11-05e1d0bb3a58' 

我是这方面的初学者,但从我读过的内容来看,我需要在fstab中修复一些东西? 为什么更新打破了这个,可能出了什么问题?

我通过SSH连接到此服务器,因为它在DigitalOcean中托管。

编辑:

BLKID

 root@lew:~# blkid /dev/vda1: LABEL="DOROOT" UUID="18254707-08e8-494e-b456-938592928a5e" TYPE="ext4" PTTYPE="dos" PARTLABEL="primary" PARTUUID="8c484e81-f919-4803-acc7-1447fdd81b45" 

安装

 root@lew:~# mount /dev/vda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,nodev,noexec,nosuid) sysfs on /sys type sysfs (rw,nodev,noexec,nosuid) none on /sys/fs/cgroup type tmpfs (rw,uid=0,gid=0,mode=0755,size=1024) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,nodev,noexec,nosuid,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,nodev,noexec,nosuid,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,noexec,nodev,none,name=systemd) 

fstab文件

 root@lew:~# cat /etc/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). # #       # / was on /dev/vda1 during installation #UUID=815063a9-c956-44a6-ab11-05e1d0bb3a58 / ext4 errors=remount-ro 0 1 UUID=06F7B3C9-8E13-42CD-AD52-7A02301B6F16 / ext4 errors=remount-rw 0 1 /swapfile none swap sw 0 0 

该解决方案于7月26日15:00在@Lewis Lebentz的评论中发布。

我会解释所以任何寻找答案的人都可以在这里轻松找到答案。 但@Lewis应该发布答案,将其标记为已回答,并获得应有的信誉。

解决方案:打开支持票,请求Digital Ocean安装恢复ISO(这是一个只有他们可以安装的特殊ISO)。

  1. 选择1以挂载文件系统和编辑/etc/fstab注意:使用控制台并运行nanovi /mnt/etc/fstab 。 或者,您可以启用SSH和网络(在恢复选项中)登录终端(请参阅说明 ),虽然我自己没有尝试过。
  2. 将那里的UUID更改为blkid的输出,保存。
  3. 要求DO删除恢复磁盘。 重启,您应该再次访问!

你可以像评论中发表的ændrük那样做:

 $ mount -rw -o remount /dev/vda1 / $ sed s/wrong_uuid/correct_uuid/ -i /etc/fstab 

..然后再次启动你的Linux! 确保使用您的设备名称更改vda1。 当然,在sed命令中,正确的uuids!