Adding/Enabling rc.local in Debian 9 Stretch & 10 Buster

On recent releases of debian rc.local is deprecated, ideally you should create a system service for whatever it is you want to do but i’ve always used rc.local for odd one line commands. Running the commands below will re-add the rc.local functionality

****RUN AS ROOT OR PREFIX WITH SUDO****

COPY AND PASTE EACH BLOCK OF CODE IE NOT LINE BY LINE

Create service file

echo '[Unit] 
Description=/etc/rc.local 
ConditionPathExists=/etc/rc.local 

[Service] 
Type=forking 
ExecStart=/etc/rc.local start 
TimeoutSec=0 
StandardOutput=tty 
RemainAfterExit=yes 
SysVStartPriority=99 

[Install] 
WantedBy=multi-user.target' > /etc/systemd/system/rc-local.service

Create rc.local file


echo '#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other # value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0' > /etc/rc.local

Set file permissions

chmod +x /etc/rc.local

Enable rc.local service so it works at boot time

systemctl enable rc-local

Start the service

systemctl start rc-local

Check service stats

systemctl status rc-local

● rc-local.service – /etc/rc.local Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/rc-local.service.d └─debian.conf Active: active (exited) since Mon 2021-08-23 09:17:15 BST; 4s ago Process: 6426 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
Aug 23 09:17:15 VIG690M systemd[1]: Starting /etc/rc.local… Aug 23 09:17:15 VIG690M systemd[1]: Started /etc/rc.local.

Continue Reading

Cross flashing the TP-Link TD-W8980 to TD-W9980 firmware to enable VDSL

This is actually a post I found in my drafts form yeas ago that I forgot to publish but thought it might be handy.

Cross flsahing the TP-Link TD-W8980 to TD-W9980

After recently moving to sky fibre I was disappointed in their supplied hub primarily due to only 100 meg ports and only 2.4GHZ wifi so I quickly started to research alternatives.

I was already uding a TP-Link TD-W8980 but was disapointed to find it only supported ADSL and not VDSL required for sky. After some research I came across the model up the TD-W9980 but it looked significantly similar to my current router. After some more digging I found that they actually share the same hardware
Lantiq based soc (64MB RAM, 8MB Flash)
Lantiq based xdsl
Atheros wireless (2.4GHz 2×2)
Lantiq wireless (5.8GHz 2×2)

So that got me thinking that it’s suerly just a firmware difference that makes it VDSL. So out came the soldering iron and installed a serial header (process same as wdr3600). I also found a beta firmware which supports mer (note no current official versions support mer)

Continue Reading

Flashing Tomato Firmware On Asus RT-N16

Due to the aging performance of my Linksys WRT54GL I picked up a cheap Asus RT-N16 router to flash tomato firmware on so thought i’d do a quick howto.

This was carried out using a Windows 7 machine.

Files
Download the ASUS Firmware Restoration Utility (was a nightmare to find as it’s no longer available on the Asus website)
Download your chosen verison of tomato firmware i.e tomato-K26USB-1.28.RT-MIPSR2-114-AIO

1, Set a static ip of 192.168.1.10 on your PC network interface
2, Plug an ethernet cable from your PC to one of the router LAN ports
3, On the router hold down the black reset button (next to the WAN port don’t get mixed up with the WPS button)
4, Insert the power cable into the router
5, The power led will start to flash quickly
6, When the power led goes out release the reset button
7, The power led should now be flashing slowly
8, Open the Rescue_RT_N16_1902.zip file you downloaded earlier and extract the Rescue.exe file contained within
9, Run the Rescue.exe file
10. You will now be shown the following screen
rtn16flash1
11, Click ‘Browse’ Select the tomato firmware you downloaded earlier
rtn16flash2
12, Click ‘Upload’ the file will then be uploaded to the router
rtn16flash4
rtn16flash3
13, After it’s uploaded it will then do a ‘System Recovery’
rtn16flash4
14, When complete you will then get this screen
rtn16flash5
15, Open a browser to 192.168.1.1 and you should be able to login to tomato with admin/admin (I recommend resetting your configuration to defaults including NVRAM after doing so)

Continue Reading

N54L microserver Nas retirement

So my HP N54L microserver has served me well (pun intended) but recently I have been quickly using up storage and now down to my last 500gb on my pair of raid 1 3tb drives. Over the years I have been running more and more demanding software and now the N54L CPU is beginning to become a bottleneck. I already have a re replacement server in mind and just finalising spec.

Continue Reading

£250 budget gaming pc can it be done?

Right so currently my pc is running an old quad core Q6600 CPU with 8gb ram and 512mb graphics card and to be honest it’s starting to feel the strain.

Firstly it’s currently used as a family pc but struggles with a couple of different users logged in etc. My eldest child uses for browser based games/Minecraft etc but there will be a time soon when he wants to play more demanding games.

So being on a tight budget I’m going to try and cobble together something half decent that will play games at 1080p.

Now I was initially as previously buy individual components and build one but having used a Lenovo M91p sff I thought to save time and money I would get the tower version chuck in some more memory and a graphics card job done.

After some searching I found some 4GB Kingston memory modules for cheap on ebay.

After this the project stalled as busy with other things when I came back to it I found the M91p came with an i5-2400 CPU but the case and psu was also limiting. Undeterred I carried on searching and found a Lenovo M73 on eBay with an i5-4460 and would also be able to use the ram I had previously purchased. Also liked the fact it already had usb 3.0 ports and card reader. Stuck in a bid and won it for £125 posted.

Now the one of the limiting factors in these prebuilt machines is the psu as they weren’t originally designed for gaming use.

Cost breakdown
Lenovo M73 – £125
2x 4GB Corsair DDR3 1600 MHz CAS 11-11-11-30 Dual Channel Memory – £35.30
Graphics card – Nvidia Geforce gtx 750ti 2gb – £60

Continue Reading

Maplin A26LW A5-V11/A5-V12 OpenWrt Ralink RT5350F Mini Portable 150Mbps 3G/4G WiFi Wlan Hotspot AP Client RJ45 USB Wireless Router

So while randomly browsing a deals website I came across a USB wifi router/hotspot on sale at Maplin for a mere £2.00 and as my tinkering desire took over I decided to order a couple. https://www.maplin.co.uk/p/maplin-3g-n150-wi-fi-router-and-hotspot-a26lw

These devices all appear very similar physically but your mileage my vary on functionality i.e they may have
A restricted bootloader that doesn’t allow OpenWrt images
Limited Busybox shell available by telnet
More complete Busybox shell

Board is marked A5-V12 and chip is an Ralink RT5350F. From my reseach I found other boards are marked A5-V11 so used that as a starting point.

SoC RT5350
MIPS CPU
Clock 239 MHz
4 MByte Flash (GD25Q32)
16 MByte RAM (EM639165TS-6G)
USB Host 2.0
10/100 Ethernet switch
802.11n interface
I2C
Uart
Reset button
2 LEDs
Micro usb as power source

For this configuration I used my windows desktop and connected my 2nd network interface to the device.

Default ip is 192.168.169.1 and DHCP is enabled

Telnet is enabled by default and can login using admin/admin

BusyBox v1.12.1 (2011-10-22 23:04:50 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

# help

Built-in commands:
-------------------
. : break cd chdir continue eval exec exit export false hash
help local pwd read readonly return set shift source times trap
true type ulimit umask unset wait

# cat /proc/cpuinfo
system type : Ralink SoC
processor : 0
cpu model : MIPS 24K V4.12
BogoMIPS : 239.61
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes
ASEs implemented : mips16 dsp
VCED exceptions : not available
VCEI exceptions : not available

cat /proc/cmdline
console=ttyS1,57600n8 root=/dev/mtdblock5

# cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 000c282a 00010000 "Kernel"
mtd5: 002ed7d6 00010000 "RootFS"
mtd6: 003b0000 00010000 "Kernel_RootFS"

The stock bootloader is minimal/strangled one and needs upgrading and doesn’t allow flashing of OpenWrt firmware via the stock gui.

The easiest way to load a new bootloader and firmware is to download the files from a webserver. I used miniweb after installing I added the following files the htdocs directory

uboot_usb_128_03
mini.bin

and then run via windows command line

C:\Users\pc\Desktop\miniweb>miniweb.exe -p 80 -d
MiniWeb (build 300, built on Feb 28 2013)
(C)2005-2013 Written by Stanley Huang

Host: 192.168.169.2:80
Web root: htdocs
Max clients (per IP): 32 (16)
URL handlers: 2

Back in your telnet window download the two files

cd /tmp
# wget http://192.168.169.2/uboot_usb_128_03.img
Connecting to 192.168.169.2 (192.168.169.2:80)
uboot_usb_128_03.img 100% |*******************************| 135k --:--:-- ETA

# wget http://192.168.169.2/firmware.bin
Connecting to 192.168.169.2 (192.168.169.2:80)
firmware.bin 100% |*******************************| 3328k 00:00:00 ETA

Next write the new bootloader

# mtd_write write /tmp/uboot_usb_128_03.img Bootloader
Unlocking Bootloader ...
Writing from uboot_usb_128_03.img to Bootloader ... [w]

Now write the new firmware

# mtd_write write /tmp/mini.bin Kernel_RootFS
Unlocking Kernel_RootFS ...
Writing from /tmp/mini.bin to Kernel_RootFS ... [w]

Once all complete reboot
# reboot

While it's rebooting you'll need to set a static ip on your desktop interface that is connected to the device i.e
192.168.100.2
255.255.255.0

Once the deivce has rebooted it will be available via 192.168.100.1 and again telnet is enabled.
=== IMPORTANT ============================
Use 'passwd' to set your login password
this will disable telnet and enable SSH
------------------------------------------

BusyBox v1.19.4 (2013-12-29 15:07:06 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
BARRIER BREAKER (Bleeding Edge, r35407) - RT5350F
-----------------------------------------------------
-- Cooked by pratanczuk --
-- --
-- my-embedded.blogspot.com --
-----------------------------------------------------
root@OpenWrt:/#

CONGRATULATIONS you now have a minimal OpenWrt image installed. You can now also upgrade using the sysupgrade function but you need to be aware of the 16MB memory limit.

Please let me know what you are using your devices for and share any custom f/w you've built for it.

Here are some useful links I found
OpenWrt
My Embedded (minimal OpenWrt image)
Github
Bootloaders
Blog Post

Continue Reading

TVPlayer subtitles – Dont hold your breath

So my tv broadband and phone package is due for renewal in a couple of months and it is clear i only actually watch a couple of subscription channels and mainly Discovery. I don’t have sports or movies packages as have no need for them as not into football and 99% of the films are repeats. During my search I came across tv player which looked a good deal as it has exactly the channels I wanted for sensible monthly price meaning all I would need to pay for is broadband from another supplier and there is currently various deals on at the moment. As TV Player is a streaming service I thought I would check the subtitles situation. A quick Google found this post http://support.tvplayer.com/forums/229619-ideas-and-suggestions/suggestions/5458900-subtitles-for-live-channels-as-this-is-the-best-ap the top post by ‘TVP Admin’ from 3 years ago said they are “currently working on it, they also said the same thing in 2015.

Due to the length of time I assumed that subtitles would now be available so dropped them an email and this was their response.

So after 3 years of working on it they still can’t provide subtitles? With live tv via other providers Discovery programs have subtitles so unsure why it can not be done via a streaming service (if anyone can shed any light on this please comment below). In this technological age we shouldn’t still need to be begging for accessible tv services!

22/08/17
I have gone into full keyboard warrior mode and dropped and email to the Discovery channel for their feedback.

“Good evening

As an avid viewer i have been looking for other tv packages that can supply your channel as i’m paying too much for chnnels I don’t watch and during my search I came across https://tvplayer.com/ being deaf I contacted them re subtitle availability and I was told “We don’t offer subtitles at the moment but we hope to have this feature available soon.” apparently they have been “working on it” since 2014!. I know live tv shows have subtitles but where do the limitations come in as BBC iplayer etc have subtitles? Is tvplayers delay due to changes needing to be made by yourselves?. It’s very saddening that some providers are dragging their heels with accessible tv services.”

I got a reply from discovery

“Thank you for contacting Discovery.

Our channels are available through Freeview.

Kind regards,

Sheena | Discovery Viewer Services | discoveryuk.com”

My reply

“Good morning thanks for your reply however it doesn’t answer my question re streaming service tvplayer offering subtitles.

Also Discovery channel is not shown on the freeview channel guide https://www.freeview.co.uk/why-freeview/channels#K02KVJU0jI0qsEYj.97

their reply

“While we are included in these channels, unfortunately we have no say in their production or subtitling facility.

You would need to contact them.

Apologies for any inconvenience caused.

Adam
Discovery Customer Support”

So there you have it looks like its a TVPlayer issue rather than Discovery.

Continue Reading

New wordpress theme

So I decided to look for a new theme for TOP as the current one isn’t responsive and an increasing number of people view the site on mobile devices. After goinf through many 100’s I decided on the Olsen Light theme. It fits in well with my minimalist look and will be making some tweaks to make it fit better.

Old theme
topoldwptheme

New theme
topnewwptheme

As you can probably see i’m not big on change and know what I like.

Continue Reading
1 2 3 7