Let me start by saying that I am new to Ubuntu so please forgive my inexperience. Also, this question goes along with my question I posted on 5/15/2017 titled: Fstab edit crashed system.
THE PROBLEM
I can not save the edit to my /etc/fstab
file while booting from a live disk.
When I open the /etc/fstab
file with gedit as root, this is the header information I see:
*fstab [Read-Only] (491 GB Volume /media/ubuntu/0823c4f5-e42b-45ee-97b8-ad5d424b8b
MY QUESTION
How can I change the file permission of /etc/fstab
file to read – write in order to allow me to edit and save it while booting from a live disk?
EDIT UPDATE 5/21/2017
I am trying to apply sudodus solution (Thank You) to my issue, and I am not positive on how to proceed. Below is the result of me running his code to Identify the partition:
root@ubuntu:~# sudo lsblk -o model,size,name,fstype,label,mountpoint
MODEL SIZE NAME FSTYPE LABEL MOUNTPOINT
TOSHIBA 465.8G sda
487M ├─sda1 ext2 /media/ubuntu/99ee9dc0-67
1K ├─sda2
465.3G └─sda5 LVM2_me
457.3G ├─ubuntu--vg-root
│ ext4 /media/ubuntu/0823c4f5-e4
8G └─ubuntu--vg-swap_1
swap
WDC WD1 931.5G sdb
931.5G └─sdb1
ST4000D 3.7T sdc
128M ├─sdc1
3.7T └─sdc2 ext4 Seagate D1 /media/ubuntu/Seagate D1
ST4000D 3.7T sdd
128M ├─sdd1
3.7T └─sdd2 ext4 Seagate D2 /media/ubuntu/Seagate D2
DVD-ROM 1.4G sr0 iso9660 Ubuntu 16.04.1 LTS amd64 /cdrom
1.4G loop0 squashf /rofs
My next step would be to Mount the partition using the information above, which I believe I needed to mount sda5, so I ran the following:
sudo mount /dev/sda5 /mnt
However, I then get the following:
root@ubuntu:~# sudo mount /dev/sda5 /mnt
mount: unknown filesystem type 'LVM2_member'
New Questions
- Is sda5 the correct mount point, and did I type the command correctly?
- What is this unknown filesystem type 'LVM2_member'?
EDIT UPDATE 5/22/2017
PROBLEM SOLVED
I was able to save my edit to my /etc/fstab file while booting from a live disk by following the comment left by @mook765, and then following the next steps suggested by @sudodus.
The partition I needed to mount was indeed a logical partition (LVM@_member). I was able to mount it with:
sudo mount /dev/mapper/ubuntu--vg-root /mnt
After that, I was able to edit and save the /etc/fstab file, which fixed the problem I had with my question I posted on 5/15/2017 titled: Fstab edit crashed system.
A very huge THANK YOU to @mook765 and @sudodus for all of your help! I do not think I could have gotten my system back up and running without it.
I will be researching and reading much more on how to edit the fstab file before trying this again.
Best Answer
I booted from a [persistent] live drive and could edit
fstab
in an installed system (both systems are 16.04.1) according to the following dialogue.Identify the partition
Mount the partition
where
x
is the drive letter andn
is the partition number. In my case:List the file with the permissions
Back it up
Edit
/mnt/etc/fstab
with root (superuser) privilegesCheck versus the backup file
List the file and its backup file
Comment: So the edit was successful. The modified version was written.