SheepShaver on Windows via coLinux

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Trombone Bob

SheepShaver on Windows via coLinux

Post by Trombone Bob »

I have compiled SheepShaver for Windows via coLinux here is the way to do it

Programs Needed:
coLinux-0.6.0.exe : http://sourceforge.net/project/showfile ... p_id=98788; http://www.colinux.org/?section=home
Rean VNC: http://www.realvnc.com/download.html
WinSCP: http://winscp.sourceforge.net/eng/
WinRAR:http://www.rarlab.com/download.htm

Distrobution for coLinux: http://sourceforge.net/project/showfile ... p_id=98788
choose gentoo-i586-ext3-2g-deluxe.bz2 (the top one)

Swap for coLinux: http://gniarf.nerim.net/colinux/swap
Choose swap_512Mb.bz2

Run coLinux setup, Make shure the account you use has administrator rights.
Set the install directory to c:\colinux; leave all the boxex checked; if prompted click continue anyway

Install WinRAR: all the defaluts work

Extract gentoo file and swap files using WinRAR and put them in the c:\colinux directory

open the c:\colinux directory

edit the xml file defalt.colinux (right click and choose edit)
if you have followed direction up to this point this is the configuration for the xml file

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
<block_device index="0" path="\DosDevices\c:\colinux\gentoo-i586-ext3-2g-deluxe" enabled="true">
</block_device>
<block_device index="1" path="\DosDevices\c:\colinux\swap_512Mb" enabled="true">
</block_device>
<block_device index="2" path="\DosDevices\e:" enabled="true">
</block_device>
<bootparams>root=/dev/cobd0</bootparams>
<image path="vmlinux"></image>
<memory size="64"></memory>
<network index="0" type="tap" name="TAP"</network>
</colinux>

change the line <block_device index="2" path="\DosDevices\e:" enabled="true"> to <block_device index="2" path="\DosDevices\x:" enabled="true"> where x is the letter of your cdrom drive

If you have lots of RAM (>256) you can change the <memory size="64"></memory> to a larger amount but I would just leave it alone.

Create a shortcut to colinux-daemon.exe and change the target to C:\coLinux\colinux-daemon.exe -t nt

At this point you should have a working coLinux install.

In Windows go to network connection you should see your all your existing connections PLUS one new one with the TAP-Win32 adapter.
On the connection that has access to the internet right click and click properties, click the tab advanced and check the boxes for internet connection sharing (there are two boxes click both)
This sets up Internet connection sharing which allows colinux access to the internet.

run colinux from the shortcut

after some time you will reach a login prompt.
username is "root"; there is no password; password is blank

Now we must configure gentoo to work corectly

To enable swap file type "swapon /dev/cobd1" enter
Type "emerge sync"
Go for a drive
execute "nano -w /etc/fstab" remove the "#" from the line that starts"#/dev/swap" and change swap to cobd1; remove the"#" from the line that starts "#/dev/cdoms/cdrom0" and change it to /dev/cobd2 and hit tab; "ctrl o" "enter" "ctrl x"
you should be at "colinux root#"
close colinux

Now to get the X working

In windows execute the file vnc-3.3.7-x86_win32.exe this will install WinVNC. All the defaluts work and do a full install.

In coLinux "emerge tightvnc" you will be prompted to enter a password this can be anything but for this walkthrough its "gentoo"
in colinux "nano -w vim /root/.vnc/xstartup" change the last line by removing the "twm &" and typing "startxfce4" "ctrl o" "enter" "ctrl x"
Check your IP addres by typing ifconfig in coLinux. Now add the hostname (should be colinux) to /etc/hosts along with the session's IP address. In coLinux "nano -w /etc/hosts" add line 192.168.0.x (x being your real IP) then tab and type colinux.
In colinux "vncserver -geometry 1024x768 -depth 16" The geometry value can be change to reflect your screen resoloution, like if you had 800x600 resoloution it would be "-geometry 800x600"
In Windows run VNC viewer. The ip is the one you used in the host file with a :1 after it
You now have X on colinux
in colinux vncserver -kill :1
in colinux "emerge cvs"
emerge gnome-libs
*****
Jackalo's "Unofficial SheepShaver Building Guide"

*****

Situate yourself in a directory from your flavor of Linux that you want to hold the SheepShaver files. In my case, I used "cd /home/jackalo". After that, you need to establish a connection with Gwenole's CVS server. The following commands will provide a login and then a clean download of the files that you need. You do need to type them out fully, as I have yet to figure out how to set the CVSROOT variable.

cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs login
(asks for password) anoncvs

cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs checkout BasiliskII
cvs -d :pserver:anoncvs@down.physik.uni-mainz.de:/cvs checkout SheepShaver

Next, you need to browse to the SheepShaver directory and run the Makefile there to create links to the BasiliskII source files required to build SheepShaver. Use the following commands to do that.

cd SheepShaver
make links

After that finishes, you now need to browse into the src/Unix directory, and then execute autogen.sh to create the necessary makefile dependant upon your system. Use the following commands for that.

cd src/Unix
./autogen.sh

After that finishes, it'll tell you to type "make". Well, do what the doctor orders.

in colinux "export WANT_AUTOCONF=2.5" ; "export WANT_AUTOMAKE=1.7 "
in colinux change directory to cd /home/bob/SheepShaver/src/kpx_cpu; then execute the following: "wget http://gwenole.beauchesne.free.fr/sheep ... _opts.diff"; "patch -p0 < x86_fpu_opts.diff"
cd /home/bob/SheepShaver/src/Unix
make
in coLinux: vncserver -geometry 1024x768 -depth 16
In Windows run VNC viewer. The ip is the one you used in the host file with a :1 after it
in the console window run ./SheepShaver and tada
Trombone Bob

forgot step

Post by Trombone Bob »

before running the command "nano -w nano -w vim /root/.vnc/xstartup" in the get x working section run "vncserver" this generates the file you will edit
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

8O

Where I download "SheepShaver for Windows" Bob? :D I is Linux illiterate. :oops:

Looks like a lot of possible snags (and a few hours work) getting colinux setup and SheepShaver compiled.
mike

Post by mike »

thanks for the tut bob i cant believe a thing like colinux exists. i love gentoo and being able to run it under windows r0x0rs!!
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

You need to compile the entire sheepshaver after you get colinux to work. You can not just download it. I am trying to make a place that I can upload my colinux file but its over 250mb when compressed. Also make shure that when you build SheepShaver you patch the correct part of the code the directory is /SheepShaver/src/kpx_cpu
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

Here is my first ScreenShot of SheepShaver in coLinux
Thyth

Post by Thyth »

So, essentially you are using a version of linux that runs concurrently with Windows to run SheepShaver?
ijelorriaga

Interesting

Post by ijelorriaga »

Does it compiles with an .exe extension as CYGWIN compl¡iled apps, if it´s so, Is there anyway to separate Sheepshaver from CoLinux and leav it just win Xlib and the other libraries.... :?:
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

No SheepShaver is still a linux app and will need to be run under colinux. Colinux works on top of windows (sorta like VMware) but with out the speed loss of a true emulation. SheepShaver is able to take full advantges of the CPU unlike running it in VMware or Vitural PC. Colinux is Cooperative Linux and gives the user a true linux enviroment not like SFU or cygwin. When you run colinux you are running linux. Hope that helps
k

wow

Post by k »

thnx for your instructions!

they were thorough, and I have colinux up and running now!

great stuff, everyone should write howtos like you!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

SheepShaver on Colinux

Post by Cat_7 »

Hello Tbone Bob,

I've got SheepShaver compiled under colinux. Thanks,

Some remarks on the walkthrough, however,
-Could you mention the etc-update sequences required after emerge sync and the installation of gnome libs and vnc?
-The xstartup file was not found when I executed the nano -w command. I had to go into the .vnc directory and load the file from within nano.

I have had no luck running sheepshaver yet, although I have a correct rom file and the cd at hand.

SheepShaver just crashes on me after showing a black window. Maybe it has something to do with the cd-rom setting in colinux. I will investigate that issue.

Also, fyi, in the latest cvs download I have to select at least two screen modes to get sheepshaver running (in linux) But maybe that's just a local (my) problem.

Best wishes

Cat_7
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

Should the swap file use

<swap_device index="1" path="\DosDevices\d:\colinux\swap_512Mb" enabled="true">
</swap_device>

Instead of <block_device>
?

Should an extra > be added to this line

<network index="0" type="tap" name="TAP"</network>
to make it
<network index="0" type="tap" name="TAP"></network>
?

I got the colinux program up and running once, but screwed it up somehow.

The Tap-Win32 Adapter is showing the following problem (attached). Nothing I have tried has fixed it.
Last edited by Mac Emu on Thu Apr 29, 2004 3:43 pm, edited 1 time in total.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

default config errors

Post by Cat_7 »

Hello Mac Emu,

I think the config is correct as far as the swap device is concerned, but you are right about the extra "hook" in the network section.
My Frontpage complains about malformed xml

Also, I have noticed some strange behaviour when copying and pasting between the colinux window and a file in windows: sometimes a character is missed or replaced with some other. Strange

Best

Cat_7
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

Thanx Cat_7.

If you reinstall coLinux and open the xml page using notepad, you will see hard line breaks (squares)
in the file which FrontPage will strip out (at least FP 2003 does).

Do you see the same "Network cable unplugged" message in the Network Connections windows as I
show in the image attached above?

I managed to figure out what was wrong to get to the login for the first time a minute ago, but the Tap-Win32
still isn't working.
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

OK. I see that it becomes "plugged in" when coLinux is running (as "Bob" told me on another forum).

But during the bootup of Gentoo, it gives me a "Failed to bring eth0 up". Is there some file I need to edit to point to another eth device?
k

disk

Post by k »

like he said macemu:

Check your IP addres by typing ifconfig in coLinux. Now add the hostname (should be colinux) to /etc/hosts along with the session's IP address. In coLinux "nano -w /etc/hosts" add line 192.168.0.x (x being your real IP) then tab and type colinux.


ok....

is there any way to make the 2gig gentoo disk bigger? i try to emerge mozilla on top of everything and run out of space...
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

More ScreenShots

Post by Trombone Bob »

I finaly got my mac rom working and here are more screen shots
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

One more...
Mac Emu
Forum All-Star
Posts: 1208
Joined: Mon May 20, 2002 11:50 am
Location: Ouraion

Post by Mac Emu »

k,

The tutorial above only briefly covers setting things up with networking. It
assumes you pretty much know what you are doing and doesn't go into
explicit (tedious) details and possible snags. Not that I'm complaining as
this forum exists to help people out of good will.

Under coLinux using ifconfig I get

colinux root # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

Under Windows using ipconfig /all I get

Ethernet adapter Local Area Connection 5:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : TAP-Win32 Adapter
Physical Address. . . . . . . . . : 00-FF-3C-2B-04-65
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Autoconfiguration IP Address. . . : 169.254.12.51
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :

My LAN uses
192.168.1.1xx
255.255.255.0

and my router uses 192.168.1.1

So what should be my "real IP" in the hosts file?

127.0.0.1 colinux
192.168.1.101 colinux

Thanks
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

If internet connection sharing is sucessfuly set up then the ip of colinux should be 192.168.0.x because internet connection sharing sets up a small DHCP server to the computers that connect with it and assigns an ip in this range. This is a tutorial for seting up networking on coLinux

Setup coLinux networking on Microsoft Windows
Network support can be achieved for coLinux in two ways:

NAT network (Network Address Translation)
Native/Bridged network
The better way to connect is by a native/bridged connection to the network since NAT-traversal hinders some protocols and makes it difficult to run services on coLinux accessable by the network. However, if your network-provider supports only 1 IP-address, running coLinux with NAT is a way to prevent the setup of a masquerading router/gateway.

( Note: If you're a home user on a dial-up, DSL, or cable modem connection, you should use NAT configuration (unless you have a network connection-sharing device). "Bridged" means your coLinux virtual machine on the "inside" will share the same IP address space as your "outside" connection. Unless you have explicit permission from your ISP for two simultaneous connections to their backbone and have everything configured properly, this won't work.)

If you want to obtain an IP-address by DHCP make sure a dhcp-client is installed in advance in your Linux distribution. For Debian:

apt-get install pump
NAT (Network Address Translation)

Install TAP-Win32

Window2000:

Control Panel -> Add/Remove Hardware -> Add/Troubleshoot
Device -> Add a new device -> No -> Network Adapters -> Have Disk -> Go to
the supplied TAP-Win32 directory and choose OemWin2k -> Next -> Next ->
Finish...
WindowXP:

Control Panel -> Add Hardware -> Yes -> Add a new hardware device ->
Install from a list (Advanced) -> Network Adapters -> Have Disk -> Go to
the supplied TAP-Win32 directory and choose OemWin2k -> Next -> Next ->
Finish...
Enable Connection sharing

Window2000:

Control Panel -> Network and Dial-UP Connections -> Select the network adapter
for sharing -> Properties -> Tab Sharing -> Enable Internet Connection Sharing->
Fill in name of the Home network (the TAP-Win32 Adapter) -> TAP-Win32 Adapter -> OK
There must be at least two active connections on Window2000 before ICS can be enabled. If the NIC and TAP-Win32 are the only network adapters on the machine, coLinux will have to be started so that the "cable is connected" to the TAP-Win32 adapter, making it active. Then, ICS may be enabled on the NIC. Also, unless there are more than two adapters on the machine, there will be no place to enter the name of the Home network. Window2000 will assume that TAP-Win32 should be used.

WindowXP:

Control Panel -> Network Connections -> Select the network adapter for sharing ->
Properties -> Tab Advanced -> Allow other network users... -> Fill in name of the
Home networking connection (the TAP-Win32 Adapter) -> TAP-Win32 Adapter -> OK
Also, make sure that you have enabled and started the "DHCP Client" service in the "Services" applet and have configured the TAP-Win32 Adaptor to obtain IP address dynamically (i.e. DHCP) in its TCP/IP settings.

Boot coLinux and create the network settings within Linux. (Note: The Gentoo image uses DHCP out of the box. )To change this to a static IP configuration, edit the /etc/resolv.conf and /etc/conf.d/net files. For the latter, comment out the line:

#iface_eth0="dhcp"
uncomment the line:

gateway="eth0/192.168.0.1"
and uncomment and edit the other iface_eth0 line to read:

iface_eth0="192.168.0.40 broadcast 192.168.0.255 netmask 255.255.255.0"
Also, under Debian you can autoconfigure the loopback interface by using the line:

auto lo eth0
in the file /etc/network/interfaces)


--------------------------------------------------------------------------------

Native network (Bridged)

If you use Windows XP there is two ways you could do this, you could use the method below, or you could use the native bridged network support in WinXP (more about this below)

(Note: WinPCAP does not work for wireless network connections.)

Install WinPCAP, the Free Packet Capture Architecture for Windows. Download and install WinPCAP 3.1 from: http://winpcap.polito.it/ The install automagically detects your operating system and installs the correct WinPCAP-driver. Follow instructions during install.
Make settings to the coLinux config file <default.colinux.xml> in the coLinux folder

Add: <network index="0" name="XXXX" type="bridged"></network>

"XXXX" is a substring of your network adapter's name. To get the substring of your network adapter:

Windows2000: <div> Control Panel -> Network and Dial-Up connections -> select the network interface that will be used for network-access -> Properties -> Copy adapter name from: "Connect Using:"

<i> on my machine (windows 2000 pl it's wrong). The name of the card can be found in colinux-daemon log in line: "bridged-net-daemon: Checking adapter: NDIS 5.0 driver bridged-net-daemon: Checking adapter: TAP VPN Adapter. bridged-net-daemon: No matching adapter Error initializing winPCap" the correct name is "NDIS 5.0 driver" and not "Karta Realtek RTL8139(A) PCI Fast Ethernet Adapter". I tried it with winpcap v 3.0 and 3.1beta. Currently works well with 3.1 beta

</i>

WindowsXP:

Control Panel -> Network connections -> select the network interface that will be used
for network-access -> Properties -> Copy adapter name from: "Connect Using:"
Example: <network index="0" name="Realtek RTL8139 Family PCI Fast Ethernet NIC" type="bridged"></network>

Optional attributes: mac="XX:XX:XX:XX:XX:XX" - specifies the MAC address of the interface in the Linux side. Recommended on bridged networking setups, where more than one Windows machine will be running coLinux on the same subnet. Make sure the mac-address is different from the mac of your regular network interface.

Boot coLinux and create the network settings within Linux.
Setup is ready, reboot coLinux

Once again hope this helps
k

help trombone

Post by k »

hey, any idea how to increase the size of the disk image??

mine is almost full...
User avatar
Trombone Bob
Tinkerer
Posts: 83
Joined: Mon Apr 26, 2004 3:32 pm
Location: Utah, USA

Post by Trombone Bob »

Here is an artical for expanding the root partition http://www.colinux.org/wiki/index.php/ExpandingRoot

Have fun
Ahhg

Post by Ahhg »

Ahh!! VNC Viewer keeps saying "Failed to connect" Can you explain in more detail on the netwok part >_<.
Ahhg

Post by Ahhg »

Now when I rebooted, it just hangs on "bringing up eth0..."
Ahhg

I got It!!!

Post by Ahhg »

Yay! I got it working and built!!!

Heres a screenie!
Post Reply