On 11/20/15 1:22 PM, Anders Magnusson wrote:
Den 2015-11-20 kl. 20:12, skrev Will Senn:
On 11/20/15 10:51 AM, Anders Magnusson wrote:
Den 2015-11-20 kl. 17:35, skrev Will Senn:
Hi,
I have searched and searched and have not found a satisfactory
answer to this question:
How can I efficiently copy files from my host system to unix
version 6 running in the pdp11 emulator and from unix 6 to my host
system?
I usually do this by just tar'ing to/from a disk file, something like:
on pdp11: tar cf /dev/rxp0c myfiles
on host: tar xf simh-disk-file
Works both ways :-)
-- Ragge
Hi,
This sounded promising, but as it turns out there appear to be 2
problems... 1. v6 doesn't have tar, and 2. it looks like v6 doesn't
have rx device support (floppies). Are you using v6 with tweaks, or
v7, or some other variant of unix?
Hm, it was some time ago, but I think it was tar. Otherwise try cpio?
You do not have to use floppies. rxp is the raw device for rp disks
(avoids caching). Just work against that file.
-- Ragge
Thanks. I combined a number or responses and came up with the following...
--------
--From Unix v6 on PDP 11/40 SimH to Host:
--------
create and attach an additional rk device:
simh> attach rk3 rk3
co
get a file of interest and note it's size in bytes:
# ls -l /etc/rc
-rw-rw-r-- 1 bin 90 Oct 10 12:32 /etc/rc
look at the od dump of the file for comparison later:
# od -c /etc/rc
0000000 r m - f / e t c / m t a b \n
0000020 / e t c / u p d a t e \n / e t c
0000040 / m o u n t / d e v / r k 1
0000060 / u s r / s o u r c e \n / e t c
0000100 / m o u n t / d e v / r k 2
0000120 / u s r / d o c \n \n
0000132
write the file to the rk device (the sync may not be needed, but the
result looks cleaner, also it doesn't apper that you can specify bs=1,
device errors out):
# dd if=/etc/rc of=/dev/rrk03 conv=sync
0+1 records in
1+0 records out
exit the sim and then on the host, read from the rk image using bs=1 and
count from the ls output:
$ dd if=rk3 of=rc bs=1 count=90
90+0 records in
90+0 records out
$ od -c rc
0000000 r m - f / e t c / m t a b \n
0000020 / e t c / u p d a t e \n / e t c
0000040 / m o u n t / d e v / r k 1
0000060 / u s r / s o u r c e \n / e t c
0000100 / m o u n t / d e v / r k 2
0000120 / u s r / d o c \n \n
0000132
This looks perfect, but I'm skeptical.
--------
-- From Host to Unix v6 on PDP 11/40 SimH Host:
--------
make a minor edit to the rc file (change m to n in the word mtab) and
note it's size in bytes:
$ ls -l rc
-rw-r--r-- 1 wsenn staff 90 Nov 20 16:15 rc
it better be 90, unless I did something other than changing a letter
$ dd if=rc of=rk3 conv=sync
0+1 records in
1+0 records out
512 bytes transferred in 0.000037 secs (13854733 bytes/sec)
note the count of blocks
with the number of blocks on hand, fire up the simulation
# dd if=/dev/rrk3 of=rc.dd count=1
because of the fact that I can't specify bs=1, the result is padded:
od -c rc.dd
0000000 r m - f / e t c / n t a b \n
0000020 / e t c / u p d a t e \n / e t c
0000040 / m o u n t / d e v / r k 1
0000060 / u s r / s o u r c e \n / e t c
0000100 / m o u n t / d e v / r k 2
0000120 / u s r / d o c \n \n \0 \0 \0 \0 \0 \0
0001000
so, I read from the dd file with the number of bytes still in hand:
dd if=rc.dd of=rc bs=1 count=90
90+0 records in
90+0 records out
then diff the file against the original:
diff rc /etc/rc
1c1
* rm -f /etc/ntab
---
. rm -f /etc/mtab
Woohoo and whew! A lot of work, but file transfer in both directions.
Does this approach seem sound to you or do you see some refinements that
are possible/necessary?
Thanks,
Will
_______________________________________________
Simh mailing list
Simh@trailing-edge.com
http://mailman.trailing-edge.com/mailman/listinfo/simh