cloning an IDE Linux machine with netcat

I’ve ran into some weird instance of this old RedHat Linux machine that is starting to die.. The old 30GB disk is clicking rather loudly…!

To make matters worse, the computer is not only in another country but on another continent.  And no the users won’t let me take it down, ship it or let local techs work on it, they want it virtualized, and they want it to be done without taking it down…

All I have to work with is an old Windows 2003 server with a big external USB disk, and I don’t even have administrator privileges on the 2003 server so I can’t install anything ‘fun’ like VMWare, VirtualPC, VirtualBOX or anything else.

So I thought I’d go old school with this and use netcat.

Thankfully there is a win32 version of netcat, and the Linux PC already had it installed.  So it really was trivial I must say knowing what to do once all the bits are in place.  From the Windows machine I just ran:

nc -p 2222 -l |gzip -dc > disk0.raw

And on the Linux PC I ran:

cat /dev/hda | gzip -c | netcat 10.0.1.10 2222

So on the Windows side, netcat will listen on TCP port 2222 and then decompress the stream with gzip and save that into the file disk0.raw.  On the Linux side, it’ll read the harddisk, compress the data with gzip and then using netcat redirect the stream to the Windows host.

It took about 30 minutes, I suppose if the disk wasn’t in a questionable state I’d have cleared out the empty space to speed it along, however I felt that doing a large amount of writing to a questionable disk is just asking for trouble.

Once the transfer was complete I was able to then fire up Qemu 0.15.0, and have it mount the raw disk image, and it worked perfectly!  I added the modules for the AMDPCNet card (pcnet32) and I was able to use the user mode NAT via Qemu, and redirect a local TCP port into the VM’s sshd …. Something like this:

qemu -L pc-bios -m 256 -net nic,model=pcnet -net user -hda disk0.raw -no-reboot -redir tcp:3333::22

And that was that.  Now we have a perfect copy of the machine!

Island 8080 Emulator

Island 8080 running CP/M on MinivMac

I’ve never heard of this before, but a friend pointed me towards this this page, that has a CP/M version that’ll run on a Macintosh.  But as they list out it ONLY works on super ancient Mac’s namely the 128k & 512k varities.  Plus owners & everyone beyond them is out of luck.

So what is there to say?  Well it does in fact run CP/M, and the demo disk includes WordStar but without a clear way of getting data on & off the diskettes it is kind of .. pointless?  I’m sure back in the day this would have been an awesome programme for Macintosh users as you could run ‘all that CP/M’ stuff out there on these giant 400kb diskettes.  Needless to say the rise of the IBM PC killed that and everyone went to MS-DOS but for some people I’m sure this was the tipping point of why to go Mac.  In this day & age emulators to run emulators may seem silly but I figured it was at least worth mentioning that this did in fact exist…

I suppose I could rig something to transfer the 8080 version of Zork1 to it, but is it worth the effort?

4.1c BSD

It’s been a long while since I’ve posted anything VAX BSD related.  So I found this ISO image a while back that had all these old versions of BSD on them, but sadly many of them are incomplete, missing parts, and give really no clue on how to use them.  There is even some duplication thrown in there just to complicate things further.  So I figured I’d try one of them, an interim release of 4 BSD and see if I could just overlay a newer release version and see what I get…

VAX780 simulator V3.8-1
Listening on port 23 (socket 156)
loading ra(0,0)boot
Boot
: ra(0,0)vmunix
215688+63964+69764 start 0xf98
4.1c BSD UNIX #2: Tue Aug 28 09:39:12 PDT 1984
real mem  = 8384512
avail mem = 7036928
using 148 buffers containing 838656 bytes of memory
mcr0 at tr1
mcr1 at tr2
uba0 at tr3
hk0 at uba0 csr 177440 vec 210, ipl 15
rk0 at hk0 slave 0
rk1 at hk0 slave 1
uda0 at uba0 csr 172150 vec 774, ipl 15
ra0 at uda0 slave 0
ra1 at uda0 slave 1
zs0 at uba0 csr 172520 vec 224, ipl 15
ts0 at zs0 slave 0
dz0 at uba0 csr 160100 vec 300, ipl 15
mba0 at tr8
root on ra0
WARNING: should run interleaved swap with >= 2Mb
Automatic reboot in progress...
Tue Aug 28 09:54:53 PDT 1984
/dev/rra0a: 836 files, 6010 used, 1419 free (35 frags, 173 blocks)
/dev/rra0h: 6598 files, 41780 used, 320080 free (160 frags, 79980 blocks)
Tue Aug 28 09:54:58 PDT 1984
local daemons: telnetd ftpd tftpd syslog sendmail.
preserving editor files
clearing /tmp
standard daemons: update cron accounting berknet mail printer.
starting network: rshd rexecd rlogind rwhod routed.
Tue Aug 28 09:55:00 PDT 1984

ucbmonet login: root
Last login: Tue Aug 28 09:44:44 on tty00
4.1c BSD UNIX #2: Tue Aug 28 09:39:12 PDT 1984
Master source now lives here; freeze your 4.1c stuff now.
As far as the laws of mathematics refer to reality, they are not
certain; and as far as they are certain, they do not refer to reality.
                -- Albert Einstein
monet#

Pretty cool.  And oddly enough googling around doesn’t seem to find much about people running 4.1c BSD, but it is significant with the first version of sendmail being bundled, and rogue.

The release also includes TCP/IP support but I haven’t the slightest idea how to use it.  I suppose reading the instructions is key.  But I thought I’d share this little fossil first.

For those who want to try it, you can download it here.  It’s using SIMH, so if you aren’t running Windows, bring your own VAX 11/780 and you’ll be good to go.

Linux turns 20 today….

Wow 1991 was so long ago.  I didn’t get pulled into Linux until the summer of 1992 (0.12 I think?), but wow I’ve sure had my ups & downs with Linux but it certainly had a major impact on everything we do.  Even if it is ‘kind of fringe’ it is in all kinds of things all around us all over the place.  No doubt the whole 20 year thing has been covered pretty much everywhere.

You would be kidding yourself if you have used anything on the internet and not had any interaction with a Linux machine in some manner.  Heck even this blog runs on a Linux VM.

While Linux 0.10 may have been the first ‘usable’ version to many, 0.11 is the first version that has been preserved.  I had even did a Qemu bundle of 0.11 that oldlinux.org had put together as I find Qemu runs Linux better, and of course faster than Bochs.

So here we are and I thought I’d update the Qemu and add in a personal favorite this time…

Download it from sourceforge.

uudecode

Sometimes taking a binary and sending it through a text only medium (email) is a damned handy thing.  And sometimes you are dealing with old crap and being able to decode what you’ve just built would help a TONNE.

Luckily uudecode already exists.  So before I forget it, the link to a nice BSD version that’ll compile on any good UNIX and MS-DOS system is available here.