You have to provide output of commandTo check vi itself, simply try to edit /etc/profile. Maybe you use not built-in vi or has wrong mix of librariesCode:ls -al /whereis_your_file/your_file_name
Firmware 1.9.2.7-d-r655
For some reason - just recently - when trying to vi any file I am getting the "not a regular file" error and no file content is being displayed. Using the cat command displays the file ok. I suspect there is a problem with mounting, df command displays:
[admin@ASS root]$ df
Filesystem Size Used Avail Use% Mounted on
rootfs 2.9M 2.9M 0 100% /
/dev/root 2.9M 2.9M 0 100% /
tmpfs 15M 208K 15M 2% /tmp
/dev/discs/disc0/part2
966M 101M 816M 11% /opt
/dev/discs/disc0/part3
228G 41G 176G 19% /tmp/mnt/disc0_3
[admin@ASS root]$
Can anybody help to resolve it? Thanks Adam
You have to provide output of commandTo check vi itself, simply try to edit /etc/profile. Maybe you use not built-in vi or has wrong mix of librariesCode:ls -al /whereis_your_file/your_file_name
The file permission is ok - at least that the way it seems.
this is ls -al
[admin@ASS root]$ ls -al mama
-rw-r--r-- 1 admin root 24 Oct 31 19:56 mama
[admin@ASS root]$
[admin@ASS root]$ cat mama
aaaaaaaa
bbbbbbb
cccccc
[admin@ASS root]$
yet I cannot change the file - using vi gets "not a regular file".
And this is not the only problem I got
[admin@ASS root]$ man ls
sh: nroff: Permission denied
(END)
Something is wrong here but what and how to fix it?
Thanks Adam
there is a tool called ldd which shows against which libraries you binary is linked. It is in the package buildroot. Either install it or download and get only ldd out (ipk can be just gunzipped).
Upgrade to a new firmware: 1.9.2.7-d-r740 - unfortunately did not help.
[admin@ASS root]$ man ls
sh: nroff: Permission denied
(END)
sorry guys - I am not with you. What I suppose to do then?
unmount /opt & repeat - but repeating what? Installing ldd and finding what. I have a rather simple installation - not much change if not exactly the same as one published here on the forum as a tutorial for wl-500gp v2.
It was ok for some time - just recently went weird with this file system on usb Toshiba 250GB drive. All networking features seems to be allright, though.
Why do I have such a problem or what is even more important how to fix it?
[admin@ASS root]$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 3.0M 3.0M 0 100% /
/dev/root 3.0M 3.0M 0 100% /
tmpfs 15M 216K 15M 2% /tmp
/dev/discs/disc0/part2
966M 101M 816M 11% /opt
/dev/discs/disc0/part3
228G 41G 176G 19% /tmp/mnt/disc0_3
[admin@ASS root]$
Is this filesystem ok as above? Please advise further. Tnx!
Cheers,
Adam
Problem in additional software you installed. Sorry, i haven't time to explain basic unix knowledge step-by-step. Maybe someone else do this for you.
all the libraries against which the binary was built should be on the placeInstalling ldd and finding what.
May be you have some important library corrupted due to disk or file-system failure, then you have to reinstall it.
An arbitrary guess --- reinstall uclibc-opt first
Last edited by al37919; 01-11-2009 at 20:21.
I had a similar problem some time ago. The reason was: I had installed bash.
When calling bash just one time, you get similar errors.
How to fix the problem:
Delete the file /opt/etc/profile and
reinstall profile according wengis howto.
Hope it helps.
Alle HowTo's, all howto's
RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n
Yes it did! You saved me a lot of time. Spot right!
Yes, I had had bush shell installed and suprise, suprise - deleting file /opt/etc/profile and rebooting the router did the trick. Don't know why it (profile) was wrong as it seemed to be more or less ok. But anyhow. After rebooting vi started working so I could restore a new profile according to a guide.
Thank you for your kind help - otherwise I will be going mad trying to figure out what was wrong here. Now only hoping it won't manifest again!
Cheers,
Adam
Glad to hear your system works.....
For bash, please read: http://www.wl500g.info/showthread.php?t=21776
have fun
Alle HowTo's, all howto's
RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n