Read only filesystem when editing files

I just installed installed arch linux and when i try to edit and save a config file   it says something like, "can't save file: read only filesystem". How do I change that?

Ok, I think I know what the problem is now, / is not in /etc/fstab. The new question is, how do i get it there w/o reinstalling everything?

Similar Messages

  • Reset lost root password and now have read only filesystem

    Hello,
    I have recently had to reset a locked root password by booting from cdrom, mounting the first boot disk, editing the shadow file to remove root's password and rebooting the system.
    The system has booted OK but, I now have a read only filesystem - everything in / cannot be edited, passwd doesnt work etc.
    df -k shows the root (/) filesystem has been mounted on the physical disk I edited:
    Filesystem kbytes used avail capacity Mounted on
    /pci@83,4000/FJSV,ulsa@2,1/disk@0,0:a 10085836 185862 9799116 2% /
    but in the vfstab it still references the disksuite metadevice:
    #device device mount FS fsck mount mount
    #to mount to fsck point type pass at boot options
    /dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no -
    So, can I simply boot from CDROM again, amend the vfstab to be /dev/dsk/c0t0d0s0 (instead of /dev/md/dsk/d03) and reboot?
    Any help with this is appreciated!
    Thanks,
    Emma

    df -k should have shown root mounted on md0
    e.g. on my machine
    # df -k
    Filesystem kbytes used avail capacity Mounted on
    /dev/md/dsk/d0 8260691 4366317 3811768 54% /
    what does /etc/system show for rootdev?
    # grep rootdev /etc/system
    * rootdev: Set the root device. This should be a fully
    * rootdev:/sbus@1,f8000000/esp@0,800000/sd@3,0:a
    rootdev:/pseudo/md@0:0,0,blk
    Remember if this is a mirrored drive, when you boot from CD you may need to mount both sides of the mirror and make changes on both sides- otherwise the replication may not goes as expected.
    Actually, I have run into problems with the modifying one side of a mirror this way. In the past Sun tech support would recommend that I break the mirror and then rebuild it once the system is up and running. So in your case you may want to boot from CD, mount the 1st disk slice, edit /etc/vfstab AND /etc/system, boot into the OS and use the various meta commands to delete and rebuild the mirror- or at least maybe to drop and reattach the 2nd 1/2 of the mirror.

  • Pacstrap failed. Now I have a read-only filesystem that is unusable

    Hello,
    I have been using Linux for the past few years (primarily Ubuntu and Fedora), and have used the command line a lot.
    I was just following the instructions on the Beginners guide. I set up wifi, and partitioned the disk using gdisk (all my computers since late 2009 have not used MBR). I then set up my mirrorlist (left the first one, and added my university as second).
    When I ran pacstrap (without -i), it started downloading everything. I think it finished most of it. The kernel had been downloaded, and the filesystem supposedly set up. Then, I got an error. (I am not sure where it was, and I wasn't logging the output. There were many many lines of:
    [timestamp] EXT4-fs (sda1): ext4_da_writepages: jpd2_start:8192 pages, ino xxxxxxx; err -30
    Then:
    [timestamp] EXT4-fs error (device sda1): ext4_journal_start_sb:370: [timestamp] EXT4-fs error (device sda1): ext4_journal_start_sb:370: [timestamp] EXT4-fs error (device sda1): Remounting filesystem read-only
    error: command failed to execute correctly
    error: could not create directory /mnt/var/lib/pacman/local/groff-1.21-2/: Read-only file system
    error: could not commit transaction
    error: failed to commit transaction (transaction aborted)
    Errors occured, no packages were upgraded.
    warning: could not remove lock file /mnt/var/lib/pacman/db.lck
    ==> ERROR: Failed to install packages to new root
    pacstrap /mnt base base-devel 35.27s user 6.19s system 3% cpu 17:34.81 total
    Trying to rerun pacstrap gets me an error that the lockfile still exists. I cannot remove it because it is a "read-only filesystem". Its permissions are 000, and the folder it is in (pacman) has 755.
    I also cannot make an fstab or continue with the installation.
    I tried to run the setup again, and it kept failing. (MBR failed too, with the same error.)
    What do you think caused it, and what could I do to resolve it. I couldn't find anything like that in the forums, or on google.
    Last edited by masasin (2012-10-27 03:18:37)

    Are the ext4 errors not a dead giveaway that the FS (or physical disk) are misbehaving? It's remounted itself read-only to prevent further damage.

  • [SOLVED] Root mounted as "Read-only filesystem". mkinitcpio issue?

    I am currently in the middle of setting up system encryption with LUKS. I have been making good progress so far, but I do have one remaining issue.
    After typing my LUKS password, the Linux kernel starts to complain that root is a read-only filesystem. "Starting NetworkManager... cannot touch file XYZ: Read-only filesystem". When it has finally finished booting, I am dropped into a TTY. I can log in and cat my files, but I cannot write to any files our use any programs that do (like pacman).
    I wonder if this is an mkinitcpio issue, but I am not sure. For whatever it's worth, here's my basic setup:
    * /dev/sda1: Boot
    * /dev/sda2: Swap
    * /dev/sda3: Root (LUKS/ext4)
    * menu.lst looks like this
    * /etc/fstab contains this line:
    /dev/mapper/root / ext4 defaults 0 1
    * /etc/mkinitcpio.conf contains these lines:
    MODULES="ext4"
    HOOKS="base udev pata scsi sata encrypt filesystems"
    edit: I should note that I did reinstall the kernel after making those edits to mkinitcpio.conf.
    Any idea what I'm doing wrong? As always, I really do appreciate the help. Thanks in advance!
    Last edited by jalu (2011-04-16 22:14:20)

    So it looks like this major problem was caused by a minor mistake. The file /etc/rc.sysinit was not executable. This made it impossible for the kernel to run the script, which in turn made it impossible for the kernel to mount /dev/sda2 (the swap partition) at /dev/mapper/swap. For some unknown reason, this in turn caused /dev/sda2 to be mounted at /, messing everything up.
    Anyway, a simple sudo chmod +x /etc/rc.sysinit fixed the problem. Thanks for the help, MadTux!

  • Single User Mode : Read Only Filesystem

    I can't edit files in single user mode as Root. When I try to edit them I get a msg saying "Read Only Filesystem".
    I have tried chmod with no evial. I want to change my .profile as root so cls='clear'.
    Any ideas?
    Also when I try to login to my account in single user mode it says that account does not exist. However I'm in that accunt right now!
    Thank You.

    When you boot up into single user mode, there is a single recognized user -- root. That's why they call it single-user mode and not multi-user mode.
    When you boot up into single user mode, the disk mounts as read-only. You have to make it writeable in order to do anything to it. I forget the actual command but it displays on the monitor nearby where it gives the "fsck" command syntax when you first boot into it. It's something like "mount -uw /" or something to that effect. It is saying to mount the root drive ("/") with user write privileges.
    Then just "pico /Users/Mephux/.profile" (although I profess that I don't understand why you have to edit this file as root).
    (if you find that this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider clicking on either the "helpful" or "solved" buttons above)

  • [SOLVED] Strange Hard Drive Errors - Read Only Filesystem?

    Solution: Discard old laptop, buy new laptop
    I have an Acer Aspire 5103WLMi. For about 2 months now, Arch has been running smoothly. Until 2 weeks ago.
    It all started when I tried to install and configure autofs on Arch x86_64. On the next reboot, all manner of errors were printed to the screen, to the effect that the internal hard drive was only being mounted read-only, rendering the system unusable. I tried to find a solution, but there were no references to read-only anywhere; fstab, grub etc. None that I could find.
    I tried reinstalling. However, x86_64 Arch refused to boot properly first time due to the exact same error; and I *know* that I'm configuring everything correctly. I managed (somehow) to coerce i686 Arch to install, and things "work".
    Seemingly out of the blue, during normal operation, all running applications will stop, and spit out error after error to the effect of "Cannot Write to Read Only Filesystem!". Sakura won't load (Input/Output error, apparently), and the only way to shut down the laptop is a hard reset (I can't log in as root or use sudo because it wants to write to the filesystem first, which it obviously can't.
    Now, I'm going to be giving the insides of this laptop a good cleanout this weekend, and I'm in the process of backing up all of my data, but I was wondering if anyone else has come across a similar form of misbehaviour; or (with a bit of luck) some potential solutions?
    This is very peculiar, because there seems to be no reason why the laptop suddenly loses write permissions to the hard drive. Cheers.
    Edit: I think I should point out that my /boot partition is Ext2, and / and /home are Ext3
    Last edited by aphirst (2013-03-27 14:51:38)

    Smartctl gives me the impression it's my Hard Drive:
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
    1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
    2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
    3 Spin_Up_Time 0x0027 100 100 001 Pre-fail Always - 1711
    4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 6194
    5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 0
    7 Seek_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0
    8 Seek_Time_Performance 0x0005 100 100 050 Pre-fail Offline - 0
    9 Power_On_Hours 0x0032 092 092 000 Old_age Always - 3291
    10 Spin_Retry_Count 0x0033 223 100 030 Pre-fail Always - 0
    12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 1218
    192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 294
    193 Load_Cycle_Count 0x0032 088 088 000 Old_age Always - 123904
    194 Temperature_Celsius 0x0022 100 100 000 Old_age Always - 34 (Lifetime Min/Max 15/62)
    196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
    197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
    198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
    199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 17
    220 Disk_Shift 0x0002 100 100 000 Old_age Always - 118
    222 Loaded_Hours 0x0032 094 094 000 Old_age Always - 2425
    223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 0
    224 Load_Friction 0x0022 100 100 000 Old_age Always - 0
    226 Load-in_Time 0x0026 100 100 000 Old_age Always - 444
    240 Head_Flying_Hours 0x0001 100 100 001 Pre-fail Offline - 0
    Everything being either Old_age or Pre-fail is not encouraging. Additionally, in the output is what I believe to be records of what caused my strange read-only behaviour:
    Error 19 occurred at disk power-on lifetime: 3287 hours (136 days + 23 hours)
    When the command that caused the error occurred, the device was active or idle.
    After command completion occurred, registers were:
    ER ST SC SN CL CH DH
    84 51 01 11 18 6a e1 Error: ICRC, ABRT 1 sectors at LBA = 0x016a1811 = 23730193
    Commands leading to the command that caused the error were:
    CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
    c8 00 48 c4 17 6a e1 00 04:43:08.023 READ DMA
    c8 00 48 14 e3 69 e1 00 04:43:08.022 READ DMA
    c8 00 a0 5c e2 69 e1 00 04:43:08.010 READ DMA
    c8 00 08 9c e5 69 e1 00 04:43:08.010 READ DMA
    c8 00 20 5c e5 69 e1 00 04:43:08.009 READ DMA
    Could this truly be referring to my problem, since the 'logs' show that the *exact same* error occurred many times.
    Not that this tells me how to fix it...
    Well, if anyone knows if there is a solution, I'd love to know. If the only solution is to ditch the Hard Drive, fair enough. Either way: I'm backing up all of my important data ASAP.
    Cheers.
    Oh, and kclive18, after I noticed that I couldn't get onto my Drive, I reinstalled arch, leaving no trace of /etc/autofs/auto.media.
    Additionally, somehow I have now been able to install Arch x86_64, but the problems still occur...

  • Read-only filesystem after reinstallation,chmod failure

    I decided to switch to a pure systemd init yesterday. Despite strictly followed wiki my system failed to init with switch to systemd emergency mode with no way to cure the problem. So I followed with reinstallation of my system (32bit on 64bit HW as recently). I went thoroughly according installation wiki, installed and configured the base system and correctly umount-ed chrooted environment. I have reformated primary root and boot partitions with ext4 and ext2 respectively and extended /var partition with reiserfs. My home ext4 partition has left unchanged. Grub has been configured OK when being compared with my two Thinkapd Arch installations. My fstab is correctly set using UUID and explicit rw option. After rebooting from Install CD all seemed going well to login prompt and successfull root login. Next proceedings failed on unchangeble read-only filesystem permissions.
    How can I chmod the partitions to make them writable and add users and use pacman? One fail with systemd is followed with another one with unchangable read-only permissions... Courious and very frustrating... Any help, please? Thanks, Petr

    You'll need to post files, logs etc. if you want help - according to you, everything is correct .
    For example, grub.cfg, fdisk -l or gdisk -l /dev/sdX, fstab...

  • [SOLVED] Appending Quiet forces Read-Only filesystem

    After the update to initscripts I tried to append quiet to the kernel command line of GRUB and it simply causes my system to start-up as a read-only filesystem.
    Last edited by horrormaster (2011-08-01 15:36:21)

    title  Arch Linux x64
    root   (hd0,1)
    kernel /boot/vmlinuz26 root=/dev/disk/by-label/gnu_linux ro rootflags=data=writeback,commit=90,orlov,barrier=0,async
    initrd /boot/kernel26.img
    If I add "quiet" before "rootflags" everything fails to load on boot (udev, mounting HDD rw, alsa, cupsd, etc.) and after all of those it simply states "Read-Only Filesystem". If I add "quiet" after "async" it fails to boot altogether due to an unrecognized option.
    Last edited by horrormaster (2011-08-01 02:04:07)

  • Usb stick is "READ ONLY FILESYSTEM"

    hello.
    i have a problem with my USB-Stick. since i gave it to a friend it does no longer work. unix says it is a "READ-ONLY FILESYSTEM". anny sugestions how i could change that?
    it was not possible to reformat it by disk utility. i also tried to format it on a windows machine - didn´t work... any ideas?
    best reagards
    sepoe

    Monkeymeetsrobot's suggestion is the first thing I would have suggested myself -- your original post made no mention of no write-lock switch -- many flash drives have them -- one of mine does and when locked would exhibit that behavior and the other one that doesn't, it still works properly.
    That said, now that we know that yours doesn't have a write-lock switch, maybe you could try this:
    It's a long shot, but what happens when you launch Terminal and type
    ls -ld /Volumes/{usbStickName}?
    If the permissions are not drwxrwxrwx, then, perhaps, from an admin-privileged account, you could
    sudo chmod 777 /Volumes/{usbStickName}
    and with any luck, you will have write privileges again.
    Something to try....no guarantees....
    Short of that, you may be giving your friend a slightly used usb flash drive as a Christmas present.
    (if this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider marking this reply as "helpful" or "solved," in addition to, if applicable, marking this question as "answered")

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • Tabs disappear and open a new window when editing files in Wordpress

    When editing files in Wordpress built-in code editor, if I highlight and try to copy/paste to another file or even within the same file the tab I am on will often abruptly close and then reopen itself in a whole new window. This is extremely disruptive. I have to close the window that popped open and go back to my browser instance with the open tabs and create a new tab for that page then restore my tabs in their previous order. The have to do it all over again a few minutes later.
    Never had any type of trouble like this with previous versions of Firefox, and nothing else has changed on this PC.

    Hi Nicolas,
    I don't know about a pop-up, but if you are trying to open a page (page 2) in a new window (internet explorer window), then do the following:
    Instead of using a navigate pushbutton, use a hyperlink component.
    In the URL selection option insert the URL (web address) of page 2. You can find the URL by going to SE80, in the repository browser select "BSP Application" and "THE TECHNICAL NAME OF YOUR BPS". Open your BSP and go to the folder "pages with flow logic" and find your "page 2". Double click on your page and then select the "properties" tab and navigate to the bottom where you will see the pages URL.
    Insert this URL address into your hyperlink component back in the Web Interface Builder.
    Leave the Target selection as parent. Make sure your internet explorer enhanced options are set to "not reuse the same window" under the browser options.
    Good luck.
    Rael

  • Read-only access when saving metadata to file from Adobe Lightroom on a MAC OS to Windows shared drive

    We have a group of 5 people editing and indexing photos to a shared drive on a windows server, everyone has its own catalog and working on different folders to avoid any locking conflicts.
    The windows computers don't have any problems but the Mac's don't write the updated metadata to all files because they get the message "Photos have read-only access".
    The environment is the following:
    2x Macs workstations running:
    - Adobe Photoshop Lightroom 5.7.1
    - iMAC with MAC OS X Yosemite 10.10.2
    3x Windows Workstations:
    - Windows 7
    - Adobe Photoshop Lightroom 5.7.1
    Server:
    - Shared drive on a Windows Server 2012 Standard
    I have searched the internet, no one has this problem with this exact setup but I have tried all the solutions I found, namely:
    1. Connect to the network drive with cifs:// protocol
    2. Change the settings of the nsmb.conf for 'smb1_only' protocol
    3. Mount the drive manually by command line
    Nothing worked, any ideas?

    Did you ever find a solution to this problem?  I have the same issue and wonder if Lightroom 6 will resolve it.  I  tried AFP, SMB2, SMB3 and they all failed to save metadata randomly. When I use NFS from OS X then it works fine but it's a little slower than SMB and it's not as native as the mount via AFP or SMB, so it's harder to maintain.     My server is a FreeNAS 9.2 (FreeBSD) which is running Samba, Netatalk and native NFS.

  • "Read-only" message when saving edited PDF

    When I try and save editing in an existing PDF I get a pop-up window saying it could not be saved becase it may be read-only. This is true even on files that I have saved myself that are not read-only. How can I get rid of this?? The only option I have is to save the file under a different name which leaves me with the same file.

    Hi ILM100213,
    What version of Acrobat are you using (and have you installed the latest updated)? And what operating system? Have you double-checked the file permissions on those files to make sure that you have read-write access? And, do you know whether any of those files have document permissions assigned in Acrobat?
    I look forward to hearing back from you.
    Best,
    Sara

  • CRIO startup directory was typed STARTUP and now will not boot. How do I recover from this error or how do I rename the directory when my proxy server is read only due no startup files?

    I loaded files on the cRIO but used upper case letters for the startup directory.  Now I cannot access the RIO since it didn't boot. The proxy server comes up read-only so I can't reload the files or change the directory.  I tried the RS232 port but I can't get it to respond to commands even though I can see the processor boot.

    lockmas wrote:
    I loaded files on the cRIO but used upper case letters for the startup directory.  Now I cannot access the RIO since it didn't boot. The proxy server comes up read-only so I can't reload the files or change the directory.  I tried the RS232 port but I can't get it to respond to commands even though I can see the processor boot.
    There is NO need to put your entire question into the subject line of your post.
    cRIO will not boot is a suitable subject line

  • VBA Code to save my excel 2013 file as Read Only (or Non Editable) ...

    Hi,
    ActiveWorkbook.SaveAs SFilePath & udds & ".xlsm", xlWorkbookNormal
    SetAttr SFilePath & udds & ".xlsm", vbReadOnly
    Application.DisplayAlerts = True
    I have used the above code to make my file readonly ...however it still allows to make changes to the file and sometimes the file does not get open and throws an error " Excel cannot open the file ".xlsm" because the file format or file extension
    is not valid......."
    Could you please help me this
    Regards, Hitesh

    Hi,
    ActiveWorkbook.SaveAs SFilePath & udds & ".xlsm", xlWorkbookNormal
    SetAttr SFilePath & udds & ".xlsm", vbReadOnly
    Application.DisplayAlerts = True
    I have used the above code to make my file readonly ...however it still allows to make changes to the file and sometimes the file does not get open and throws an error " Excel cannot open the file ".xlsm" because the file format or file extension
    is not valid......."
    Could you please help me this
    Regards, Hitesh
    Saving the file as read-only does not mean you cannot make changes, it merely means it is recommended that you open this file as read-only. Also using 'xlWorkbookNormal' is incorrect since this is basically the macro-free xml format. Use the 'xlOpenXMLWorkbookMacroEnabled'
    instead. Now as far as not allowing the user to make changes you will need to protect each worksheet, as well as protect the workbook. So something like
    Sub ProtectWorkbook()
    ThisWorkbook.Protect Structure:=True, Password:="test123"
    Dim sh As Worksheet
    For Each sh In ThisWorkbook.Worksheets
    sh.Protect Password:="Test1234"
    Next sh
    End Sub

Maybe you are looking for