Broken WebIF

That doesn't look good at all, you shouldn't be getting the /bin/sh: syntax error: unexpected "(" errors or /bin/sh: Collected: not found
It appears to be trying to execute messages as commands

Try switching to a different shell /mod/bin/busybox/sh and also trying opkg update

We might need @af123 to extricate you from this
 
I get the following...
That's scary and I won't be trying it yet.

FWIW if I try to uninstall opkg-beta I get:
Code:
>>> opkg remove opkg-beta
umount: can't umount /etc/opkg: Invalid argument
Removing package opkg-beta from root...
You can force removal of packages with failed prerm scripts with the option:
    --force-remove
No packages removed.
Collected errors:
 * pkg_run_script: package "opkg-beta" prerm script returned status 1.
 * opkg_remove_pkg: not removing package "opkg-beta", prerm script failed

Done.
 
Sorry, seems to be an extra "HDR3#" in the instruction somehow.
Code:
To return to the menu, type: exit                                                                                                                                      
                                                                                                                                                                       
HDR3# opkg install opkg-beta --force-reinstall                                                                                                                        
No packages removed.                                                                                                                                                  
Installing opkg-beta (1.1) to root...                                                                                                                                  
Downloading http://hpkg.tv/hdrfoxt2/base/opkg-beta_1.1_mipsel.opk.                                                                                                    
Installing webif (1.4.8-9) to root...                                                                                                                                  
Collected errors:                                                                                                                                                      
* opkg_download_pkg: Package webif is not available from any configured src.                                                                                          
* opkg_install_pkg: Failed to download webif. Perhaps you need to run 'opkg update'?                                                                                  
* opkg_install_cmd: Cannot install package opkg-beta.                                                                                                                
HDR3#
That doesn't look good at all, you shouldn't be getting the /bin/sh: syntax error: unexpected "(" errors or /bin/sh: Collected: not found
It appears to be trying to execute messages as commands

Try switching to a different shell /mod/bin/busybox/sh and also trying opkg update

We might need @af123 to extricate you from this

I think the first time I ran the command I may have hit return first, anyhow, it had "HDR3# HDR3#" at the start which is what I think threw up the additional errors. I did immediately repost the output from the corrected command which seems to echo the errors in my screenshot, but you may not have seen it. Apologies if I have confused things unnecessarily.
 
What happens with these:
Code:
humax# mount
humax# diag general
humax# cd /tmp
humax# opkg download webif
humax# opkg install webif_1.4.8-9_mipsel.opk
 
What happens with these:
Code:
HDR2# mount                                                                                                                                                             
rootfs on / type rootfs (rw)                                                                                                                                            
/dev/root on / type squashfs (ro)                                                                                                                                       
proc on /proc type proc (rw)                                                                                                                                            
sysfs on /sys type sysfs (rw)                                                                                                                                           
usbfs on /proc/bus/usb type usbfs (rw)                                                                                                                                  
devpts on /dev/pts type devpts (rw)                                                                                                                                     
tmpfs on /tmp type tmpfs (rw)                                                                                                                                           
tmpfs on /media type tmpfs (rw)                                                                                                                                         
/dev/mtdblock1 on /var/lib/humaxtv type jffs2 (rw)                                                                                                                      
/dev/mtdblock2 on /var/lib/humaxtv_backup type jffs2 (rw)                                                                                                               
/dev/sda1 on /mnt/hd1 type ext3 (rw,data=ordered)                                                                                                                       
/dev/sda2 on /mnt/hd2 type ext3 (rw,data=ordered)                                                                                                                       
/dev/sda3 on /mnt/hd3 type ext3 (rw,data=ordered)                                                                                                                       

HDR2# diag general                                                                                                                                                      
Running: general                                                                                                                                                        
                                                                                                                                                                        
*** Directory Structure ***                                                                                                                                             
                                                                                                                                                                        
Checking /mod partition type                                : Pass                                                                                                      
Checking /mod filesystem type                               : Pass                                                                                                      
Checking /mod/tmp directory exists                          : Pass                                                                                                      
Checking /mod/var/opkg/tmp is a directory                   : Pass                                                                                                      
Checking /mod/boot is a symlink                             : Pass                                                                                                      
Checking /var/lib/humaxtv/mod is a directory                : Pass                                                                                                      
Checking /var/lib/humaxtv_backup/mod is a directory         : Pass                                                                                                      
Checking /mod/boot/2 is a symlink                           : Pass                                                                                                      
Checking /mod/boot links correctly                          : Pass                                                                                                      
Checking /mod/boot/2 links correctly                        : Pass                                                                                                      

HDR2# cd /tmp                                                                                                                                                           

HDR2# opkg download webif                                                                                                                                               
Collected errors:                                                                                                                                                       
 * opkg_download_pkg: Package webif is not available from any configured src.                                                                                           
 * opkg_download_cmd: Failed to download webif.                                                                                                                         

HDR2# opkg install webif_1.4.8-9_mipsel.opk                                                                                                                             
Collected errors:                                                                                                                                                       
 * wfopen: webif_1.4.8-9_mipsel.opk: No such file or directory.                                                                                                         
 * pkg_init_from_file: Failed to extract control file from webif_1.4.8-9_mipsel.opk.                                                                                    
HDR2#
 
Try the following...
Code:
/mod/boot/xinit.d/opkg-beta
opkg update
opkg --force-reinstall webif
I copied and pasted each line in turn. I think the syntax of the last one may not be quite right.

Code:
HDR2# /mod/boot/xinit.d/opkg-beta                                                                                                                                       
/bin/sh: /mod/boot/xinit.d/opkg-beta: not found                                                                                                                         

HDR2# opkg update                                                                                                                                                       
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                   
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                     
Updated list of available packages in /mod/var/opkg/base.                                                                                                               

HDR2# opkg --force-reinstall webif                                                                                                                                     
opkg: unknown sub-command webif                                                                                                                                         
usage: opkg [options...] sub-command [arguments...]                                                                                                                     
where sub-command is one of:                                                                                                                                           
                                                                                                                                                                        
Package Manipulation:                                                                                                                                                   
        update                  Update list of available packages                                                                                                       
        upgrade                 Upgrade installed packages                                                                                                             
        install <pkgs>          Install package(s)                                                                                                                     
        configure <pkgs>        Configure unpacked package(s)                                                                                                           
        remove <pkgs|regexp>    Remove package(s)                                                                                                                       
        flag <flag> <pkgs>      Flag package(s)                                                                                                                         
         <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)                                                                                           
                                                                                                                                                                        
Informational Commands:                                                                                                                                                 
        list                    List available packages                                                                                                                 
        list-installed          List installed packages                                                                                                                 
        list-upgradable         List installed and upgradable packages                                                                                                 
        list-changed-conffiles  List user modified configuration files                                                                                                 
        files <pkg>             List files belonging to <pkg>                                                                                                           
        search <file|regexp>    List package providing <file>                                                                                                           
        info [pkg|regexp]       Display all info for <pkg>                                                                                                             
        status [pkg|regexp]     Display all status for <pkg>                                                                                                           
        download <pkg>          Download <pkg> to current directory                                                                                                     
        compare-versions <v1> <op> <v2>                                                                                                                                 
                            compare versions using <= < > >= = << >>                                                                                                   
        print-architecture      List installable package architectures                                                                                                 
        depends [-A] [pkgname|pat]+                                                                                                                                     
        whatdepends [-A] [pkgname|pat]+                                                                                                                                 
        whatdependsrec [-A] [pkgname|pat]+                                                                                                                             
        whatrecommends[-A] [pkgname|pat]+                                                                                                                               
        whatsuggests[-A] [pkgname|pat]+                                                                                                                                 
        whatprovides [-A] [pkgname|pat]+                                                                                                                               
        whatconflicts [-A] [pkgname|pat]+                                                                                                                               
        whatreplaces [-A] [pkgname|pat]+                                                                                                                               
                                                                                                                                                                        
Options:                                                                                                                                                               
        -A                      Query all packages not just those installed                                                                                             
        -V[<level>]             Set verbosity level to <level>.                                                                                                         
        --verbosity[=<level>]   Verbosity levels:                                                                                                                       
                                        0 errors only                                                                                                                   
                                        1 normal messages (default)                                                                                                     
                                        2 informative messages
                                        3 debug                                                                                                                         
                                        4 debug level 2                                                                                                                 
        -f <conf_file>          Use <conf_file> as the opkg configuration file                                                                                         
        --conf <conf_file>                                                                                                                                             
        --cache <directory>     Use a package cache                                                                                                                     
        -d <dest_name>          Use <dest_name> as the the root directory for                                                                                           
        --dest <dest_name>      package installation, removal, upgrading.                                                                                               
                                <dest_name> should be a defined dest name from                                                                                         
                                the configuration file, (but can also be a                                                                                             
                                directory name in a pinch).                                                                                                             
        -o <dir>                Use <dir> as the root directory for                                                                                                     
        --offline-root <dir>    offline installation of packages.                                                                                                       
        --add-arch <arch>:<prio>        Register architecture with given priority                                                                                       
        --add-dest <name>:<path>        Register destination with given path                                                                                           
                                                                                                                                                                        
Force Options:                                                                                                                                                         
        --force-depends         Install/remove despite failed dependencies                                                                                             
        --force-maintainer      Overwrite preexisting config files                                                                                                     
        --force-reinstall       Reinstall package(s)                                                                                                                   
        --force-overwrite       Overwrite files from other package(s)                                                                                                   
        --force-downgrade       Allow opkg to downgrade packages                                                                                                       
        --force-space           Disable free space checks                                                                                                               
        --force-postinstall     Run postinstall scripts even in offline mode                                                                                           
        --force-remove  Remove package even if prerm script fails                                                                                                       
        --noaction              No action -- test only                                                                                                                 
        --download-only No action -- download only                                                                                                                     
        --nodeps                Do not follow dependencies                                                                                                             
        --force-removal-of-dependent-packages                                                                                                                           
                                Remove package and all dependencies                                                                                                     
        --autoremove            Remove packages that were installed                                                                                                     
                                automatically to satisfy dependencies                                                                                                   
        -t                      Specify tmp-dir.                                                                                                                       
        --tmp-dir               Specify tmp-dir.                                                                                                                       
                                                                                                                                                                        
 regexp could be something like 'pkgname*' '*file*' or similar                                                                                                         
 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'                                                                                           
HDR2#
 
Sorry, I mis-typed the command. The first command is failing so try the following instead...
Code:
opkg install opkg-beta
opkg update
opkg --force-reinstall install webif
 
Sorry, I mis-typed the command. The first command is failing so try the following instead...
Code:
opkg install opkg-beta
opkg update
opkg --force-reinstall install webif

Appreciate the help.

Code:
HDR2# opkg install opkg-beta                                                                                                                                           
Installing opkg-beta (1.1) to root...                                                                                                                                   
Downloading http://hpkg.tv/hdrfoxt2/base/opkg-beta_1.1_mipsel.opk.                                                                                                     
Installing webif (1.4.8-9) to root...                                                                                                                                   
Collected errors:                                                                                                                                                       
 * opkg_download_pkg: Package webif is not available from any configured src.                                                                                           
 * opkg_install_pkg: Failed to download webif. Perhaps you need to run 'opkg update'?                                                                                   
 * opkg_install_cmd: Cannot install package opkg-beta.                                                                                                                 

HDR2# opkg update                                                                                                                                                       
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                   
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                     
Updated list of available packages in /mod/var/opkg/base.                                                                                                               

HDR2# opkg --force-reinstall install webif                                                                                                                             
No packages removed.                                                                                                                                                   
Installing webif (1.4.8-9) to root...                                                                                                                                   
Collected errors:                                                                                                                                                       
 * opkg_download_pkg: Package webif is not available from any configured src.                                                                                           
 * opkg_install_pkg: Failed to download webif. Perhaps you need to run 'opkg update'?                                                                                   
 * opkg_install_cmd: Cannot install package webif.                                                                                                                     
HDR2#
 
@4ndy has got into a chicken and egg situation where he need opkg-beta in order to reinstall the beta webif but cant install opkg-beta because he doesn't have a working webif!
 
Try:
Code:
humax# cat /mod/var/opkg/beta
humax# mount --bind /var/lib/humaxtv_backup/mod/opkg /etc/opkg
humax# cat /mod/boot/2/opkg/opkg.conf
The last of these should say:
Code:
dest root /mod
lists_dir ext /mod/var/opkg
option tmp_dir /mod/var/opkg/tmp
src/gz base http://hpkg.tv/hdrfoxt2/base
src/gz beta http://hpkg.tv/hdrfoxt2/beta
If it does, then repeat the stuff from "opkg update" onwards above.
If it doesn't, then you need to:
Code:
humax# umount /etc/opkg
humax# rm /mod/var/opkg/beta
and try "opkg update" etc. again.
 
Try changing the first command to:
Code:
opkg --force-depends install opkg-beta

Code:
HDR2# opkg --force-depends install opkg-beta                                                                                                                           
Installing opkg-beta (1.1) to root...                                                                                                                                   
Downloading http://hpkg.tv/hdrfoxt2/base/opkg-beta_1.1_mipsel.opk.                                                                                                     
Installing webif (1.4.8-9) to root...                                                                                                                                   
Collected errors:                                                                                                                                                       
 * opkg_download_pkg: Package webif is not available from any configured src.                                                                                           
 * opkg_install_pkg: Failed to download webif. Perhaps you need to run 'opkg update'?                                                                                   
 * opkg_install_cmd: Cannot install package opkg-beta.                                                                                                                 

HDR2# opkg update                                                                                                                                                       
Downloading http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                   
Inflating http://hpkg.tv/hdrfoxt2/base/Packages.gz.                                                                                                                     
Updated list of available packages in /mod/var/opkg/base.                                                                                                               

HDR2# opkg --force-reinstall install webif                                                                                                                             
No packages removed.                                                                                                                                                   
Installing webif (1.4.8-9) to root...                                                                                                                                   
Collected errors:                                                                                                                                                       
 * opkg_download_pkg: Package webif is not available from any configured src.                                                                                           
 * opkg_install_pkg: Failed to download webif. Perhaps you need to run 'opkg update'?                                                                                   
 * opkg_install_cmd: Cannot install package webif.                                                                                                                     
HDR2#
 
Try:
Code:
humax# cat /mod/var/opkg/beta
humax# mount --bind /var/lib/humaxtv_backup/mod/opkg /etc/opkg
humax# cat /mod/boot/2/opkg/opkg.conf
The last of these should say:
Code:
dest root /mod
lists_dir ext /mod/var/opkg
option tmp_dir /mod/var/opkg/tmp
src/gz base http://hpkg.tv/hdrfoxt2/base
src/gz beta http://hpkg.tv/hdrfoxt2/beta
If it does, then repeat the stuff from "opkg update" onwards above.
If it doesn't, then you need to:
Code:
humax# umount /etc/opkg
humax# rm /mod/var/opkg/beta
and try "opkg update" etc. again.

Seems to fail before the last bit.

Code:
HDR2# cat /mod/var/opkg/beta                                                                                                                                           
cat: can't open '/mod/var/opkg/betacat': No such file or directory                                                                                                     
cat: can't open '/mod/var/opkg/beta': No such file or directory                                                                                                         

HDR2# var/lib/humaxtv_backup/mod/opkg /etc/opkg                                                                                                                         

HDR2# cat /mod/boot/2/opkg/opkg.conf                                                                                                                                   
cat: can't open '/mod/boot/2/opkg/opkg.conf': No such file or directory                                                                                                 
HDR2#

Code:
HDR2# umount /etc/opkg                                                                                                                                                 

HDR2# rm /mod/var/opkg/beta                                                                                                                                             
rm: can't remove '/mod/var/opkg/beta': No such file or directory                                                                                                       
HDR2#
 
cat: can't open '/mod/boot/2/opkg/opkg.conf': No such file or directory
So (!) we get to the root of the problem.
You need to recreate this file. Have you got a working text editor and do you know how to use it? You need to make it say:
Code:
dest root /mod
lists_dir ext /mod/var/opkg
option tmp_dir /mod/var/opkg/tmp
src/gz base http://hpkg.tv/hdrfoxt2/base
Or you need to reinstall the CF, which I guess should create it.

You need to make sure these command line commands are pasted in one by one as well. I'm not sure now that you've done the above correctly, as the output is a jumble.
 
The file /mod/boot2/opkg/opkg.conf is contained within the opkg-beta package. If the package is not installed it will not exist and will not be bind mounted on top of the existing /etc/opkg/opkg.conf file.
 
So (!) we get to the root of the problem.
You need to recreate this file. Have you got a working text editor and do you know how to use it? You need to make it say:
Code:
dest root /mod
lists_dir ext /mod/var/opkg
option tmp_dir /mod/var/opkg/tmp
src/gz base http://hpkg.tv/hdrfoxt2/base
Or you need to reinstall the CF, which I guess should create it.

You need to make sure these command line commands are pasted in one by one as well. I'm not sure now that you've done the above correctly, as the output is a jumble.

I am not sure about a text editor. Please give examples of suitable tools.

I have two working HDRs and Filezilla. Could I copy the missing file across (via desktop)? I would need guidance as you didn't say what it was called.

I was entering them one at a time, with a CR after each. I copied the whole of the output and inserted lines to the posted output to separate them.
 
The file /mod/boot2/opkg/opkg.conf is contained within the opkg-beta package. If the package is not installed it will not exist and will not be bind mounted on top of the existing /etc/opkg/opkg.conf file.

Just looked for that file on a working box using Filezilla (which I thought I understood). It doesn't seem to have a /mod/Boot2 folder. Also thoroughly confused that the folder structure seemed to change as I went up and down the tree. Thought it was even showing other boxes at one point. Exited quickly.
 
The file /mod/boot2/opkg/opkg.conf is contained within the opkg-beta package.
Duh!
So, he doesn't have that file, he doesn't have the bind mount, and he doesn't have /mod/var/opkg/beta - so why doesn't it work as standard?
 
I am not sure about a text editor.
OK.
Could I copy the missing file across (via desktop)?
No, probably not. I presume you only have command line access on the broken box.
I was entering them one at a time, with a CR after each.
I'm sorry, but this says otherwise:
HDR2# cat /mod/var/opkg/beta
cat: can't open '/mod/var/opkg/betacat': No such file or directory

and the "mount" command that followed was also wrong.
 
Back
Top