<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Libiehua</id>
		<title>Computer History Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Libiehua"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/wiki/Special:Contributions/Libiehua"/>
		<updated>2026-05-07T20:49:23Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9646</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9646"/>
				<updated>2011-02-07T00:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* rebuild the df command */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700        ; mov #172526,R0&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040        ; mov R0,-(R0)&lt;br /&gt;
d cpu 100006 012740        ; mov #60003,-(R0)&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777        ; br 100012&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt; /etc/rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# chdir /usr/source/s1&lt;br /&gt;
# ed df.c&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cc df.c&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9645</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9645"/>
				<updated>2011-02-07T00:34:25Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* configure boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700        ; mov #172526,R0&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040        ; mov R0,-(R0)&lt;br /&gt;
d cpu 100006 012740        ; mov #60003,-(R0)&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777        ; br 100012&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt; /etc/rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1/df.c&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9573</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9573"/>
				<updated>2011-02-06T10:54:51Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* Tape boot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700        ; mov #172526,R0&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040        ; mov R0,-(R0)&lt;br /&gt;
d cpu 100006 012740        ; mov #60003,-(R0)&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777        ; br 100012&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt;rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1/df.c&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9512</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9512"/>
				<updated>2011-02-06T01:12:51Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* rebuild the df command */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040&lt;br /&gt;
d cpu 100006 012740&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt;rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1/df.c&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9480</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9480"/>
				<updated>2011-02-05T07:15:43Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* enable multiser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040&lt;br /&gt;
d cpu 100006 012740&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt;rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9479</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9479"/>
				<updated>2011-02-05T07:15:20Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: /* enable multiser */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040&lt;br /&gt;
d cpu 100006 012740&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt;rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	<entry>
		<id>https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9472</id>
		<title>Installing UNIX v6 (PDP-11) on SIMH</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=Installing_UNIX_v6_(PDP-11)_on_SIMH&amp;diff=9472"/>
				<updated>2011-02-05T03:39:19Z</updated>
		
		<summary type="html">&lt;p&gt;Libiehua: use ed editor to simplify this job&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I'm going to try to describe the install procedure used by [http://mailman.trailing-edge.com/pipermail/simh/2010-October/006009.html Tim Newsham] for Unix v6 on the [[PDP-11/40]].&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
I'm going to expect you to have the [[SIMH]] emulator, 3.8-1 or higher, and a Unix v6 tape [http://sourceforge.net/projects/bsd42/files/Install%20tapes/Research%20Unix/Unix-v6-Ken-Wellsch.tap.bz2/download Unix-v6-Ken-Wellsch.tap]&lt;br /&gt;
&lt;br /&gt;
== Tape boot ==&lt;br /&gt;
Here we load the bootblock and load up the root partition onto the rk disk file...&lt;br /&gt;
&lt;br /&gt;
First the tboot.ini file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
d cpu 100000 012700&lt;br /&gt;
d cpu 100002 172526&lt;br /&gt;
d cpu 100004 010040&lt;br /&gt;
d cpu 100006 012740&lt;br /&gt;
d cpu 100010 060003&lt;br /&gt;
d cpu 100012 000777&lt;br /&gt;
g 100000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is run, the simulation will 'lock', hit CTRL+E to break the emulation, and then execute the stand alone program to prepare the hard disk.  Type in:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the stand alone program will be ready to respond.  Here is my install session:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
RK: creating new file&lt;br /&gt;
sim&amp;gt; d cpu 100000 012700&lt;br /&gt;
sim&amp;gt; d cpu 100002 172526&lt;br /&gt;
sim&amp;gt; d cpu 100004 010040&lt;br /&gt;
sim&amp;gt; d cpu 100006 012740&lt;br /&gt;
sim&amp;gt; d cpu 100010 060003&lt;br /&gt;
sim&amp;gt; d cpu 100012 000777&lt;br /&gt;
sim&amp;gt; g 100000&lt;br /&gt;
&lt;br /&gt;
Simulation stopped, PC: 100012 (BR 100012)&lt;br /&gt;
sim&amp;gt; g 0&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
0&lt;br /&gt;
tape offset&lt;br /&gt;
100&lt;br /&gt;
count&lt;br /&gt;
1&lt;br /&gt;
=tmrk&lt;br /&gt;
disk offset&lt;br /&gt;
1&lt;br /&gt;
tape offset&lt;br /&gt;
101&lt;br /&gt;
count&lt;br /&gt;
3999&lt;br /&gt;
=&lt;br /&gt;
Simulation stopped, PC: 137300 (BGE 137274)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== disk install ==&lt;br /&gt;
&lt;br /&gt;
Here is our dboot.ini for booting from the hard disk:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach tm0 dist.tap&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
dep system sr 173030&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Booting up to single user mode ===&lt;br /&gt;
And this will boot us up to the bootloader, to which we just tell it to load the 'unix' kernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
sim&amp;gt; set cpu 11/40&lt;br /&gt;
Disabling XQ&lt;br /&gt;
sim&amp;gt; set tto 7b&lt;br /&gt;
sim&amp;gt; set tm0 locked&lt;br /&gt;
sim&amp;gt; attach tm0 dist.tap&lt;br /&gt;
sim&amp;gt; attach rk0 rk0&lt;br /&gt;
sim&amp;gt; attach rk1 rk1&lt;br /&gt;
sim&amp;gt; attach rk2 rk2&lt;br /&gt;
sim&amp;gt; dep system sr 173030&lt;br /&gt;
sim&amp;gt; boot rk0&lt;br /&gt;
@rkunix&lt;br /&gt;
mem = 1030&lt;br /&gt;
RESTRICTED RIGHTS&lt;br /&gt;
&lt;br /&gt;
Use, duplication or disclosure is subject to&lt;br /&gt;
restrictions stated in Contract with Western&lt;br /&gt;
Electric Company, Inc.&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fixing the Terminal ===&lt;br /&gt;
The first thing we are going to do with UNIX loaded is set the terminal back to lowercase...  Enter the following command in lower case, it'll echo back in upper case, but that's just the way it works.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# STTY -LCASE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Rebuilding the kernel ===&lt;br /&gt;
We are going to rebuild the kernel to support the appropriate hardware that SIMH provides.  First we must build the mkconf program&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chdir /usr/sys/conf&lt;br /&gt;
cc mkconf.c&lt;br /&gt;
mv a.out mkconf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the mkconf program built, we then feed it a basic configuration file.  To do this we just run mkconf, then type in the list of devices we want.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And you'll get this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ./mkconf&lt;br /&gt;
rk&lt;br /&gt;
tm&lt;br /&gt;
tc&lt;br /&gt;
8dc&lt;br /&gt;
lp&lt;br /&gt;
done&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we can compile the config, and link in the rest of the kernel, and copy it to the root.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
as m40.s&lt;br /&gt;
mv a.out m40.o&lt;br /&gt;
cc -c c.c&lt;br /&gt;
as l.s&lt;br /&gt;
ld -x a.out m40.o c.o ../lib1 ../lib2&lt;br /&gt;
mv a.out /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to verify, our kernel should be 30kb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ls -l /unix&lt;br /&gt;
-rwxrwxrwx  1 root    30346 Oct 10 12:43 /unix&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== building device files ===&lt;br /&gt;
Now we'll build the device files.  Just copy &amp;amp; paste this in.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mknod /dev/rk0 b 0 0&lt;br /&gt;
/etc/mknod /dev/rk1 b 0 1&lt;br /&gt;
/etc/mknod /dev/rk2 b 0 2&lt;br /&gt;
/etc/mknod /dev/mt0 b 3 0&lt;br /&gt;
/etc/mknod /dev/tap0 b 4 0&lt;br /&gt;
/etc/mknod /dev/rrk0 c 9 0&lt;br /&gt;
/etc/mknod /dev/rrk1 c 9 1&lt;br /&gt;
/etc/mknod /dev/rrk2 c 9 2&lt;br /&gt;
/etc/mknod /dev/rmt0 c 12 0&lt;br /&gt;
/etc/mknod /dev/lp0 c 2 0&lt;br /&gt;
/etc/mknod /dev/tty0 c 3 0&lt;br /&gt;
/etc/mknod /dev/tty1 c 3 1&lt;br /&gt;
/etc/mknod /dev/tty2 c 3 2&lt;br /&gt;
/etc/mknod /dev/tty3 c 3 3&lt;br /&gt;
/etc/mknod /dev/tty4 c 3 4&lt;br /&gt;
/etc/mknod /dev/tty5 c 3 5&lt;br /&gt;
/etc/mknod /dev/tty6 c 3 6&lt;br /&gt;
/etc/mknod /dev/tty7 c 3 7&lt;br /&gt;
chmod 640 /dev/*rk*&lt;br /&gt;
chmod 640 /dev/*mt*&lt;br /&gt;
chmod 640 /dev/*tap*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Restoring the rest of the OS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100&lt;br /&gt;
mkdir /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:SIMH Tutorials]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== configure boot ===&lt;br /&gt;
&lt;br /&gt;
I just use cat to append the boot statements for the other disks.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And I append them like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat &amp;gt;&amp;gt;rc&lt;br /&gt;
/etc/mount /dev/rk1 /usr/source&lt;br /&gt;
/etc/mount /dev/rk2 /usr/doc&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then hit CTRL+D&lt;br /&gt;
&lt;br /&gt;
=== rebuild the df command ===&lt;br /&gt;
To config the df:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# ed /usr/source/s1&lt;br /&gt;
/rp0/d&lt;br /&gt;
.-2a&lt;br /&gt;
  &amp;quot;/dev/rk0&amp;quot;,&lt;br /&gt;
  &amp;quot;/dev/rk1&amp;quot;,&lt;br /&gt;
.&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
# cp a.out &amp;gt; /bin/df&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== check filesystems ===&lt;br /&gt;
fsck didn't exist back then... So we run icheck/dcheck.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
icheck /dev/rrk0&lt;br /&gt;
dcheck /dev/rrk0&lt;br /&gt;
icheck /dev/rrk1&lt;br /&gt;
dcheck /dev/rrk1&lt;br /&gt;
icheck /dev/rrk2&lt;br /&gt;
dcheck /dev/rrk2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== enable multiser ===&lt;br /&gt;
The default /etc/ttys file isn't listening on the serial ports, so we change that by simply editing the file.... &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ed /etc/ttys&lt;br /&gt;
1,8s/^0/1/p&lt;br /&gt;
w&lt;br /&gt;
q&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== reboot ===&lt;br /&gt;
There is no reboot command so run sync a few times, then Control+E to interrupt and quit the simulator.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
# sync&lt;br /&gt;
#&lt;br /&gt;
Simulation stopped, PC: 002502 (MOV (SP)+,177776)&lt;br /&gt;
sim&amp;gt; q&lt;br /&gt;
Goodbye&lt;br /&gt;
&lt;br /&gt;
C:\temp\v6\myv6&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running normally ==&lt;br /&gt;
With the install all done, let's use the following ini file for normal operations.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set cpu 11/40&lt;br /&gt;
set cpu idle&lt;br /&gt;
set tto 7b&lt;br /&gt;
set tm0 locked&lt;br /&gt;
attach rk0 rk0&lt;br /&gt;
attach rk1 rk1&lt;br /&gt;
attach rk2 rk2&lt;br /&gt;
attach lpt printer.txt&lt;br /&gt;
set dci en&lt;br /&gt;
set dci lines=8&lt;br /&gt;
set dco 7b&lt;br /&gt;
att dci 5555&lt;br /&gt;
boot rk0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When we fire up the emulator we can then attach on tcp port 5555 for additional users.  To boot unix, just pass the name unix to the bootloader.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PDP-11 simulator V3.8-1&lt;br /&gt;
Disabling XQ&lt;br /&gt;
Listening on port 5555 (socket 108)&lt;br /&gt;
@unix&lt;br /&gt;
&lt;br /&gt;
login: root&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's also worth noting that there is no root password.&lt;/div&gt;</summary>
		<author><name>Libiehua</name></author>	</entry>

	</feed>