LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2011, 09:45 PM   #1
dexter.gdv
Member
 
Registered: Jul 2010
Location: Vadodara, Gujarat, India
Distribution: ubuntu
Posts: 33

Rep: Reputation: 0
Unhappy problem with fstab and read-only filesystem


I searched and found a method to automount ntfs harddrives at boot time.
I modified the /etc/fstab file and wrote the required lines which i found from the blkid command.

the problem is now due to fstab which i probably did not edited properly, there is a message at boot up that one or more of the parititions cannot be mount. so theres only one option and that is to enter the recovery shell then by pressing the esc key.
i did that too and found out that the required directories which work as mount point are also not created.
i had taken a back up of the original fstab before the modification.
even though being a root user at command line i am not able to replace the modified fstab in the /etc/fstab with the original backup i kept.
the reason is : it says that i cannot write to the file system as it is a read-only system.
m not even able to edit the fstab using nano.says again that it is a read only filesystem.

hope to get an early positive reply.
thank you.
 
Old 04-12-2011, 11:10 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
posting the edit you made to fstab would help

the most common problem is using a 5+ year old " how to" and putting "ntfs" in as the format instead of the correct "ntfs-3g"
Quote:
i did that too and found out that the required directories which work as mount point are also not created.
YOU need to make the /mnt/someNamedFolder (like /mnt/WinC_drive) FIRST the os WILL NOT make it for you if you use fstab and NOT the system default Udev
the default would be to have udev auto mount it to /media/somelongHexNumber

instead of this "recovery shell"
boot into "single user mode" ( add a 1 to the end of the boot line ) and / or "google/linux" it .
http://www.google.com/linux

that will auto make you root and have FULL root permissions

Last edited by John VV; 04-12-2011 at 11:21 PM.
 
1 members found this post helpful.
Old 04-12-2011, 11:19 PM   #3
uppalagayatri
LQ Newbie
 
Registered: Mar 2011
Posts: 26

Rep: Reputation: 1
hi,


Have u tried below command in single user mod
#mount -O remount,rw /

after that u can edit /etc/fstab file it won't show the readonly file system
 
1 members found this post helpful.
Old 04-12-2011, 11:25 PM   #4
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What OS?
Wich bootloader?
Can you get into single-user mode or only grub prompt.
http://linuxtipstricks.wordpress.com...ws-changed-it/
http://linuxtipstricks.wordpress.com...ws-changed-it/
If debian Once you get in try
update-grub
it should correct fstab.
If that doesn't work you can restore backup fstab.

Example: This not the file that you are working on
cp /etc/X11/xorg.conf-backup /etc/X11/xorg.conf
 
Old 04-12-2011, 11:41 PM   #5
dexter.gdv
Member
 
Registered: Jul 2010
Location: Vadodara, Gujarat, India
Distribution: ubuntu
Posts: 33

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by John VV View Post
posting the edit you made to fstab would help

the most common problem is using a 5+ year old " how to" and putting "ntfs" in as the format instead of the correct "ntfs-3g"

YOU need to make the /mnt/someNamedFolder (like /mnt/WinC_drive) FIRST the os WILL NOT make it for you if you use fstab and NOT the system default Udev
the default would be to have udev auto mount it to /media/somelongHexNumber

instead of this "recovery shell"
boot into "single user mode" ( add a 1 to the end of the boot line ) and / or "google/linux" it .
http://www.google.com/linux

that will auto make you root and have FULL root permissions
hey John.. it really difficult for me to give the same edited fstab as i cant even copy it now.
but i can give u some idea of what i did.

i created a python script which actually parsed some files and created a sequence of lines that are to be append to the fstab.
one such line is as shown below.

UUID = "xlaldkadjf (whatever)"
/dev/sda1 /media/XP ntfs-3g defaults locale=un_es utf8 0 0

this is the line one of those lines that i my python script added to fstab. but still its not perfect as i don't rememeber the exact parameters passed on.

also what i think is maybe the ext4 partition on which my ubuntu 9.10 is mounted is mounted partially and not completely.
also the line that i showed u above is appended at the end of the file and the previous content of the file is as it is.
the previous content of the file does the following thing : it mounts the ext4 and cdrom0 ..well m sorry if the information i provided is not enough.
but thanks as u showd up ur interest.
see if u can help me with this.
have to work on my project and present it in around 10 days.. so need my system up and running.for that.
 
Old 04-12-2011, 11:42 PM   #6
dexter.gdv
Member
 
Registered: Jul 2010
Location: Vadodara, Gujarat, India
Distribution: ubuntu
Posts: 33

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by uppalagayatri View Post
hi,


Have u tried below command in single user mod
#mount -O remount,rw /

after that u can edit /etc/fstab file it won't show the readonly file system
Yes gayatri, i tried the above command but the system says that the drive /dev/sda6 (which is my ubuntu ext4 partition) is already mounted.
still it does not work and m not able to edit my /etc/fstab file.
 
Old 04-12-2011, 11:46 PM   #7
dexter.gdv
Member
 
Registered: Jul 2010
Location: Vadodara, Gujarat, India
Distribution: ubuntu
Posts: 33

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EDDY1 View Post
What OS?
Wich bootloader?
Can you get into single-user mode or only grub prompt.
http://linuxtipstricks.wordpress.com...ws-changed-it/
http://linuxtipstricks.wordpress.com...ws-changed-it/
If debian Once you get in try
update-grub
it should correct fstab.
If that doesn't work you can restore backup fstab.

Example: This not the file that you are working on
cp /etc/X11/xorg.conf-backup /etc/X11/xorg.conf
hey eddy, my OS is Ubuntu 9.10.
bootloader is grub 2.
i can get the grub screen.
its only after that the ubuntu symbol shows up and in very small letters is written beneath it about my drive faults.
it says one or more of the drives cannot be mounted.
and it also says that waiting for the /dev/sda6 blah blah blah
waiting for /dev/sda5;;;;;
and similar such statements for all of my drives (7 partitions in 2 harddrives + one swap)

sir, i also tried the update-grub as u told it will repair fstab
but when i fired this command in the recovery shell the following output occured.

searchin for GRUB installation directory..... found /boot/grub.
open : Read-only file system
(and my prompt back)
root@mypc:

Last edited by dexter.gdv; 04-12-2011 at 11:55 PM.
 
Old 04-12-2011, 11:56 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I would use the cd mount the drive & try to
update-grub
& reboot.
If that doesn't work copy /etc/fstab.

cp /etc/fstab.back /etc/fstab
I'm not sure that's the exact command because you have to find out what you named backup file as.
When you first get in issue command ls to see if it was created in /
If not
cd /etc
ls
 
Old 04-13-2011, 12:00 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
root@mypc:
With this showing you don't need cd.
cd /etc
ls
The others here can give some better search commands.

Last edited by EDDY1; 04-13-2011 at 12:01 AM.
 
Old 04-13-2011, 12:31 AM   #10
dexter.gdv
Member
 
Registered: Jul 2010
Location: Vadodara, Gujarat, India
Distribution: ubuntu
Posts: 33

Original Poster
Rep: Reputation: 0
Smile its done.

hey guys.. thanks a lot for u showed up ur interest.

Johns google/linux advice worked for me.
remounted my partition of ext4 that contained the ubuntu os.

"mount -rw -o remount /"

with the above command
and then edited the fstab file.
"nano /etc/fstab"
i removed the lines that were appended and got my gnome gui.
again tried to save the file.
and behold guys.. it worked..

thanks to all.
thanks to linuxquestions.org
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot edit fstab in recovery mode. Filesystem is read only james7775 Linux - General 34 08-14-2018 11:53 PM
Server Filesystem enters Read only Mode Automatically problem! bagfull Linux - General 2 11-29-2010 03:43 AM
[SOLVED] 2.6.27 xfs root filesystem read only problem Linux.tar.gz Linux - Software 10 02-12-2009 02:50 AM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration