Backup for RSTS

241 views
Skip to first unread message

Carl Marbach

unread,
Jul 2, 2022, 12:03:19 PM7/2/22
to [PiDP-11]
Twice my RSTS system has been corrupted. The last time the system disk had a fatal error that wiped out the SYSTEM account [1,2].  I reloaded the software and the system is back, but all the stuff I copied/wrote in a user account is, of course, gone.

How can I attach a USB disk to the PI and back up my RSTS user files?

Thanks for the help, as usual!
Carl

Clem Cole

unread,
Jul 2, 2022, 12:20:22 PM7/2/22
to Carl Marbach, [PiDP-11]
Carl - As, I continue to remind you -- you have a RPi which is a Unix/Linux running a UNIX program, called simh, that emulates a PDP-11.
These are basic UNIX questions ...  if you want to do sophisticated things with RSTS, you are going to have to learn to use the OS that is providing a virtual environment for it.

You can desire something else -- but what you purchased is a UNIX system running a UNIX program ...  if someone develops a different emulator using a different scheme - it's a different product.   But that is not what you bought.

So you will continue to run into issues until you stop and learn to use UNIX.  That is the support environment that you have.

1.) Attach USB disk
2.) run the unix man command and learn about how to splice the disk into the UNIX FS namespace
3.) mount the disk noting the path you used
4.) halt RSTS simulation
5,) reconfigure simh to create either a virtual disk or virtual tape on using a new file with the previous path - you'll need to read the simh doc and/or try Mark's help system in simh.
6.) restart RSTS after you have the new virtual device configured and ensure that RSTS sees it - I suspect that may take a reboot.

Now you can use the virtual disk/tape with a RSTS backup scheme

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/b118b27e-5e71-4123-8314-ca1bf20f2a37n%40googlegroups.com.

timr...@gmail.com

unread,
Jul 2, 2022, 2:55:32 PM7/2/22
to [PiDP-11]
I'd be more worried on how it got corrupted in the first place.  I would not expect that to happen or be extremely rare.  Is it a misconfiguration somewhere?  What are you using for storage?  Is this on the mini SD card?  Maybe it's slowly dying?  Is it old? Maybe it doesn't meet the required specs?  There are speed ratings on these. Just curious on how it failed.  Because if you don't figure that out and fix it, then it WILL happen again.  Don't ask how I know this.  :)

Adam Thornton

unread,
Jul 2, 2022, 3:08:50 PM7/2/22
to timr...@gmail.com, [PiDP-11]
Specifically get a higher voltage power supply.  Undervoltage has resulted in sd card corruption on a pi several times for me

Anton Lavrentiev

unread,
Jul 2, 2022, 3:10:36 PM7/2/22
to Carl Marbach, [PiDP-11]
Your RSTS "disks" are just files on your Pi, located in /opt/pidp11/systems
(then there's a subdirectory for each empulated OS, rsts7 for RSTS):

pi@raspberrypi:/opt/pidp11/systems/rsts7 $ ls -la
total 15364
drwxr-xr-x 2 pi pi 4096 Mar 10 2020 .
drwxr-xr-x 15 root root 4096 Sep 17 2019 ..
-rw-r--r-- 1 pi pi 1147 Mar 10 2020 boot.ini
-rw-r--r-- 1 pi pi 5235200 Mar 10 2020 rsts_full_rl.dsk
-rw-r--r-- 1 pi pi 5235200 Sep 5 2018 rsts_min_rl.dsk
-rw-r--r-- 1 pi pi 1685 Sep 5 2018 rsts_readme.txt
-rw-r--r-- 1 pi pi 5235200 Mar 10 2020 rsts_swap_rl.dsk

So these are the files that you need to copy out of your Pi. You can
do it in a few ways,
FTP out to somewhere, remote copy them with "scp", mount a USB thumb
drive attached to
Pi and them "cp" the files there, etc... Only make sure you do this
when your emulated
OS is completely shut down (in RSTS you'd do "run $shutup").

The fact that the "disk" became corrupted under a running emulated OS,
makes me think that
there's something wrong with the SD card that hosts the image for
Raspberry Pi itself.
You may want to check the file system integrity (of Pi) with the fsck command.

Another possibility would be that you did not shutdown RSTS properly
before pulling a plug
on your Pi (that including doing a graceful shutdown -- for Pi that'd
be enough but your
RSTS would just be simply "killed") -- then the "disk" (that is, those
files above) might not
have been properly updated, leading to the filesystem corruption.

So always _properly_ shutdown your emulated OS first, before you do the Pi.

HTH,
Anton

On Sat, Jul 2, 2022 at 12:03 PM Carl Marbach <cmar...@marbachs.com> wrote:
>

Mark Matlock

unread,
Jul 2, 2022, 3:11:24 PM7/2/22
to [PiDP-11]
Carl,
   Just to add a bit to Clem's excellent explanation of how to utilize a USB disk,
there is also a simple way to make a backup of any of the PiDP-11 operating systems.

1. Shutdown the PDP-11 operating system (e.g. In RSX11M or M+, RUN SHUTUP; in UNIX, sync, sync, sync then halt; RT-11 just halt)
2. once the PDP-11 OS is halted use ^E to get to the  sim> ( if needed) and type exit to close any open .dsk disk image files
3. At the Linux prompt cd /opt/pidp11/system
4. ls will show all operating systems folders
5. cd into the one you want (e.g. rsts7) to backup
6. cat boot.ini and look for the attach statements, they show what disk image files are used. For rsts7 these are:

attach rl0 rsts_full_rl.dsk
attach rl1 rsts_swap_rl.dsk

7. Use the Linux copy command cp to make a backup

cp rsts_full_rl.dsk rsts_full_rl_backup.dsk
cp rsts_swap_rl.dsk rsts_swap_rl_backup.dsk


To save a copy of the disk image files to someplace safer yet, use Linux ftp or sftp to copy the files to a laptop or PC. If you
ever need to recover a disk image file copy (cp) it over the original file, so that at the next PDP-11 OS boot it will be the
active disk image.

You can also use the native PDP-11 OS to make backups but you will need additional disk images attached in the boot.ini for that OS
and the PDP-11 OS needs to be aware of them. For example, in RSX they need to be mounted an dthen BRU could be used to make
a backup.

Best,
Mark

Anton Lavrentiev

unread,
Jul 2, 2022, 3:15:24 PM7/2/22
to Carl Marbach, [PiDP-11]
Last not least, you should really contact your email administrator, if
you want to receive further guidance from this group.

I am getting these every time I try to reply to your questions... (Or
is it my cue to stop doing so?)

Mail Delivery System MAILER...@mx.netsol.xion.oxcs.net via
nmtao202.oxsus-vadesecure.net

3:10 PM (1 minute ago)
to me
This is the mail system at host mx.netsol.xion.oxcs.net.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<cmar...@marbachs.com>: host mx1.netsolmail.com[172.65.252.97] said: 554 5.7.1
The message from (<anton.la...@gmail.com>) with the subject of (Re:
[PiDP-11] Backup for RSTS) matches a profile the Internet community may
consider spam. Please revise your message before resending. (in reply to
end of DATA command)

On Sat, Jul 2, 2022 at 12:03 PM Carl Marbach <cmar...@marbachs.com> wrote:
>

Ed Tottenham

unread,
Jul 2, 2022, 4:34:38 PM7/2/22
to Carl Marbach, [PiDP-11]
I'd be worried that they keep getting corrupted.

Always close down the DEC operating system with "run $shutup"

Exit from simh

Shutdown the pi with "shutdown -h now"

If it is still corrupting, investigate whether your power supply is up to the job.

I'm pretty sure that the Raspbian installed has an scp server installed. If you want to backup the disks and you're more comfortable in a Windows environment: download and install WinSCP.

Make sure that you have run $shutup on the RSTS system and exited simh.

Launch WinSCP and connect to the pi.

Navigate to /opt/pidp11/systems/rsts7

You can then drag all the files to a folder on your computer.

Restore them by dragging in the other direction.

Ed


Carl Marbach

unread,
Jul 2, 2022, 5:49:19 PM7/2/22
to [PiDP-11]

For some reason you were on my blacklist. I took you off, but I don't know how you got there to begin with. I've lowered my spam quotient.

Sorry.

Michael Harpe

unread,
Jul 2, 2022, 6:00:12 PM7/2/22
to [PiDP-11]
What I do is just make an image of the RPi boot card periodically. 

Mike Harpe

timr...@gmail.com

unread,
Jul 2, 2022, 7:35:00 PM7/2/22
to [PiDP-11]
I know it can report under-voltage.  But it's really a lack of amperage issue.  The supply is likely suppling 5v as it should but it can't provide the amps needed.
Telling him to get a higher voltage supply would make it sound like he needs 10v or 15v.  If the person doesn't understand this they might grab a supply that will
fry their Rasp Pi.  I always make sure my supply provides the right volts and amps needed.

Michael Harpe

unread,
Jul 2, 2022, 7:56:37 PM7/2/22
to timr...@gmail.com, [PiDP-11]
I use a 2.5A 5V supply with my 3B with no issues. 

Mike Harpe. 

Tim Radde

unread,
Jul 2, 2022, 8:47:39 PM7/2/22
to Michael Harpe, [PiDP-11]
Also what I use on my 3B.

Sent from my iPhone

Adam Thornton

unread,
Jul 2, 2022, 9:17:43 PM7/2/22
to Tim Radde, Michael Harpe, [PiDP-11]
Yes.  You should definitely give it not much more than 5V but sufficient amperage.  The official Pi power supply is 5.25 I think.  What you do NOT want is the random 800mA USB power supply you pulled out of your abandoned cellphone drawer.

Anton Lavrentiev

unread,
Jul 2, 2022, 9:22:53 PM7/2/22
to Adam Thornton, Tim Radde, Michael Harpe, [PiDP-11]
If his only corruption was an RSTS disk, then I think his SD card works just fine (along with Pi)...  With corrupted SD, Pi would have thrown a lot more tantrums (if at all boosted) than just with RSTS

Tim Radde

unread,
Jul 2, 2022, 9:28:59 PM7/2/22
to Anton Lavrentiev, Adam Thornton, Michael Harpe, [PiDP-11]
Unless the card is failing itself.  These only have so many read/write cycles.  But it does not seem like that as the data is moved in being re-written (as far
as I know).  So if not the SD, then it's likely the power supply is not up to par.

Michael Harpe

unread,
Jul 2, 2022, 9:29:43 PM7/2/22
to Anton Lavrentiev, Adam Thornton, Tim Radde, [PiDP-11]
Yes. The Pi is completely dependent on the card. I’ve had them fail before and yeah, you know it. 

Mike Harpe

Michael Harpe

unread,
Jul 2, 2022, 10:11:54 PM7/2/22
to Anton Lavrentiev, Adam Thornton, Tim Radde, [PiDP-11]
Setting up swapping on the Pi will hasten the demise of the card. I did that once. 

Mike Harpe

Neal G.

unread,
Jul 3, 2022, 1:12:20 PM7/3/22
to [PiDP-11]
Some additional suggestions...

MobaXterm includes an SFTP panel which allows you to drag-drop files from
a Windows PC, when connected to Raspian with SSH.
This is extremely convenient and I use it often to transfer files
to/from the Pi-2 of my PiDP-11. This can be used to backup the entire
RSTS system as others have described.

Raspian Desktop and VNC - If you have the Raspian graphical desktop enabled
you can then easily work with Flash or other USB storage media
attached to the Pi with the graphical File Manager. This makes working
with the Pi much easier for those not yet comfortable with the Linux command-line.
Add VNC and you can access the graphical interface from any remote system you choose
to use. I've found this very convenient.  

Classic/retro backup tools - for a more authentic experience, lookup the information
on how a backup would have been done back in the day. This would involve mounting
a simulated tape with SimH, possibly some tape initialization steps in RSTS,
then running the RSTS backup tool. This tape can then be used to restore the
user files on a new or recovered RSTS system.
I can't give you specifics for RSTS; I run RSX-11, which uses BRU (Backup Restore Utility)
for this.
As I have multiple instances of SimH running on the PiDP-11 and other systems.
I've found it useful to use this technique (use of simulated, removable, media) to
move user project files and data between simulated systems.

There was a suggestion that your SD card might be nearing end of life. It is hard to
tell. SD card failures are not always obvious. The one SD card that failed for me exhibits
no issues at all, not until you shutdown then restart the Pi. When the Pi comes up
I find that the entire Linux file system reverted to the previous power-up state.
Any files that had been added are gone, any files deleted have reappeared, and any
changes to files are undone.

- ng

andy

unread,
Jul 7, 2022, 10:11:13 PM7/7/22
to [PiDP-11]
Lots of great advice above. Just to add my $0.02

1. Good PSU is vital. Buy a branded unit (5.1V, why ever not) with say 2.5 or 3A
2. Accept that SD cards are flaky.  And even if you buy many of the same size (ex 32GB) they are never quite identical. I found some good success making backups using "rpi-clone" - making a couple of backups periodically is the best approach IMHO


have fun!

Andy

sydn...@gmail.com

unread,
Jul 9, 2022, 9:09:22 AM7/9/22
to [PiDP-11]
After twice losing my entire system to a flaky SD card, in 2020 I upgraded to a cheap SSD with a USB to SATA connection. I have no SD card in my Pi now--it boots right to the SSD.  There are many of these adapters on Amazon, but I can vouch for this one as working perfectly with the Pi:  https://www.amazon.com/gp/product/B0716JKJ68  I've never had a single problem since. I used rpi-clone to make the SSD a bootable copy of the SD card. 

Tim Radde

unread,
Jul 9, 2022, 11:47:58 AM7/9/22
to sydn...@gmail.com, [PiDP-11]
And yet your SSD still has the limited number or read/writes.  It will eventually fail too.  I have never seen an SSD fail.  Great, now my
next use of an SSD will fail for sure.  :)

--
You received this message because you are subscribed to a topic in the Google Groups "[PiDP-11]" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pidp-11/gcOLuHeA0so/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/c98babe7-915d-4cac-8bc9-f98438f38e1cn%40googlegroups.com.

Heinz-Bernd Eggenstein

unread,
Jul 9, 2022, 11:53:33 AM7/9/22
to [PiDP-11]
If you don't want to go all the way to eliminate the SD card by relacing it with a SSD or HD, you can prolong the lifetime of SD cards in a Raspi somwhat by redirecting small writes to (system) log files to a RAM disk, see this article https://mcuoneclipse.com/2019/04/01/log2ram-extending-sd-card-lifetime-for-raspberry-pi-lorawan-gateway/
The log files will still eventually get updated on the SD card, but by combining many smaller transactions to one bigger write, the wear of the SD card is reduced.

This is especially true if you are using the Pi for additional duties besides SIMH like, for example, PIhole as a DNS based ad-blocker, etc.

Cheers
HB

Warner Losh

unread,
Jul 9, 2022, 12:01:24 PM7/9/22
to Tim Radde, sydn...@gmail.com, [PiDP-11]


On Sat, Jul 9, 2022, 9:47 AM Tim Radde <timr...@gmail.com> wrote:
And yet your SSD still has the limited number or read/writes.  It will eventually fail too.  I have never seen an SSD fail.  Great, now my
next use of an SSD will fail for sure.  :)

SATA SSDs tend to be 10x or 100x better life than cheap SD cards. Nvme tends to be better. Most drives today can handle being mostly rewritten every day for 3-5 years..

So same idea, but difference in degree

Warner 

You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/CABTODK_9Nq%3DwnLMV5Yj3qXCPOgqmf0mvb2%2B260pu56_9ox9vJw%40mail.gmail.com.

anton.la...@gmail.com

unread,
Jul 9, 2022, 12:16:08 PM7/9/22
to [PiDP-11]
> I have never seen an SSD fail

Oh, they do fail!  Maybe not as catastrophic as HDDs sometimes -- you still can pull some data out of a failing SSD -- yet they can just brick, too.
Seen a few myself.  But their health can be monitored in S.M.A.R.T. (unlike SDs), and they can sustain (as been pointed out already) a lot more
I/O (write) cycles than SDs.  So the failure (or the lifetime end) is usually not as "unexpected".

Tim Radde

unread,
Jul 9, 2022, 1:00:29 PM7/9/22
to anton.la...@gmail.com, [PiDP-11]
I am curious as to how you converted it over to an SSD?  I run a Rasp Pi for OctoPrint and also have PiHole on there too.
Now I am thinking I should convert over.  I have some SSDs already from a former machine that I didn't need them on.
So I have all the cables necessary.  Did you just image the SD card to the SSD?  And then fix it up to boot from 
the SSD?  Maybe there is something already on YT to show how this is done.  Thanks.

Heinz-Bernd Eggenstein

unread,
Jul 10, 2022, 7:42:37 AM7/10/22
to [PiDP-11]
Indeed, there are tons of How-Tos on Youtube and the Internet in general about this, e.g. https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb . The caveat is that you have to pay attention to the specific Raspi model  and raspi OS version. The bootloader-mechanism on Raspi hard- and software changed a lot over the years , for the Raspberry Pi 4 it is now finally very easy and convenient: you can tell the Raspi to boot straight from an attached USB 3 device (HDD, SDD, M.2 SSD via USB adapter....whatever), so the SD-card slot can actually remain totally empty! On older Pis, your options vary, but even for older Raspis it should always be possible to start booting from a SD-card (basically read-only) and then mount a SSD/HDD and continue running from there.  This also came up in the PiDP-8 list: https://groups.google.com/g/pidp-8/c/5dgD774dY6Q/m/OKku9vKRBgAJ

Cheers
HB

sydn...@gmail.com

unread,
Jul 10, 2022, 9:36:52 AM7/10/22
to [PiDP-11]
USB booting to a SSD worked fine for me originally on a Pi 3b which I swapped out later for a Pi 4 (a seamless swap on the PiDP-11).  I used https://github.com/billw2/rpi-clone to clone the bootable SD card to a bootable SSD. I do recall I had to upgrade the firmware of the 3b via sudo rpi-update before it would boot from USB. Good luck!
Reply all
Reply to author
Forward
0 new messages