3

I was fiddling with an old DVR and discovered it had telnet unblocked. So I ran ncrack and after gaining access started looking around. It seems to be running some custom version of Linux. Not many commands work. All I know is that it runs Busybox and this is what it gives when I run the following command

# uname -a
Linux (none) 2.6.32.16_stm24_V2.1-SDK7105_7105-STSDK #5 PREEMPT Thu Sep 20 17:20:47 CST 2012 sh4 unknown unknown GNU/Linux

I'd like to install Debian or Ubuntu on this so it is actually usable. Is it possible to do that via command line? (I only have root access via telnet). apt-get nor rpm work the only method of downloading things is via Busybox wget. It does have usb ports, but I'm not sure how to boot from a USB since this is a custom version of Linux.

9
  • Is there a way I could boot from a usb using telnet. Like a script or command. The OS is unknown so I don't know if GRUB would work, and I can't even install it.
    – Verpz
    Feb 14, 2016 at 6:06
  • @drewbenn Yes it is in flash memory, the whole os is on there. I would still prefer debian or ubuntu as the dvr currently relies on busybox and doesn't have a package manager so doing everything manually would be a pain (And it isn't letting me install bash). Is there a way to check which bootloader I have. And if I find it does that mean I can flash Debian?
    – Verpz
    Feb 14, 2016 at 7:18
  • would you post free and df -h output? Feb 14, 2016 at 9:32
  • 1
    There must be thousands of informative pages on the net describing how to work with embedded Linux and what the pitfalls are. That you tried to install GRUB on a DVR not even knowing its architecture shows that you have not researched this one bit. If it was that easy to replace an embedded Linux, do you think there'd really be a need for projects such as Open WRT?
    – vic
    Feb 14, 2016 at 12:26
  • 1
    Yeah, thanks for your help, it isn't even STLinux even more its been that hacked.
    – Verpz
    Feb 14, 2016 at 21:05

1 Answer 1

2

I have strong doubts it is possible to install Debian or Ubuntu in your DVR.

Ignoring the fact most often some consumer-grade processor/devices have a shoddy job in the kernel department with some hacked/proprietary device drivers, busybox is usually used where there are severe limitation of resources. You might have lucky and have a more supported device, however it is not the norm.

I have an embedded Linux at home, with 128MB of RAM, and 16MB of disk; yours seem to be aprox 96MB of RAM + 128MB of disk. With this kind of resources there is not much leeway to install a normal Debian or Ubuntu distribution without significant work.

Even then, I have to point out that seeing a Linux prompt somewhere does not means vanilla kernel supports it, or that there are open source drivers for it. (nor does it means there are maintained closed drivers for it).

The string stm24_V2.1-SDK7105_7105-STSDK in your uname command led me to find out it seems a Chinese distro for embedded devices, STLinux, based in the linux kernel 2.x ; again the same comments apply here, we cannot say for sure without documentation until which extent it has been hacked. STLinux seems to depend on rpm packages, and appears to still have security updates.

The STLinux distribution and development environment provides everything required to build Linux based systems for STMicroelectronics products which are based around the ARM Cortex A9, ST40 or ST200 CPUs.

The STLinux page also will provide you hints how to deal with your board. Also according to them, they are not using grub, but u-boot.

The U-Boot utility is a multi-platform, open-source, universal boot-loader with comprehensive support for loading and managing boot images, such as the Linux kernel.

You can try to upgrade it at your own risk. I would say the probability of bricking the device is high.

As for interacting with embedded consumer devices, often there are JTAG ports under the hood (i.e. opening the box), which provide RS-232 access to the environment, often before the kernel booting. If so, they can be used with a cable similar to the PL2303 PL2303HX USB to UART TTL Cable Module 4p 4 Pin RS232 - the cable itself costs around 2USD in aliexpress.

Your mileage may vary, I would google around the maker and model of your box.

6
  • Thanks, It is an Aldi (Kind of like Walmart) DVR that was terrible so I bought a new one, It won't matter too much if it gets bricked. As for the JTAG port, it only has a small 4 pin white connecter shaped like a top hat. I can't even use U-Boot commands or find the config file, and literally no commands work except for basic directory stuff without using Busybox. Busybox doesn't even work properly so I doubt I would be able to pull it off. Thanks for your help :) I think just buying a raspberry pi would be a better option.
    – Verpz
    Feb 14, 2016 at 21:04
  • Depending on what you want, there are better SBCs out there. raspberry is fine for compatibility and video center. I would have a look at the banana pro. for networking a Lamobo Pi R1 (I own one), and for 64 bits, odroid C2 is coming in a month time (Pine 64 is not as good). Feb 14, 2016 at 21:10
  • (I know Aldi btw) Your best bet is to piece the bits together and try to find the true chinese make and model before being rebranded. Feb 14, 2016 at 21:24
  • Thanks ill look into the boards. I just bought a pi but I wouldn't mind another board. I'm thinking of turning one into a NAS.
    – Verpz
    Feb 15, 2016 at 2:03
  • The conversation about the sbcs can get pretty long, open another question, message me, I will be more than happy to get on with it. Feb 15, 2016 at 8:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .