Glam Prestige Journal

Bright entertainment trends with youth appeal.

I need to change a file (10-evdev.conf) while I am in recovery mode. However, I am getting this message:

E138 Can't write viminfo file /root/.viminfo! 

What should I do in this situation?

3

2 Answers

When you enter recovery mode via the "Root Shell" menu, the filesystem is mounted readonly by default. That means that you won't be able to save any changes you make to any files - and also that vim won't be able to write to root's .viminfo file.

From the root terminal, you can remount the filesystem with read-write permissions using

mount -o remount,rw /

(take careful note of the punctuation and whitespace). After that you should be able to use vim and save your changes.

Alternatively, you can select the 'Enable networking' option before dropping to the root shell - since networking needs to write to disk, that automatically does the remount for you.

0

When you get error "E138: Can't write viminfo file"

check that no old temp files were left behind (e.g. ~/.viminf*) and that you can write in the directory of the .viminfo file. {not in Vi}

I have removed the .viminf*.tmp files from /root directory. There was no error or annoying message while editing in VI Editor.

source here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy