PDA

View Full Version : [ubuntu] Edited FSTAB, can't boot now, file system is read only



Fox5
August 18th, 2009, 05:04 AM
So I edited my /etc/fstab file to change some of the mount options, but now when I boot I get:
EXT4-fs: cannot change data mode on remount

One of the data options I changed was from ordered to writeback, but I can't seem to unmount the read-only filesystem, or remount it as writable. I don't have a cd drive on this laptop, so it would be difficult to get access to a live cd, how can I remount the filesystem and fix this?

afroman10496
August 18th, 2009, 05:06 AM
OK... you use ext4, right

afroman10496
August 18th, 2009, 05:08 AM
How can you boot to recovery mode?

Fox5
August 18th, 2009, 05:18 AM
Well, it starts to boot, and even the ubuntu load screen comes up and the bar fully loads, but then it errors out and drops me to a terminal. Alternatively, I can choose the recovery option prior to booting and boot into that, but the file system is still mounted as read only.

I am unable to unmount or remount the filesystem due to the error, and I'm hoping there's some command to force it to remount anyway. Or perhaps manually specifying all mount options so it skips what's in fstab?

afroman10496
August 18th, 2009, 05:32 AM
sorry it took so long i was thinking... how about

sudo chmod /

afroman10496
August 18th, 2009, 05:50 AM
how about, this is only a guess:

sudo apt-get install lilo
sudo apt-get remove grub
or

sudo apt-get install grub2

miegiel
August 18th, 2009, 05:53 AM
...
I don't have a cd drive on this laptop, so it would be difficult to get access to a live cd, how can I remount the filesystem and fix this?

Assuming you have a 2nd running machine with ubuntu, you can make a live USB (instead of a live CD) with System > Administration > USB Startup Disk Creator and the ubuntu iso. If it's not installed you can install it with.

sudo apt-get install usb-creator

Fox5
August 18th, 2009, 05:53 AM
sudo chmod / gives
chmod: missing operadand after '/'

And I can't install or remove any packages because the file system is mounted read only.

afroman10496
August 18th, 2009, 05:56 AM
sudo chmod +x / will make it executable... try chmod +r or +w or +a through z /

miegiel
August 18th, 2009, 06:27 AM
Have you tried mounting it twice, I maen monting it automatically as you boot and then manually in /media or so?

What I would do (but I've got to much old spare hardware) is pull out the disk and stick it in another *nix box, edit /etc/fstab there and stick the disk back.

xyepblra
October 21st, 2009, 04:35 PM
Finally I found the thread my help request it would be proper to post to.
I followed the instructions from maketecheasier.com/how-to-upgrade-from-ext3-to-ext4-without-formatting-the-hard-disk/2009/04/21#more-4157 and I manually moified /etc/fstab by replacing ext3 with ext4 for the boot volume. Now I am being prompted with read only file system error on boot. Need help badly.

stlsaint
October 21st, 2009, 06:39 PM
i replied to your thread:
http://ubuntuforums.org/showthread.php?t=1297054

xyepblra
October 22nd, 2009, 06:23 AM
Thank you, stlsaint, I'm fine by now, because e2fsck has fixed my /.

humidity
February 10th, 2010, 12:06 PM
Hi Fox5, did you manage to get a solution to the problem for this tread? I am inthe same dilemma.

humidity
February 11th, 2010, 01:27 AM
Hi there, I found out a solution to the Read Only issue. The trick is to edit into the kernel, change RO to RW, Ctrl-X to reboot and then gedit fstab. After that, reboot and the grub kernel revert back to RO. All fixed! :p

WylieE
April 12th, 2010, 08:49 PM
Hi there, I found out a solution to the Read Only issue. The trick is to edit into the kernel, change RO to RW, Ctrl-X to reboot and then gedit fstab. After that, reboot and the grub kernel revert back to RO. All fixed! :p

Can you explain this in a little more detail, I am having a similar problem (mine is specifically with RAID 0 I believe) and have been unable to apply the suggestions in other threads because of the Read Only problem.
Thanks,
Colleen

miegiel
April 13th, 2010, 01:55 AM
Can you explain this in a little more detail, I am having a similar problem (mine is specifically with RAID 0 I believe) and have been unable to apply the suggestions in other threads because of the Read Only problem.
Thanks,
Colleen

He means this way to change the kernel parameters when booting (https://help.ubuntu.com/community/Grub2#Editing Menus During Boot).

I'm not sure if it will solve your problem though, good luck.

WylieE
April 14th, 2010, 06:33 PM
Thanks, Miegiel.
I ended up reinstalling 9.04.

blur xc
April 14th, 2010, 06:41 PM
I think the less to learn here is - don't edit existing lines in your fstab. Copy/paste the line you want to change, comment out the original untouched line, make edits to your new line. If you blow it, boot up a live cd and put it back.

BM

jdowdell
July 7th, 2012, 02:35 AM
I had the same issue adding datamode=writeback in fstab, not realizing / is mounted earlier and the system complains that it can't change the datamode on remount.

Solution is, during boot, when grub comes up, edit the boot options. Where it says "quiet splash", add in "rootflags=data=writeback", and then you'll boot fine.

howefield
July 7th, 2012, 09:08 AM
Old thread closed.