How to use Stage2

From KiSS DP 558 STAGE2 WiKi
Jump to: navigation, search

Install Stage 2 - error 2

When stage2 should download the latest files, it fails and says ERROR2 in display.

It seems to fail occurs when stage2 should download this file. http://stage2d.googlepages.com/f_bbbin.tar wget-O / hdd/stage2/f_bbbin.tar

To solve the problem I've done this:

  1: Install Stage2 normally
  2: Turn the player off and turn it on again while holding the stop button during boot. It should then start in Safe Mode with Telnet and FTP access (perhaps it is necessary to have the org. FTP service off or).
  3: Try at first to force the download started so you can see which file it fails on.
  4: With Telnet, you get access to the player (IP). - You should be in # / (rootdir)
  5: Run the script. . /bin/setup.init and watch what error it gives - witch file it does not download.

Reboot KISS'en and try again. Start with

  1: Turn the player off and on again while holding the stop button during boot.
  2: Copy the tarfile(s) who teases (eg. F_bbbin.tar) into /hdd/stage2 folder via FTP and force the download of stage2 part from the Internet started again.
  3: With Telnet, you can now get access to player
  4: Stand in the rootdir #/
  5: Run the script. . /bin /setup.init
  6: File incl. ones you've uploaded to Stage2 should now be installed and complete


When Stage2 running you can stop org. FTP service - see Stage2 guidance.

  • Files

The files are hosted at googlepages.com not at MartinB's server.

  http://sites.google.com/site/stage2d2/f_kmlbrowser.tar
  http://sites.google.com/site/stage2d2/f_jtelnet.tar
  http://sites.google.com/site/stage2d2/f_kml.tar
  http://sites.google.com/site/stage2d2/f_bbox.tar
  http://sites.google.com/site/stage2d2/f_bin.tar
  http://sites.google.com/site/stage2d2/f_img.tar
  http://sites.google.com/site/stage2d2/f_h_img.tar
  http://sites.google.com/site/stage2d2/f_snd.tar
  http://sites.google.com/site/stage2d2/f_htmlroot.tar
  http://sites.google.com/site/stage2d2/f_cgi-bin.tar
  http://sites.google.com/site/stage2d2/f_h_protect.tar
  http://sites.google.com/site/stage2d2/f_bbbin.tar
  http://sites.google.com/site/stage2d2/f_libs.tar

Set protect for FTP and Telnet

FIRST!!!! open telnet

  PASSWD (set password for root)
  ADDUSER (add a user and set password)

I changed/add the inetd.conf to protect FTP and TELNET:

Code:


  ftp stream tcp nowait root /bin/ftpd ftpd -b -H -w -E
  
  telnet stream tcp nowait root /sbin/telnetd telnetd -l /hdd/stage2/bbox/login

So FTP and Telnet is now user/password protected..

To enable protection for http:

Open httpd.conf and remove "protect/" from the first line. Code:

  /:admin:admin

So it shows something like this

You can easly change these files in your webbrowser at the menu config

Inetd conf.jpg

Run fsck in man mode

Telnet to kiss type in:

cd /systempart {enter}
umount /hdd 
kill ftpd 
kill pclinkd 
./fsck -x 32000 -X /systempart/bmcache -vf /dev/discs/disc0/part2 {enter} 

This will run fsck in man mode.

You will get some questions, and it cant be worse then it is, so just press "yes" on all questions you will get. If your lucky this will fix it, but its possible you will lose a recording (but if thats the case, then the recording is lost anyway)

Get job to restart

fg %1

Mount /hdd after fsck

mount /dev/discs/disc0/part2 /hdd

fsck tip - no space left on device

fsck: write failed (and UNEXPECTED INCONSISTENCY) -> solved
After some more "forum-digging" I found the solution: run fsck on /systempart , however with some difficulties.

In more detail: Make a new cache diretory and run fsck (on part1!)

   / # cd hdd/stage2
   /hdd/stage2 # mkdir cache
   /systempart # cd /
   / # umount /systempart
   / # cd /hdd/stage2
   /hdd/stage2 # cd bin
   /hdd/stage2/bin # ./fsck -x 32000 -X /hdd/stage2/cache -pvf /dev/discs/disc0/part1
             
   Allocated 7 disk bitmap cache elements
   ext2fs_check_if_mount: No such file or directory while determining whether /dev/
   discs/disc0/part1 is mounted.
   KiSS_HDD: Deleted inode 3633 has zero dtime. FIXED.
   KiSS_HDD: Deleted inode 3634 has zero dtime. FIXED.
   KiSS_HDD: Deleted inode 3635 has zero dtime. FIXED.
   KiSS_HDD: Deleted inode 3636 has zero dtime. FIXED.
   KiSS_HDD: Deleted inode 3637 has zero dtime. FIXED.
   KiSS_HDD: Deleted inode 3638 has zero dtime. FIXED.
   KiSS_HDD: Unattached inode 3617
            
   KiSS_HDD: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
            (i.e., without -a or -p options)

   <reboot>

So I left out the -p option


    / # umount /systempart
    / # cd /hdd/stage2/bin
    /hdd/stage2/bin # ./fsck -x 32000 -X /hdd/stage2/cache -vf /dev/discs/disc0/part1
            
    Allocated 7 disk bitmap cache elements
    e2fsck 1.36 MODIFIED FOR SMALL MEMORY FOOTPRINT (okfw.sf.net) (05-Feb-2005)
    ext2fs_check_if_mount: No such file or directory while determining whether /dev/discs/disc0/part1 is mounted.
            
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Unattached inode 3617
            
    [1] Stopped ./fsck -x 32000 -X /hdd/stage2/cache -v /hdd/stage2/bin #
               

This seems to be a bug, fsck goes to the background. So to get it back to the foreground, type

   "fg %1" 

and answer everything with

   y(es)

   /hdd/stage2/bin # fg %1
   Connect to /lost+found<y>? yes
            
   Inode 3617 ref count is 2, should be 1. Fix<y>? yes
            
   Pass 5: Checking group summary information
   Read_bitmaps: 1 1 2048
   Read_bitmaps: 1 1 2048 0x157b298 0x157b1b0
   Block bitmap differences: -(1359--1364) -(16387--1638 -(19018--21417) -(22617
   --24576) -(24806--32445) -(32771--32772) -(33889--36291) -(37492--40960) -(41190 --48525)
            
   Fix<y>? yes
              
   Free blocks count wrong for group #0 (7663, counted=7669).
   Fix<y>? yes
             
   Free blocks count wrong for group #2 (3599, counted=7961).
   Fix<y>? yes
              
   Free blocks count wrong for group #3 (323, counted=7963).
   Fix<y>? yes
            
   Free blocks count wrong for group #4 (877, counted=6751).
   Fix<y>? yes
             
   Free blocks count wrong for group #5 (427, counted=7963).
   Fix<y>? yes
              
   Free blocks count wrong (21837, counted=47255).
   Fix<y>? yes
            
   Inode bitmap differences: -(3607--3614) -3616 -(3618--3624) -(3626--363
   Fix<y>? yes
            
   Free inodes count wrong for group #2 (1766, counted=1795).
   Fix<y>? yes
             
   Free inodes count wrong (12527, counted=12556).
   Fix<y>? yes
              
               
   KiSS_HDD: ***** FILE SYSTEM WAS MODIFIED *****
             
   44 inodes used (0%)
   0 non-contiguous inodes (0.0%) 
   # of inodes with ind/dind/tind blocks: 5/1/0
   3113 blocks used (6%)
      0 bad blocks
      0 large files
               
     29 regular files
      6 directories
      0 character device files
      0 block device files
      0 fifos
      0 links
      0 symbolic links (0 fast symbolic links)
      0 sockets
        --------
     34 files
     /hdd/stage2/bin #
                      

     <reboot>

Now the "regular" fsck on part2 works again:


     /systempart # killall httpd
     /systempart # killall ftpd
     /systempart # umount /hdd
     /systempart # ./fsck -x 32000 -X /systempart/bmcache -pvf /dev/discs/disc0/part2
            
     Allocated 7 disk bitmap cache elements
     ext2fs_check_if_mount: No such file or directory while determining whether /dev/discs/disc0/part2 is mounted.
           
     KiSS_HDD: Deleted inode 1654785 has zero dtime. FIXED.
     Read_bitmaps: 1 1 2048
     Read_bitmaps: 1 1 2048 0x157d488 0x157d370
            
     3894 inodes used (0%)
     1238 non-contiguous inodes (31.8%)
     # of inodes with ind/dind/tind blocks: 2923/737/0
     13251741 blocks used (67%)
            0 bad blocks
            0 large files
         3668 regular files
          146 directories
            0 character device files
            0 block device files
            0 fifos
            0 links
           71 symbolic links (71 fast symbolic links)
            0 sockets
              --------
        3885 files
            
       /systempart #

Harddrive settings

Check drive specs from telnet

From telnet type this

 hdparm -I /dev/discs/disc0/disc

or

 cat /proc/ide/hdb/model

Set spinddown time

From telnet type this

  hdparm –S 24 /dev/discs/disc0/disc

If you want it to last more than the next reboot, insert this line into initstage2f file:

 /hdd/stage2/bin/hdparm –S 24 /dev/discs7disc0/disc