Hi!
As a follow up to one of my previous posts which explained how to install Debian/68k on an Amiga [1], I have created a small howto which explains how to install and run Debian/68k in an emulator, in this case ARAnyM (an Atari emulator) which is one of the most popular 68k emulators, mainly because of the maturity of its code base and its feature-completeness, it fully emulates an 68040 CPU with MMU and therefore fully supports Linux as a guest operating system.
Here's the fuel guide which assumes the host operating system is a current version of Debian/Ubuntu or compatible distributions. On other Linux distributions, your mileage may vary.
The guide currently requires to build "parted" from source as it requires some recent changes I pushed to parted upstream to support Atari partition tables. Once these changes have been merged upstream (i.e. in the project's official source code), building parted from source will no longer be necessary.
Installing Debian/68k in ARAnyM
========================
1. Install required packages on the host machine (as root)
# apt install aranym parted debootstrap git
# apt build-dep parted
2. Create a new folder for ARAnym
$ mkdir debian-68k
$ cd debian-68k
3. Run ARAnyM with the GUI and do the initial setup
$ aranym --gui
4. In ARAnym, first create a new disk image
* Click "Disks"
* Click "Path:"
* In the "Choose a file" dialog, type an image filename after "File:", for example "debian-68k.img", then click "OK"
* In the field "Disk Size:", enter the desired disk image size in Megabytes
* Click "Generate Disk Image"
* Write down the Geometry data, that is the value for Cylinders, Heads and Sectors per track
* Tick the option "Present"
* Click "Apply"
* Click "Shutdown" to close ARAnym
5. Build a patched version of parted from source
$ git clone
https://github.com/glaubitz/parted.git $ cd parted
$ ./bootstrap
$ ./configure --disable-gcc-warnings
$ make
6. Run parted to create partitions in the newly created disk images (as root)
# /path/to/parted-git/parted/parted debian-68k.img
* Type "mklabel atari" to create an empty partition table
* Type "u", then "b" to switch the units to bytes
* Create an ext3 partition with "mkpart":
- Type "primary" for the type
- Type "ext3" for the filesystem
- Type "0" for the start
- Type a number dividable by 1024 for the end, e.g. type "21474836480" for a 20 GiB partition
* Create a swap partition with "mkpart"
- Type "primary" for the type
- Type "linux-swap" for the filesystem
- Type the end block of the first partiion as start, e.g. "21474836480"
- Type a number dividable by 1024 for the end, then add this value to the start value e.g. type "25769803776" for a 4 GiB swap partition after the first partition
* Exit parted by typing "quit"
7. Create a new loop-back device on the host from the disk image file (as root)
# losetup /dev/loop0 debian-68k.img
* The two partitions should now show up as:
- /dev/loop0p1
- /dev/loop0p2
* Create a new ext4 filesystem on the primary partition
# mkfs.ext4 /dev/loop0p1
8. Mount the disk image and install a minimal Debian/m68k base system into it (as root)
# mount /dev/loop0 /mnt
# debootstrap --arch=m68k --foreign --no-check-gpg --include=apt,nano unstable /mnt
http://ftp.de.debian.org/debian-ports # umount /mnt
9. Configure ARAnyM to boot the image
* Create a new text file for the ARAnyM configuration
$ $EDITOR debian-68k.cfg
* Use the values for Cylinders, Sectors and Heads from step 4.
[IDE0]
Present = Yes
IsCDROM = No
ByteSwap = Yes
ReadOnly = No
Path = debian-68k2.img
Cylinders = 1058
Heads = 16
SectorsPerTrack = 63
ModelName = Master
10. Configure ARAnyM for Linux
[GLOBAL]
FastRAM = 768
Floppy =
BootstrapArgs =
BootDrive =
GMTime = No
[LILO]
Kernel = vmlinuz-3.16.0-4-m68k
Args = root=/dev/nfhd8p1 init=/bin/bash rw devtmpfs.mount=1 video=atafb:vga16
Ramdisk = initrd.img-3.16.0-4-m68k
LoadToFastRam = No
11. Download kernel and initrd
$ wget
https://people.debian.org/~glaubitz/chroots/kernels/initrd.img-3.16.0-4-m68k $
https://people.debian.org/~glaubitz/chroots/kernels/vmlinuz-3.16.0-4-m68k12. Boot ARAnyM
$ aranym-mmu -c debian-68k.cfg -l
13. Once ARAnyM has booted up, run the second stage of debootstrap
# /debootstrap/debootstrap --second-stage
* This takes quite some time, especially the unpacking of the base system
14. Set a root password and a hostname
# passwd (type new password, twice)
# echo "aranym-host" > /etc/hostname
15. Shutdown ARAnym
# sync
* Close the ARAnyM window to kill the emulator
16. Boot the system normally
$ $EDITOR debian-68k.cfg
* Remove the line "init=/bin/bash" from the "Args" line
* Save the file and exit editor
$ aranym-mmu -c debian-68k.cfg -l
========================
Cheers,
Adrian
> [1]
http://www.amiga.org/forums/showthread.php?t=65146