Thursday, January 18, 2018

Netcat weirdness - 72 byte errors


I thought I'd take a closer look at what was happening with my netcat problem.

I ran a cmp on the files to see just what was happening.


cmp -l /media/sdk1/BACKUP_2018_01_15_BY_USB /media/sdk1/BACKUP_2018_01_15_BY_NETWORK
 10056230615   5   0
 10056230616 152  25
 10056230617 264 351
 10056230618 151  57
 10056230619  14 205
 10056230620 357 125
 10056230621 156   0
 10056230622 326  32
...

(Oh and if those "bytes" look weird, cmp outputs the bytes in octal...go figure. cmp prints the byte offset in decimal and the byte itself in octal)


and what's weird is that the error blocks are 72 bytes in length. (I think that's the length of an ethernet frame)

and even more strange is that the error blocks are always the same exact data. Above you can see the sequence 0,25,351,57 etc...
That's the same 72 byte sequence in each error block.

I loaded the output into LibreOffice Calc and graphed it:

So out of 250GB of data, there are around 432 bytes different, 6 blocks of 72 (72*6=432).



Column H and I are just =CHAR(OCT2DEC(B1)) and = CHAR(OCT2DEC(C1)) copied downward.




I actually did the copy over the network twice and got different results:



(edit: I thought it was a realtek 8169 but it's actually a Marvell Yukon)

The sending network card is a Marvell Yukon (D-Link DGE-530T) using the skge driver running under Knoppix 8.1.

Wednesday, January 17, 2018

Netcat weirdness - corruption

I thought I'd try to image a hard drive over the local network.

I boot knoppix on each system, figure out the ip address with ifconfig and then


nc -l 5000 | pv > /media/sdc1/MY_IMAGE_FILE

and on the system to be imaged:

dd if=/dev/sda | pv | nc -N 192.168.1.1 5000


I like to pipe it through pv so I can see what's happening.

I've got a 250GB hard drive so at around 20MB/sec it takes a while, 250E9 / 20e6 / 60 / 60 = 3.47 hours.

But when I check it with md5sum I get different results. Very strange. I thought that TCP connections were supposed to be error corrected.

I do an image directly to a usb drive and the md5sums match.

netstat -s
nstat

gives a lot of statistics,

I see quite a few errors, maybe the network card or switch is acting up. This is the kind of thing that drives you crazy.

Wednesday, January 3, 2018

Year end totals

I think I've been pretty consistent:

2.5 million steps in a year, no wonder my shoes look beat up.

Not quite amish level though.




Sunday, December 24, 2017

Fiddling with old Time Capsule 1st gen and linux


So I got my hands on an old Apple Time Capsule (1st generation) just to see what it would do.

I wanted to see if it would mount under ubuntu 17.10 with cifs, and the instructions here were pretty useful.

http://blog.martinshouse.com/2014/09/mounting-apple-time-capsule-share-from.html


There was a little snag: It kept giving me Error 112 Host is down.

sudo mount.cifs //1.2.3.4/data -opassword=mypassword,sec=ntlm /mnt/mymountpoint
mount error(112): Host is down


Looking at the dmesg output:
dmesg

[716567.498354] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[716567.500002] CIFS VFS: SMB response too short (35 bytes)
[716567.500038] CIFS VFS: cifs_mount failed w/return code = -112


I needed to specify the SMB version as 1.0 for mount.cifs or it wouldn't work.


sudo mount.cifs //1.2.3.4/data -opassword=mypassword,sec=ntlm,vers=1.0 /mnt/mymountpoint



=============================================


and interestingly, smbclient won't display the actual share until you tell it not to use ntlmv2.

It will connect but it won't display the Disk.

smbclient -L //1.2.3.4
WARNING: The "syslog" option is deprecated
Server does not support EXTENDED_SECURITY but 'client use spnego = yes' and 'client ntlmv2 auth = yes' is set
Anonymous login successful
Domain=[WORKGROUP] OS=[Apple Base Station] Server=[CIFS 4.32]
Enter WORKGROUP\me's password:

Sharename Type Comment
--------- ---- -------
IPC$ IPC


But if we give it an option of 'client ntlmv2 auth=no', then we can see it.


smbclient -L //1.2.3.4 --option='client ntlmv2 auth=no' -U example

smbclient -L //1.2.3.4 --option='client ntlmv2 auth=no' -U example
WARNING: The "syslog" option is deprecated
Enter WORKGROUP\example's password:
Domain=[WORKGROUP] OS=[Apple Base Station] Server=[CIFS 4.32]

Sharename Type Comment
--------- ---- -------
IPC$ IPC
data Disk


And we can see "data".

Wednesday, December 20, 2017

Huge mouse cursors with Ubuntu 17.10

I couldn't find my mouse cursor easily, so why not make it as big as possible.

First, get the dconf editor and then go to

org / gnome / desktop / interface

and set the cursor-size to 64.

You can set it to larger than 64 but it doesn't get any bigger than 64. I wish I could make it even bigger.

It takes a little getting used to but it's so much easier to see on my 50" tv screen.


You can do it from the command line too:

dconf write /org/gnome/desktop/interface/cursor-size 24
dconf write /org/gnome/desktop/interface/cursor-size 64


https://askubuntu.com/questions/126491/how-do-i-change-the-cursor-and-its-size

Sunday, December 17, 2017

So many tabs and finding the one where you just were

I open a LOT of tabs in firefox. Sometimes it gets confusing to find the tab you were just using. Where is it? Where did it go?

For example, I click on new tab and my new tab opens on the far right of all of my tabs, and the one I was just using scrolls off the visible screen.

It'd be really slick to have a way to find your most recently used tabs, like under the history menu where you've got Recently Closed Tabs menu, just have a Recently Used Tabs menu.

Or a right+click on the List All Tabs button would give you the tabs sorted in order of last use.

Maybe an "about:recent" page.

ALT+TAB will get you to your most recently used window, but CTRL+TAB in firefox goes to the next tab, CTRL+SHIFT+TAB previous tab, not the most recently used tab.


I'm lost in the forest without a trail of breadcrumbs...

===============

A couple of other things that would be useful:

The mini-history in the back button (right click on the back arrow button) only shows you 15 entries, why not give me the option of displaying as many entries as will display on my screen by clicking on a down arrow or something. Scrollable, perhaps.


Also, a quick way to find out which windows are playing videos/sounds would be nice. "About:videos" with maybe an option to stop them all. Or just a menu option "Stop all videos".

================

The latest version of firefox have been auto-repeating my typing when the cpu gets hung up. So I get a lot of exxxxxxxxxxxxxxxtraaaaaaa characters sometimes while typing in the location box.

==================


My latest firefox discovery: The about:about page.

Saturday, December 16, 2017

Ti99 game Rock Runner

I was looking at a page about boulder dash and different variants and wondered if there was a boulder dash clone for the ti99.

I read about this ti99 game rock runner which is a boulder dash clone so I had to give it a go.


There's the author's web page at:

http://www.lafortune.eu/rockrunner/index.html

Rock Runner Info

8-way scrolling game for the TI-99/4A.
Goal: collecting diamonds in a 2D world.
Simple physics: gravity, lava, bombs, butterflies,...
Written in TMS-9900 assembler.
Development tools: line-by-line assembler, hex editor, Mini Memory module, tape recorder.
Used a novel undocumented half-bitmap graphics mode of the TMS-9918A Video Display Processor.
Program code fitted in 4K of memory.
Distributed by Asgard Software.

and I was able to find a disk image on the net.

I've never used a ti99 before so it was difficult to get things set up:

Requirements: Editor/Assembler cartridge, 32K RAM, disk drive, joysticks.
Executable to run: ROCK (E/A Option 5)



./mame64 ti99_4a -cart1 editass -rompath 'mame190roms' -window -screen screen1 -resolution 640x480 -verbose -ioport peb -ioport:peb:slot8 hfdc -ioport:peb:slot2 32kmem -flop1 ../../Rockrun.dsk


I finally realized what E/A option 5 means:

Load the editor/assembler by pressing 2:



Press option 5 to load:



Then type DSK1.ROCK and ENTER (I think it needs to be caps-lock uppercase)








It's pretty challenging to finish the first level in the time limit.