Late last night I decided to upgrade one of my servers from Ubuntu 14.04 LTS to the latest Ubuntu 15.04.
I followed the directions here Quantal Upgrades, and changed the necessary settings to upgrade from LTS to normal. All of the updates worked out great, no problems in upgrading the different applications that I use. The main issue that I experienced was when the server rebooted, the file system was mounted as read only.
The UUID in /etc/fstab did not match the UUID returned from the command blkid.
If I were using an Amazon EC instance, I could remount my drive on another server instance. Amazon separates storeage from processing, Instance Storage. I would then be able to change the UUID in /etc/fstab to match the UUID returned in the blkid command.
I use Digital Ocean DO, for a number of reasons. In my opinion DO has a very simple interface and meets all of my needs, easy to spin up an instance. Ok, so what did I do to fix /etc/fstab?
In the DO portal:
Place the droplet in recovery mode:
- Power Off my droplet
- Navigate to the droplet Settings and find the Recovery tab. There choose Mount Recovery Kernel.
- Boot the droplet
- Navigate to the droplet Access and find the Console Access tab. There choose Console Access.
- In the console access window, execute the command blkid. The device will be something like: /dev/vda, this is the device that we need to mount so that we can make changes to /etc/fstab. The UUID will be used in step 9.
- Make sure that you are in the root of the file system by issuing the command: cd /
- Create a directory where you will mount /dev/vda, I used mnt.
- Mount the device using the command mount mount /dev/vda /mnt.
- If all goes well, you should be able to change to the mnt directory and see the contents of the the file system.
- Change directory to /mnt/etc: cd /mnt/etc.
- Make a copy of the current /etc/fstab that has the wrong UUID using the command: cp /etc/fstab /etc/fstab.backup
- Look at the contents of /etc/fstab. Look at the drive type, you will need it in the next step.
- Issue the following command: echo “UUID=<YOUR DEVICE UUID> <TYPE FROM #8> errors=remount-ro 0 1” > /etc/fstab
- My step #9 was echo “UUID=SOMEUUID / ext4 errors=remount-ro 0 1”
Return the droplet to normal operation:
- Navigate to the droplet Settings and find the Kernel tab. There choose the kernel that was installed from the select list. I chose “Ubuntu 15.04 x64…” as that is the kernel that I have installed. Press the Change button next to the list of kernel options.
- Power on your droplet