Results 1 to 11 of 11

Thread: not a regular file

  1. #1

    not a regular file

    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

  2. #2
    Join Date
    Nov 2006
    Location
    Russia, Moscow
    Posts
    3,640
    You have to provide output of command
    Code:
    ls -al /whereis_your_file/your_file_name
    To check vi itself, simply try to edit /etc/profile. Maybe you use not built-in vi or has wrong mix of libraries

  3. #3
    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

  4. #4
    Join Date
    Nov 2006
    Location
    Russia, Moscow
    Posts
    3,640
    Quote Originally Posted by aniecki View Post
    Something is wrong here but what and how to fix it?
    unmount /opt & repeat. If it helps - there is intersection with some libraries. Try to seek forum.

  5. #5
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    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).

  6. #6
    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

  7. #7
    Join Date
    Nov 2006
    Location
    Russia, Moscow
    Posts
    3,640
    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.

  8. #8
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    Installing ldd and finding what.
    all the libraries against which the binary was built should be on the place

    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.

  9. #9
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    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

  10. #10
    Quote Originally Posted by newbiefan View Post
    ....
    Hope it helps.
    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

  11. #11
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    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

Similar Threads

  1. Установка rTorrent "на пальцах".
    By Archim in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 857
    Last Post: 01-01-2011, 10:40
  2. Русские имена торрентов
    By Mirage-net in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 110
    Last Post: 18-06-2010, 14:16
  3. Error installing IPKG
    By Cyb in forum WL-500g Q&A
    Replies: 2
    Last Post: 09-02-2007, 09:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •