Differences between revisions 23 and 24
Revision 23 as of 2012-08-22 19:26:34
Size: 9810
Editor: GeoffSimmons
Comment: Add DefaultTemplate header, add CategoryPermalink.
Revision 24 as of 2012-12-27 20:56:40
Size: 9813
Comment: update info about the location
Deletions are marked like this. Additions are marked like this.
Line 22: Line 22:
 * [[https://www.freewrt.org/~tg/f/Ara2012D.txz|IPv4 box in Cologne, Germany]] at !HostEurope ([[https://www.freewrt.org/~tg/f/Ara2012D.sig|PGP signature]]), SSL  * [[https://www.freewrt.org/~tg/f/Ara2012D.txz|IPv4/IPv6 box in St. Wendel, Germany]] at Manitu ([[https://www.freewrt.org/~tg/f/Ara2012D.sig|PGP signature]]), SSL

Translation(s): none

Aranym is a virtual Atari machine which is useful for M68k Porting. This is a one page installation intended to get Debian/m68k sid running quickly. The disk image is fairly minimal, but can be extended easily.

Contact: <debian-68k@lists.debian.org>

Download Files

Download the April 2012 base image tarball from one of the following locations:

The following instructions are for this (April 2012) image. Follow the Aranym/Quick.bak instructions for the older image.

  • Check the signature: gpg Ara2012D.sig and tell it Ara2012D.txz is the name of the file to check

  • Extract the tarball: xz -dc Ara2012D.txz | tar -xvf -

  • Change into the target directory: cd Ara2012D

  • Look at the README.txt file ☺

  • Uncompress the hard disc image (this will create a 12 GiB sparse file with about 300 MiB used): xz -d disk.ima.xz

The hard disc image

… contains an ext4fs at offset 1 sector (512 octets), which – according to atari-fdisk – ends at block (sector) 23069088. The rest is swap. It’s fairly big, but in theory, shrinking it and then transferring it to a disc to be used in an Amiga, mac68k or other Debian/m68k system should be possible.

The packages contained therein stem from a debootstrap with --variant=minbase plus a few others, such as a sensible shell (mksh) and editor (ed and jupp) and Desktop Environment (mc), but several others from the default set (and any development tools) are missing. Use dselect to add them from a list. The /etc/apt/apt.conf file is set up to not install Recommends automatically. Also, see the README.txt file included with the image.

  • ed: exit with Q (uppercase) + Enter

  • jupp: help with Ctrl-J, exit with Ctrl-K + q

  • mcedit: exit with Esc + 0

All packages, except one, are standard Debian packages. If you want to keep things strictly Debian, purge wtf-debian-keyring and remove all nōn-Debian/Debian-Ports entries from /etc/apt/sources.list.

Install Aranym

aranym recommends bridge-utils, ipmasq and uml-utilities. ipmasq may cause you networking grief if you aren't aware.

sudo apt-get --purge install aranym

Configure Networking

Make sure tun is available and setup correctly.

The disk image is setup for point-to-point networking. On your host add the following to /etc/network/interfaces:

auto tap4
iface tap4 inet static
        tunctl_user tglase
        up iptables -t nat -A POSTROUTING -s -j MASQUERADE
        up echo 1 > /proc/sys/net/ipv4/ip_forward
        down iptables -t nat -D POSTROUTING -s -j MASQUERADE

This assumes tap4 is a free tun interface on your system, and tglase is your username (so you can access it as nōn-root). Now start up the interface with: sudo ifup tap4

If you use more than one ARAnyM instance, you will need separate tap interfaces for each instance, which needs changing in three places: aranym.cfg (both Tunnel – to the tap interface used – and Mac – to keep unique), /etc/network/interfaces and, in the guest, also /etc/network/interfaces – do make sure that the address and pointopoint of host and guest are swapped, and that the up and down commands on the host match the guest’s IP.

You will also need to configure the guest if you have only one instance, but the IP range is already in use by you.

Start Aranym

aranym is an SDL application, so you need X11 or something like Aranym/Headless. The configuration file specifies the amount of RAM ARAnyM gets (see FastRAM). It’s currently set at 768 MiB, adjust to taste. ARAnyM will happily drive a single cpu core on the host to 100%, but usually isn’t that demanding.

# avoid it hogging the sound card
# run ARAnyM on CPU core #0 (only)
taskset 0x01 aranym-mmu -l -c aranym.cfg

Read the taskset manual page for details. Basically, use 0x01 shifted left by the number of the CPU core (starting with 0) you want it to use. (Or just skip taskset and run aranym-mmu directly.)

When doing this over VNC, do be sure to not move the mouse until the login prompt arrives and you have typed a letter, otherwise the keyboard will not be usable.

First Steps

See the README.txt file included, too.

  • Log in with user root, password root.

  • Change the root password: passwd root

  • Set the hostname.
  • Type a bit, to generate entropy, or get some from the network, for example using one of these (unfortunately, you need to add --no-check-certificate as ca-certificates is not installed yet):

    • wget -O - --no-check-certificate https://www.fourmilab.ch/cgi-bin/Hotbits?nbytes=64\&fmt=bin | dd of=/dev/urandom

    • wget -O - --no-check-certificate https://www.random.org/cgi-bin/randbyte?nbytes=64\&format=f | dd of=/dev/urandom

    • wget -O - --no-check-certificate https://call.mirbsd.org/lb.cgi?from=m68k,host=$(hostname),seed=$RANDOM$(dd if=/dev/urandom bs=8 count=1 2>/dev/null | hexdump -ve '1/1 "%02X"') | dd of=/dev/urandom

  • Run dpkg -a --configure (so popularity-contest gets set up, which needs entropy to generate a unique host ID)

  • Optionally, adjust /etc/apt/sources.list (possibly run dpkg --purge wtf-debian-keyring)

  • Run dselect update (or apt-get update)

  • Optionally, run dselect to interactively add standard packages

  • Install other packages, e.g: apt-get install openssh-server sendmail – installing openssh-server also requires entropy, so the above steps are definitely not overkill…

  • Maybe set up a user with sudo access rights? (Install adduser and sudo, run adduser --help, add the user to the sudo group, etc.)

To compile packages, the best would be to install cowbuilder and set it up, similarily to what was described in M68k/Cowbuilder:

  • apt-get install adduser cowbuilder debootstrap eatmydata

  • addgroup --system --gid 1234 pbuilder

  • adduser --system --no-create-home --uid 1234 --gecos pbuilder --disabled-login pbuilder

  • Change /etc/pbuilderrc

  • Either download a base.cow or make your own (needs wtf-debian-keyring still installed): cowbuilder --create --mirror http://www.freewrt.org/~tg/debs68k/ --distribution sid --debootstrapopts --variant=buildd --debootstrapopts --include=wtf-debian-keyring,debian-ports-archive-keyring,eatmydata,fakeroot --debootstrapopts --keyring=/usr/share/keyrings/wtf-debian-keyring.gpg

  • Go to /var/cache/pbuilder/base.cow and configure a number of files, as described in M68k/Cowbuilder:

    • etc/apt/sources.list should contain only two or three lines:

      • official Debian packages: deb http://ftp.debian-ports.org/debian unstable main

      • official Debian-Ports m68k packages: deb http://ftp.debian-ports.org/debian unreleased main

      • optionally: deb http://www.freewrt.org/~tg/debs68k/ sid main

      • if you have your own APT staging repo for packages you built, add it there as well, naturally
    • etc/apt/apt.conf and etc/apt/preferences

    • touch CurrentlyBuilding

    • add the man-db stuff to var/cache/debconf/config.dat

  • Run eatmydata cowbuilder --update once, so the chroot is in a sane state

  • Enjoy!

You can also just install the build-essential package and begin compiling in your main system. Or set up a buildd…

Closing Remarks

ThorstenGlaser made this image due to the pressure of several requests for one, while being ill. It has not been tested much, contains way too few packages for its size (looking back, at least the base packages should all have been included, considering how big it ended up anyway due to mc and locales-all and stuff), and the First Steps could probably have been made into a shell script. But, there you are. Better than nothing. It’s at least a working image, cleanly made according to latest Debian sid standards (instead of upgrading old etch-m68k images more and more) and with space to compile lots of things.