Differences between revisions 1 and 38 (spanning 37 versions)
Revision 1 as of 2009-04-20 14:30:47
Size: 958
Editor: ?smarenka
Comment:
Revision 38 as of 2017-06-26 12:58:05
Size: 11147
Comment: add reference to #865928 workaround
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[Aranym]] is a virtual Atari machine which is useful for [[M68k/Porting|M68k Porting]]. This is a one page installation intended to get Debian/m68k sid running quickly. #language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~
----
[[Aranym]] is a virtual Atari machine which is useful for [[M68k/Porting|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.
Line 3: Line 6:
 * [[#download|Download Files]]
Line 4: Line 8:
 * [[#download|Download Files]]
Line 7: Line 10:
 * [[#afterboot|First Steps]]
 * [[M68k/Cowbuilder|Set up cowbuilder afterwards]]

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

<<Anchor(download)>>
== Download Files ==

[[https://people.debian.org/~tg/f/m68k/2015-Jan/Ara2015A-ARAnyM.tar.xz|Download the January 2015 base image tarball]].

The following instructions are for this (January 2015) image, but the April 2012 image is close enough. Follow the [[Aranym/Quick.bak]] instructions for the older image.

 * Check the signature and hashes in the [[https://people.debian.org/~tg/f/m68k/2015-Jan/README.txt|README]]
 * Extract the tarball: {{{tar xvf Ara2015A-ARAnyM.tar.xz}}}
 * Change into the target directory: {{{cd Ara2015A-ARAnyM}}}
 * Symlink a suitable kernel and initrd, for example those shipped in the tarball: {{{ln -s vmlinuz-3.16.0-4-m68k vmlinuz; ln -s initrd.img-3.16.0-4-m68k initrd.img}}}
 * Look at the `README.txt` file ☺
 * Uncompress the hard disk image (this will create a 16 GiB sparse file with about 370 MiB used): {{{xz -d disk.ima.xz}}}

=== Kernel configuration ===

For a post-4.1 kernel you may need (if your ARAnyM is not recent enough) to add {{{initcall_blacklist=atari_scsi_driver_init}}} to the kernel command line (section {{{[LILO]}}}, key {{{Args}}} in the ARAnyM configuration file) in order for the system to boot, see [[http://bugs.debian.org/865928|#865928]] for background information.

=== The hard disk image ===

… contains an ext4fs at offset 2048 sectors (1 MiB), which – according to DebianPkg:atari-fdisk – ends at block (sector) {tbd}. The rest is swap. It’s fairly big, but in theory, shrinking it and then transferring it to a disk to be used in an Amiga, mac68k or other Debian/m68k system should be possible. (But you don’t need that, [[https://wiki.debian.org/M68k/Installing#Pre-made_filesystems|we have images for that]].)

The packages contained therein stem from a DebianPkg:debootstrap with `--variant=minbase` plus a few others, such as a sensible shell (DebianPkg:mksh) and editor (DebianPkg:ed and DebianPkg:jupp) and Desktop Environment (DebianPkg:mc), but several others from the default set (and any development tools) are missing. Use DebianPkg: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`.
Line 9: Line 46:
= Install Aranym = == Install Aranym ==
Line 11: Line 48:
Aranym recommends [[http://packages.debian.org/bridge-utils|bridge-utils]], [[http://packages.debian.org/ipmasq|ipmasq]], and [[uml-utilities. [[http://packages.debian.org/ipmasq|ipmasq]] may cause you grief if you aren't careful. DebianPkg:aranym recommends DebianPkg:bridge-utils and DebianPkg:uml-utilities. The latter is required for networking, so we force its installation. Older versions also recommended DebianPkg:ipmasq which may cause you networking grief if you aren't aware, so don't install that.
Line 14: Line 51:
apt-get install aranym sudo apt-get --purge install aranym uml-utilities
Line 17: Line 54:
<<Anchor(network)>>
== Configure Networking ==
Line 18: Line 57:
<<Anchor(download)>>
= Download Files =
Make sure [[Aranym/Networking#tun|tun]] is available and setup correctly.
Line 21: Line 59:
 * Download the sparse [[http://people.debian.org/~smarenka/aranym/disk-sid.tar.7z|disk image]] (xxx MB).
 * Download the [[http://people.debian.org/~smarenka/aranym/aranym-sid.cfg|configuration file]].
The disk image is setup for [[Aranym/Networking#ptp|point-to-point]] networking. On your host add the following to `/etc/network/interfaces`:
Line 24: Line 61:
<<Anchor(network)>>
= Configure Networking =
{{{
auto tap4
iface tap4 inet static
        address 192.168.10.5
        pointopoint 192.168.10.6
        netmask 255.255.255.255
        tunctl_user tglase
        up iptables -t nat -A POSTROUTING -s 192.168.10.6 -j MASQUERADE
        up echo 1 > /proc/sys/net/ipv4/ip_forward
        down iptables -t nat -D POSTROUTING -s 192.168.10.6 -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}}}

To get tun/tap networking working, your user must also be in the `uml-net` group:

{{{
$ sudo adduser tglase uml-net
}}}

You might need to re-login or simply modify the permissions of /dev/net/tun if you don't care about security.

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 192.168.10.4/30 IP range is already in use by you.
Line 28: Line 88:
= Start Aranym = == Start Aranym ==

DebianPkg:aranym is an SDL application, so you need [[http://packages.debian.org/xorg|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.

I generally put this into a file {{{./run.sh}}} in the directory with the image.

{{{
#!/bin/sh
cd "$(dirname "$0")"
# avoid it hogging the sound card
SDL_AUDIODRIVER=dummy; export SDL_AUDIODRIVER
# 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 (i.e. `0x02` for the second CPU core, `0x04` for the third, etc). (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.
Actually, scrap that. Over VNC, the keyboard will normally not be usable. There is no serial port support on the Atari, and nfcon is only for output, so you will have to do the initial setup (hostname, root password, add some entropy, install sshd) on a local X11 session (X11 forwarding is even more unusable). Then you can run it headlessly and access it over SSH.

<<Anchor(afterboot)>>
== First Steps ==

See the `README.txt` file included, too.

 * Log in with user `root`, password `root`.
 * Set the hostname (as in `README.txt`).
 * 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 DebianPkg: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://www.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}}}
 * Change the root password (do this with a bit of entropy, for the md5crypt salt): {{{passwd root}}}
 * Modify the /etc/apt/source.list file (the one in the tar file does not work any longer):
  * echo "deb http://ftp.ports.debian.org/debian-ports/ unstable main" > /etc/apt/source.list
  * echo "deb http://ftp.ports.debian.org/debian-ports/ unreleased main" >> /etc/apt/source.list
 * Run {{{dpkg -a --configure}}} (so DebianPkg: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 DebianPkg:adduser and DebianPkg:sudo, run {{{adduser --help}}}, add the user to the sudo group, etc.)

To compile packages, the best would be to install DebianPkg: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 [[M68k/Cowbuilder#download|download]] a `base.cow` or make your own (needs `wtf-debian-keyring` still installed): {{{cowbuilder --create --mirror http://ftp.ports.debian.org/debian-ports/ --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.ports.debian.org/debian-ports/ unstable main}}}
   * official Debian-Ports m68k packages: {{{deb http://ftp.ports.debian.org/debian-ports/ unreleased 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 DebianPkg: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 DebianPkg:mc and DebianPkg: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.

----
## This page is referenced from http://www.debian.org/ports/m68k/
CategoryPermalink CategoryPorts

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 January 2015 base image tarball.

The following instructions are for this (January 2015) image, but the April 2012 image is close enough. Follow the Aranym/Quick.bak instructions for the older image.

  • Check the signature and hashes in the README

  • Extract the tarball: tar xvf Ara2015A-ARAnyM.tar.xz

  • Change into the target directory: cd Ara2015A-ARAnyM

  • Symlink a suitable kernel and initrd, for example those shipped in the tarball: ln -s vmlinuz-3.16.0-4-m68k vmlinuz; ln -s initrd.img-3.16.0-4-m68k initrd.img

  • Look at the README.txt file ☺

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

Kernel configuration

For a post-4.1 kernel you may need (if your ARAnyM is not recent enough) to add initcall_blacklist=atari_scsi_driver_init to the kernel command line (section [LILO], key Args in the ARAnyM configuration file) in order for the system to boot, see #865928 for background information.

The hard disk image

… contains an ext4fs at offset 2048 sectors (1 MiB), which – according to atari-fdisk – ends at block (sector) {tbd}. The rest is swap. It’s fairly big, but in theory, shrinking it and then transferring it to a disk to be used in an Amiga, mac68k or other Debian/m68k system should be possible. (But you don’t need that, we have images for that.)

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 and uml-utilities. The latter is required for networking, so we force its installation. Older versions also recommended ipmasq which may cause you networking grief if you aren't aware, so don't install that.

sudo apt-get --purge install aranym uml-utilities

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
        address 192.168.10.5
        pointopoint 192.168.10.6
        netmask 255.255.255.255
        tunctl_user tglase
        up iptables -t nat -A POSTROUTING -s 192.168.10.6 -j MASQUERADE
        up echo 1 > /proc/sys/net/ipv4/ip_forward
        down iptables -t nat -D POSTROUTING -s 192.168.10.6 -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

To get tun/tap networking working, your user must also be in the uml-net group:

$ sudo adduser tglase uml-net

You might need to re-login or simply modify the permissions of /dev/net/tun if you don't care about security.

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 192.168.10.4/30 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.

I generally put this into a file ./run.sh in the directory with the image.

cd "$(dirname "$0")"
# avoid it hogging the sound card
SDL_AUDIODRIVER=dummy; export SDL_AUDIODRIVER
# 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 (i.e. 0x02 for the second CPU core, 0x04 for the third, etc). (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. Actually, scrap that. Over VNC, the keyboard will normally not be usable. There is no serial port support on the Atari, and nfcon is only for output, so you will have to do the initial setup (hostname, root password, add some entropy, install sshd) on a local X11 session (X11 forwarding is even more unusable). Then you can run it headlessly and access it over SSH.

First Steps

See the README.txt file included, too.

  • Log in with user root, password root.

  • Set the hostname (as in README.txt).

  • 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://www.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

  • Change the root password (do this with a bit of entropy, for the md5crypt salt): passwd root

  • Modify the /etc/apt/source.list file (the one in the tar file does not work any longer):
  • 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://ftp.ports.debian.org/debian-ports/ --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.ports.debian.org/debian-ports/ unstable main

      • official Debian-Ports m68k packages: deb http://ftp.ports.debian.org/debian-ports/ unreleased 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.


CategoryPermalink CategoryPorts