05-10-2014, 05:30 PM
Join Date: Nov 2013
Howto View Roamio Logs on Linux
PREFACE: While Linux will let you WRITE to the drive as well, doing so runs a small risk the Roamio will reject the drive and go into an infinite reboot loop. The only certain way to recover from is to erase the drive losing your recordings. Don't try it, unless you have the tools and skill to recover from such a situation. The steps below are for READS and is likely safe because of it.
The Ext partitions on Roamio hard drives appear to be readable on commonplace Linux PC's. There's no new techniques in here, but an attempt to be accurate and safe for the semi-technical.
1) Connect the Roamio Hard Drive to a Linux computer, either via Sata or eSata/USB housing.
Check the drive has had enough time to spin up.
2) Locate device name by running:
> dmesg | tail -30
You are looking for a few lines that says "sd" followed by a lower case letter. Confirm it's the right drive, it should say:
sdX: unknown partition table
And just above that it will list the size and model name detected. Make sure everything matches. This is very important as one day you'll erase all your data if you have this one letter off.
3) View the partition map of the device name from step 2. Viewing the device probably requires root permissions so su or sudo at this point.
To view by hand it's:
> dd if=/dev/sdX skip=9 count=1 bs=512 | od -h -a
> ./pmdmp /dev/sdX
> ./pdisk -l /dev/sdX (not Roamio aware as of today, but eventually)
> ./mfslayout.sh /dev/sdX (requires the Roamio fork)
4) /var is partition 9, you're looking for the offset for this partition. Most viewers will be displaying 512byte blocks. Multiply this number by 512 to convert to bytes, on a calculator that can handle large numbers. [Google works: OFFSET * 512]
5) Create loopback device with calculated offset:
> losetup --offset NUMBER_FROM_4 -f /dev/sdX
6) Locate corresponding new loopback device, in the first column:
> losetup -a
7) Test it if makes sense as Ext:
> dumpe2fs /dev/loopX
This will either give you a short and curt error message or long and detailed success message with more than you want to know. If you got the short message, nothing you can do except skip to the Undo part and try again, double checking you have your numbers, math, and device right.
7b) Another method in case if you're really stuck but slightly off, is looking for the magic header in the superblock by hand.
> od -h /dev/loopX | grep "ef53"
This is not easy so you might as well just post back for help instead.
8) Mount Read Only:
> mkdir /mnt/Roamio
> mount -oro /dev/loopX /mnt/Roamio
9) View logs:
> cd /mnt/Roamio/log/
> less kernel
> less messages
> less tverr
9b) older logs get compressed. Use zcat or gzcat.
-1) Undo above steps manually:
> cd / # in all shells
> umount /mnt/Roamio
> losetup -D
Device should be free now if there were no errors.
X) Undo them all at once, it should be safe to do a reboot:
> /sbin/shutdown -r now
Last edited by telemark; 06-20-2014 at 10:28 PM..
05-13-2014, 12:42 PM
Join Date: Nov 2013
Could you do an ls of a couple of directories, like /etc, maybe /usr/bin
It would be interesting to see what programs come installed on the roamio. Maybe we could get an ssh or telnet daemon up and running or something. We might also be able to modify the rpc daemon
05-13-2014, 07:54 PM
Join Date: Nov 2013
/etc and /usr/bin are not on the hard drive.
On drive there's just swap, /var, /db [and MFS]
/var/tmp/java/tcdclient/fwprops.xargs: ASCII text
/var/tmp/java/tcdclient/bs/1/jar0: Zip archive data, at least v1.0 to extract Java Jar file data (zip)
/var/tmp/java/tcdclient/bs/1/startlevel: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/3/autostart: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/3/jar0: Zip archive data, at least v1.0 to extract Java Jar file data (zip)
/var/tmp/java/tcdclient/bs/3/startlevel: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/5/autostart: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/5/jar0: Zip archive data, at least v2.0 to extract Java Jar file data (zip)
/var/tmp/java/tcdclient/bs/5/startlevel: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/2/autostart: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/2/jar0: Zip archive data, at least v1.0 to extract Java Jar file data (zip)
/var/tmp/java/tcdclient/bs/2/startlevel: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/4/autostart: raw G3 data, byte-padded
/var/tmp/java/tcdclient/bs/4/jar0: Zip archive data, at least v2.0 to extract Java Jar file data (zip)
/var/tmp/java/tcdclient/bs/4/startlevel: raw G3 data, byte-padded
/var/tmp/java/tcdclient/startlevel/currentlevel: raw G3 data, byte-padded
/var/tmp/openvpn/VPNClientStatus: fifo (named pipe)
/var/tmp/openvpn/client.config: C source, ASCII text
/var/tmp/fswak.lock: setuid, setgid, sticky, empty
/var/tmp/hppm: fifo (named pipe)
/var/mtab: ASCII text
/var/etc/locale-cache: ASCII text, with no line terminators
/var/keystore/shas: ASCII text
/var/keystore/blowfish.tcd: ASCII text, with very long lines, with no line terminators
/var/keystore/$TSN: ASCII text, with no line terminators
/var/run/klogd.pid: ASCII text
/var/run/run: broken symbolic link to `/volatile/run'
/var/run/nscd/nscd.pid: ASCII text
/var/run/syslogd.pid: ASCII text
/var/run/squid.pid: ASCII text
/var/log/tvlog: ASCII text, with very long lines
/var/log/tclient: ASCII text
/var/log/tverr: ASCII text, with very long lines
/var/log/kdebug: ASCII text
/var/log/svclog: ASCII text
/var/log/syslog.pipe: fifo (named pipe)
/var/log/demo: ASCII text, with very long lines
/var/log/messages: ASCII text, with very long lines
/var/log/kernel: ASCII text
/db/TrioDb.sqlite: SQLite 3.x database, user version 27
/db/RecordingDb.sqlite: SQLite 3.x database, user version 8
/db/ApgDb.sqlite: SQLite 3.x database, user version 26
/db/LdrDb.sqlite: SQLite 3.x database, user version 12
/db/UclDb.sqlite-wal: SQLite Write-Ahead Log, version 3007000
/db/sticky: ASCII text
/db/Persist.sqlite: SQLite 3.x database
/db/NpkDb.sqlite: SQLite 3.x database, user version 26
/db/PgDb_1.sqlite: SQLite 3.x database, user version 20
/db/RecordingDb.sqlite-wal: SQLite Write-Ahead Log, version 3007000
/db/flash2/data/config/ssl/certs/unencrypted/ca-bundle.crt: broken symbolic link to `/tvbin/flash3/ssl/certs/unencrypted/ca-bundle.crt'
/db/RelDb.sqlite: SQLite 3.x database, user version 2
/db/VodDb.sqlite: SQLite 3.x database, user version 6
/db/HttpDb.sqlite: SQLite 3.x database, user version 26
/db/flash/stagecraft-data/ssl/certs/ca-bundle.crt: broken symbolic link to `/tvbin/flash/ssl/certs/ca-bundle.crt'
/db/flash/stagecraft-data/shared-objects/database.conf: broken symbolic link to `/tvbin/flash/config/database.conf'
/db/UserDb.sqlite: SQLite 3.x database, user version 7
/db/PgDb.sqlite: broken symbolic link to `/db/PgDb_1.sqlite'
/db/NpkDb.sqlite-wal: SQLite Write-Ahead Log, version 3007000
/db/UclDb.sqlite: SQLite 3.x database, user version 26
/db/TrioDb.sqlite-wal: SQLite Write-Ahead Log, version 3007000
Last edited by telemark; 05-13-2014 at 09:12 PM..
05-13-2014, 09:36 PM
Join Date: Nov 2013
Does anyone know what that "tcdclient" is? Those jar files look interesting. Should be easily decompiled
Also, is this a complete directory listing? For example, what's under that utils directory? Is it empty? Also, the /var/tmp/etc?
05-13-2014, 11:42 PM
Join Date: Nov 2013
Well, my image is virgin. A long running system would have many more files.
This image has not made it through guided setup and not hooked up to net so should not have anything that did not come off of flash.
Last edited by telemark; 05-14-2014 at 04:41 AM..
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off