How to enable Advanced mode startup script


From SamyGO
Revision as of 08:27, 6 November 2009 by Sulph8 (talk | contribs) (Created page with '== How to enable Telnet/NFS/CIFS/SAMBA == This How to will help you enable telnet and get your NFS/CIFS/SMB shares to auto start when your Samsung starts up. Thanks to dynamic19…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to enable Telnet/NFS/CIFS/SAMBA

This How to will help you enable telnet and get your NFS/CIFS/SMB shares to auto start when your Samsung starts up. Thanks to dynamic1969 for all his help, erdem_ua for SamyGo.py

This HOW TO is work in progress. I will be updating it as I update my scripts.

Fist of all you need to change rc.local to boot from the writable partition. You can archive this two ways:

  1. Manually Modifying the Firmware. (NEED TO ADD MY HOWTO)
  2. Automated Way - SamyGO Firmware Patcher (with modification).

I can confirm i have tested both methods and it worked on mine. (DO THIS AT YOUR OWN RISK!!!)

Manually Modify Firmware

To modify the firmware manually please see the two guides bellow, currently the Linux guide is not yet complete.

=Automated Firmware Update

To use the SamyGO Firmware Patcher to modify your firmware you will benefit from having less chance of bricking your TV. You will also be able to take advantage of the VideoAR fix, and not need all the tools detailed in the Manual Enable Guide.

You will need to do the following:

Download the latest SamyGO Firmware Patcher

Edit SamyGo.py find the line:

ifile.write( ';/etc/telnetd_start.sh&' )

replace it with:

ifile.write( ';/mtd_rwarea/rcS.local&' )

So a it should read this now:

ifile.seek( location + found )
ifile.write( ';/mtd_rwarea/rcS.local&' )
ifile.close()

Download the latest firmware from Samsung and extract it. run SamyGo.py against the latest downloaded firmware. *note this needs to be a clean firmware not an already modified one. example:

python ./SamyGO.py ./T-CHU7DEUC/

Flash the Modified Firmware

Move the T-CHU7DEUC directory and all of its contents to an USB drive, plugin the USB drive into your TV and manually start the upgrade via the appropriate menu entry on your TV.

Enable telnet

Download SamyGO Telnet Enabler Program extract it to your USB Flash, then plug it to TV. Using the Content Library from Pup-Up menu, select USB, then under Game Menu, select and start SamyGO application once. TV will goes black than returns to menu. This will enable your TV's telnet once.

Add Auto Start Scripts

Connect to your TV via telnet. If you use windows, you can use a command prompt or better PuTTY. *nix guys just use a console.

telnet 10.0.0.15

The default username is root with no password.

Enable Telnet and Back-Door

This will enable Telnet and also open back-door for fixing boot-loop situations.

You firstly need to create and add info to rcS.local which is what the TV is trying to boot from in rc.local

$ vi /mtd_rwarea/rcS.local

Now add the following:

#!/bin/sh

# Enable Telnetd
mount -t devpts devpts /dev/pts
telnetd

# Open back-door for fixing boot-loop situations
sleep 20       # Allow USB stick to settle
USB="/dtv/usb/sda1"    # USB mount-point

if [ -f $USB/mount.sh ];then
  $USB/mount.sh    # Mount File detected.
else

If you don't know how to use vi save it to your usb stick and copy it or edit the file with vi and use ":wq!" without the quotes to exit and save the file.

Now you need to change the permissions on the file

$ chmod 755 /mtd_rwarea/rcS.local

If you do not wish to use auto mounting or anything else you can stop here, just reboot your TV and confirm telnet is enabled. Or carry on to enable mounting.

Enable Mounts

If you wish to use auto mounting NFS/CIFS/SMB you will need to edit /mtd_rwarea/mount.sh

$ vi /mtd_rwarea/mount.sh

Add the following to mount.sh

#!/bin/sh

# If /mtd_rwarea/.nfs Exists then Mount NFS Shares on Virtual USB
# touch /mtd_rwarea/.nfs if you wish to use NFS Shares and mount on a Virtaul USB

if [ -f /mtd_rwarea/.nfs ];then
  echo "Mounting NFS Shares on Virtual USB"

  # Set NFS Settings
  VUSB="/dtv/usb/sda4"    # Your Virtual USB mount-point
  NFSS="10.0.0.10"   # NFS Server

  NFS1="Series"   # NFS Share 1 (Media)
  NFS2="Music"   # NFS Share 2 (Music)
  NFS3="Pictures"   # NFS Share 3 (Pics)
  NFS4="Video"   # NFS Share 4 (Other)

  NFSS1="series"   # NFS Server Share 1 (Media)
  NFSS2="music"   # NFS Server Share 2 (Music)
  NFSS3="pics"   # NFS Server Share 3 (Pics)
  NFSS4="vids"   # NFS Server Share 4 (other)

  # Only Process if NFS Shares are not mounted
  if [ `mount | grep -c $VUSB` == 0 ]; then

     # Create Directory Structure for Virtual USB
     echo "Creating Virtual USB Directory Structure"
     mkdir -p $VUSB
     mkdir -p $VUSB/$NFS1
     mkdir -p $VUSB/$NFS2
     mkdir -p $VUSB/$NFS3
     mkdir -p $VUSB/$NFS4

     echo "Mounting NFS Shares"
     mount -o nolock $NFSS:/$NFSS1 $VUSB/$NFS1 -t nfs
     mount -o nolock $NFSS:/$NFSS2 $VUSB/$NFS2 -t nfs
     mount -o nolock $NFSS:/$NFSS3 $VUSB/$NFS3 -t nfs
     mount -o nolock $NFSS:/$NFSS4 $VUSB/$NFS4 -t nfs
   
     # Append Virtual USB to log file. This Allows you to view the device in media.p
     echo "Appending Virtual USB to log"
echo "[sdd]
Vendor : Linux
Product : Virtual USB
Serial : Q80VQLFL
Devpath : 4
Lun : 0
MountDir : /dtv/usb/sda4
FileSystem : vfat

" >> /dtv/usb/log
  else
     echo "NFS Shares already Mounted"
  fi
fi

if [ -f /mtd_rwarea/.nfs-usb ];then
  echo "Mounting NFS Shares on USB"
  # Allow USB-stick to settle
  sleep 20

  # Set NFS Settings
  VUSB="/dtv/usb/sda1"    # Your Virtual USB mount-point
  NFSS="10.0.0.10"   # NFS Server

  NFS1="Series"   # NFS Share 1 (Media)
  NFS2="Music"   # NFS Share 2 (Music)
  NFS3="Pictures"   # NFS Share 3 (Pics)
  NFS4="Video"   # NFS Share 4 (Other)

  NFSS1="series"   # NFS Server Share 1 (Media)
  NFSS2="music"   # NFS Server Share 2 (Music)
  NFSS3="pics"   # NFS Server Share 3 (Pics)
  NFSS4="vids"   # NFS Server Share 4 (other)

  # Only Process if NFS Shares are not mounted
  if [ `mount | grep -c $VUSB` == 0 ]; then

     # Create Directory Structure for Virtual USB
     echo "Creating Virtual USB Directory Structure"
     mkdir -p $VUSB
     mkdir -p $VUSB/$NFS1
     mkdir -p $VUSB/$NFS2
     mkdir -p $VUSB/$NFS3
     mkdir -p $VUSB/$NFS4

     echo "Mounting NFS Shares"
     mount -o nolock $NFSS:/$NFSS1 $VUSB/$NFS1 -t nfs
     mount -o nolock $NFSS:/$NFSS2 $VUSB/$NFS2 -t nfs
     mount -o nolock $NFSS:/$NFSS3 $VUSB/$NFS3 -t nfs
     mount -o nolock $NFSS:/$NFSS4 $VUSB/$NFS4 -t nfs
  elsethe two files
     echo "NFS Shares already Mounted"
  fi
fi

if [ -f /mtd_rwarea/.nfs_unmount ];then
  echo "Unmounted NFS Shares"
  umount $VUSB/$NFS1
  umount $VUSB/$NFS2
  umount $VUSB/$NFS3
  umount $VUSB/$NFS4
  rm -Rf /dtv/usb/sda4
  rm -Rf /mtd_rwarea/.nfs_unmount
fi

You will need to edit the "# Set NFS Settings" section and also decide if you wish to use a virtual USB stick to mount your shares on or not. I do not see the point in keeping a USB stick in just for mount points hence the mounting to a virtual disk.

Now you need to change the permissions on the file

$ chmod 755 /mtd_rwarea/mount.sh

If you are going to use the NFS mounting you need to touch /mtd_rwarea/.nfs-usb (ADD SMB AND CIFS)

$ touch /mtd_rwarea/.nfs-usb 

Reboot the TV and watch the magic :)

$ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/tbml6                3.1M      3.1M         0 100% /
none                     10.0M     12.0k     10.0M   0% /dtv
/dev/tbml7              896.0k    896.0k         0 100% /mtd_boot
none                     10.0M         0     10.0M   0% /mtd_ram
/dev/stl0/13             11.0M      5.6M      5.3M  52% /mtd_rwarea
/dev/tbml10              60.0M     51.2M      8.8M  85% /mtd_exe
/dev/tbml11              28.6M     28.6M         0 100% /mtd_appdata
/dev/stl0/12            419.0M    383.8M     35.2M  92% /mtd_tlib
/dev/stl1/2              50.0M      2.9M     47.0M   6% /mtd_contents
/dev/stl0/14            118.9M      9.5M    109.4M   8% /mtd_down
/dev/stl1/3             876.9M    224.0k    876.7M   0% /mtd_wiselink
/dev/stl0/15             87.0M     51.4M     35.6M  59% /mtd_swu
/dev/sda1               979.1M     85.6M    893.5M   9% /dtv/usb/sda1
10.0.0.10:/series         7.2T    329.3G      6.8T   4% /dtv/usb/sda4/Series
10.0.0.10:/music          7.2T    329.3G      6.8T   4% /dtv/usb/sda4/Music
10.0.0.10:/pics           7.2T    329.3G      6.8T   4% /dtv/usb/sda4/Pictures
10.0.0.10:/vids           7.2T    329.3G      6.8T   4% /dtv/usb/sda4/Video