Author Topic: Replace directory; Read-only file system?  (Read 457 times)

trc3

  • Member
  • **
  • Posts: 282
  • Kudos: 0
    • http://www.sk8mafia4life.com
Replace directory; Read-only file system?
« on: 30 August 2002, 21:34 »
Well ive successfully f00ked up my mac with 10.2, I messed with some of the login files and I need to replace them from a backup.  I put this in the linux section cause I think it has more to do with *nix/darwin then macs.  Ok so I have the backup in my desktop folder but when trying to rename it with mv or mv -f it says read-only file name.  Then I tryed cp and cp -f and at said it was a directory and wasnt copied.  Also I tryed to move it without renaming it and it said read-only file system.  So basically im lost, any help or suggestions would be greatly appreciated.

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
Replace directory; Read-only file system?
« Reply #1 on: 30 August 2002, 23:28 »
The file system is likely mounted read-only just like the message says. This usually happens in UNIX when a problem with the file system is detected that it can't easily fix. It will go ahead and mount the file system in read only mode so you still have access to the utilities. In Linux your next step would be to manually run the "fsck" command (file system check) which will prompt you with the problems it has found and ask you how you want it to handle the problem (normally you just answer "y" to all the questions). Once the file system has been repaired you would "exit" the single user shell which causes the system to shutdown/restart and when it detects the file system has no errors it will mount the root file system in read/write mode. I would expect OS X is similar. In Linux the command would be something like this:

# fsck /dev/hda1

depending on the partition your root file system resides. The Mac would most certainly use different device naming schemes, I don't know if this is your situation but it sounds like it. Also, there should be a "remount" parameter to your mount command that will allow you to remount a read-only mounted filesystem as read-write. You might want to search the Mac knowlege base sites...

[ August 30, 2002: Message edited by: VoidMain ]

Someone please remove this account. Thanks...

trc3

  • Member
  • **
  • Posts: 282
  • Kudos: 0
    • http://www.sk8mafia4life.com
Replace directory; Read-only file system?
« Reply #2 on: 31 August 2002, 00:19 »
Thanks for the reply, your always there to help, after alot of searching I found the answer.  OS 10 always mounts the root volume as read-only in single user mode.  To change it you type /sbin/mount -uw /, I have no idea what that means by the way but it worked.  After that it was just a matter of moving the files, so after alot of frustration and looking around I got it working.  But it was a good experience considering I learned a bunch of stuff I didnt know and I ended up reading about 100 man pages that I didnt have to.

beltorak0

  • Member
  • **
  • Posts: 223
  • Kudos: 0
    • http://www.angelfire.com/realm/beltorak
Replace directory; Read-only file system?
« Reply #3 on: 31 August 2002, 03:17 »
since I don't know freeBSD (which is the base of Darwin, correct?) i can only take a stab at the command, just FYI:
Code: [Select]
"/sbin/mount" is the mount utility.  In the old days, you had to physically mount the extra-storage unit to your computer before accessing it; hence the name.
"-u" unmount the specified  device (in /etc/fstab probably) which is at location "/" [root dir].
"[-]w" remount the specified device at location "/" in read-write mode. (-r is read only btw....)
"/" is that location we've been talking about.  root-dir.

-t.
from Attrition.Org
 
quote:
Like many times before, Microsoft is re-inventing the wheel and opting for something other than round.

-t.