vi swap files and rootfs verification

150 views
Skip to first unread message

Simon Que

unread,
Mar 17, 2016, 8:48:23 PM3/17/16
to chromium-os-dev
I noticed that there were two vim swap files for /etc/chrome_dev.conf on my Chromebook, running a test image w/o rootfs verification:
  .chrome_dev.conf.swo
  .chrome_dev.conf.swp

When I tried to edit /etc/chrome_dev, I suddenly find that /dev/root is write protected. So I ran make_dev_ssd to remove rootfs verification and rebooted. I deleted the swap files, ran "vim /etc/chrome_dev.conf -n" (no swap file) and started editing. It didn't give a warning about the file being read-only when I entered edit mode. But when I tried to save, it gave an error that the file was R/O. When I exited vim, I found that /dev/root became read-only again.

There wasn't another swap file generated but there was a "chrome_dev.conf~" file that had the same contents.

What is going on here, and how can I edit /etc/chrome_dev.conf?

Simon

Simon Que

unread,
Mar 17, 2016, 8:55:26 PM3/17/16
to chromium-os-dev
I noticed that when I try to save changes to chrome_dev.conf the first time (when /dev/root is still writeable), I get this message:
"chrome_dev.conf" E514: write error (file system full?)
WARNING: Original file may be lost or damaged
don't quit the editor until the file is successfully written!

However, I can still modify other files.

Luigi Semenzato

unread,
Mar 17, 2016, 9:41:20 PM3/17/16
to Simon Que, chromium-os-dev
It's very annoying that vi doesn't report the actual write error code
and tries to guess instead. But maybe the file system was full?
> --
> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>

Simon Que

unread,
Mar 17, 2016, 9:46:02 PM3/17/16
to Luigi Semenzato, chromium-os-dev
Unlikely that the file system was full. I could write to other files in the same dir.

ggg

unread,
Mar 18, 2016, 8:26:09 PM3/18/16
to Chromium OS dev


On Thursday, March 17, 2016 at 5:48:23 PM UTC-7, Simon Que wrote:
I noticed that there were two vim swap files for /etc/chrome_dev.conf on my Chromebook, running a test image w/o rootfs verification:
  .chrome_dev.conf.swo
  .chrome_dev.conf.swp

  If the ".swp" file name already exists, the last character is
  decremented until there is no file with that name or ".saa" is
  reached.  In the last case, no swap file is created.


When I tried to edit /etc/chrome_dev, I suddenly find that /dev/root is write protected. So I ran make_dev_ssd to remove rootfs verification and rebooted. I deleted the swap files, ran "vim /etc/chrome_dev.conf -n" (no swap file) and started editing. It didn't give a warning about the file being read-only when I entered edit mode. But when I tried to save, it gave an error that the file was R/O. When I exited vim, I found that /dev/root became read-only again.

Did you forget to make the rootfs RW again after rebooting?
(that's the only thing I can think of)
 

There wasn't another swap file generated but there was a "chrome_dev.conf~" file that had the same contents.

that might be vim creating a backup copy (or attempting to and failing).
 

What is going on here, and how can I edit /etc/chrome_dev.conf?

Is this loopback mounted by chance? Or something else crazy?
Not sure this this isn't trivial.

grant
 

Simon

Simon Que

unread,
Mar 18, 2016, 8:34:33 PM3/18/16
to ggg, Chromium OS dev
On Fri, Mar 18, 2016 at 5:26 PM, ggg <grun...@chromium.org> wrote:

Did you forget to make the rootfs RW again after rebooting?
(that's the only thing I can think of)
 

No, I tried to run "mount -o remount,rw /" each time I ran into this problem and it would tell me that /dev/root is write-protected, even though I had just removed the rootfs verification and rebooted.
 

There wasn't another swap file generated but there was a "chrome_dev.conf~" file that had the same contents.

that might be vim creating a backup copy (or attempting to and failing).
 

What is going on here, and how can I edit /etc/chrome_dev.conf?

Is this loopback mounted by chance? Or something else crazy?
Not sure this this isn't trivial.

Don't know but this is just a standard CrOS image.
 

grant
 

Simon
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages