Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Hollywood MAL AMIStore App Store A600 Memory

AuthorTopic: [Howto] Installing a current release of Debian/68k in an emulator  (Read 349 times)

0 Members and 1 Guest are viewing this topic.

Offline adrian82

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-m68k

12. 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
« Last Edit: October 17, 2016, 11:26:15 PM by adrian82 »
- Amiga 1200 w/ Blizzard 1220/4 - ACA-1230/56MHz/64MB, OS3.9 + Debian unstable, Squirrel SCSI + CD-Writer and 160GB HDD
- Amiga 2000 ECS with A2090 and Genlock, OS 3.1
- Amiga 2000 with Blizzard 68060/128 MiB FastRAM
- Amiga 4000 Tower with Blizzard 68060/128 MiB FastRAM
- 2x Amiga 4000 with unknown accelerators
- 4x Amiga 500, Protar A500HD 2MB, C= A590 2MB, OS3.1
- Amiga 600 Standard + A601, OS3.1
- several 68k Macs
- Atari ST Mega
- 68k VME lab computer with 68030
 

Offline adrian82

Re: [Howto] Installing a current release of Debian/68k in an emulator
« Reply #1 on: December 26, 2016, 11:24:25 PM »
Update:

The latest version of the 'parted' package in Debian and Ubuntu (3.2-17) now contains support for Atari partition tables. It is therefore no longer necessary to build 'parted' from sources yourself.
- Amiga 1200 w/ Blizzard 1220/4 - ACA-1230/56MHz/64MB, OS3.9 + Debian unstable, Squirrel SCSI + CD-Writer and 160GB HDD
- Amiga 2000 ECS with A2090 and Genlock, OS 3.1
- Amiga 2000 with Blizzard 68060/128 MiB FastRAM
- Amiga 4000 Tower with Blizzard 68060/128 MiB FastRAM
- 2x Amiga 4000 with unknown accelerators
- 4x Amiga 500, Protar A500HD 2MB, C= A590 2MB, OS3.1
- Amiga 600 Standard + A601, OS3.1
- several 68k Macs
- Atari ST Mega
- 68k VME lab computer with 68030
 

Offline kolla

Re: [Howto] Installing a current release of Debian/68k in an emulator
« Reply #2 on: December 27, 2016, 10:48:13 AM »
Nice! Do you know if parted supports Amiga RDB as well?
I've been using atari-fdisk and amiga-fdisk (and mac-fdisk) for partitioning (https://github.com/kowoba/portage-m68k/tree/master/sys-fs)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM460 and Mac minis with MorphOS
 

Offline adrian82

Re: [Howto] Installing a current release of Debian/68k in an emulator
« Reply #3 on: December 27, 2016, 12:08:50 PM »
Quote from: kolla;818247
Nice! Do you know if parted supports Amiga RDB as well?


Yes, it does.

Quote
I've been using atari-fdisk and amiga-fdisk (and mac-fdisk) for partitioning (https://github.com/kowoba/portage-m68k/tree/master/sys-fs)


Which should no longer be necessary :). As my patch for parted was also merged upstream [1], you can also use it on other operating systems running parted.

Adrian

> [1] http://git.savannah.gnu.org/cgit/parted.git/commit/?id=9c266205416ec956d6205c828211480de3767d02
- Amiga 1200 w/ Blizzard 1220/4 - ACA-1230/56MHz/64MB, OS3.9 + Debian unstable, Squirrel SCSI + CD-Writer and 160GB HDD
- Amiga 2000 ECS with A2090 and Genlock, OS 3.1
- Amiga 2000 with Blizzard 68060/128 MiB FastRAM
- Amiga 4000 Tower with Blizzard 68060/128 MiB FastRAM
- 2x Amiga 4000 with unknown accelerators
- 4x Amiga 500, Protar A500HD 2MB, C= A590 2MB, OS3.1
- Amiga 600 Standard + A601, OS3.1
- several 68k Macs
- Atari ST Mega
- 68k VME lab computer with 68030
 

Offline kolla

Re: [Howto] Installing a current release of Debian/68k in an emulator
« Reply #4 on: December 27, 2016, 05:15:44 PM »
That's great! Thanks for info, and the work :)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM460 and Mac minis with MorphOS
 

Offline Rotzloeffel

Re: [Howto] Installing a current release of Debian/68k in an emulator
« Reply #5 on: December 28, 2016, 12:07:41 PM »
What I am wondering about..... why not install debian on real hardware ?
Is there no possibility to install debian sarge 3.1 and distupgrade to your current version ?

I am using debian sarge PPC on a real A4000 and A1200. I would be very happy if there is a way, to install your work on real hardware instead of changing harddisks from amiga to pc an vice-versa....

BTW: starting the actual kernel requires 2 MB chipmem on Amiga... there is no way to load the Kernel on my A2000/060....:(
Save Planet Earth! It is the only one in the galaxy with fresh and cold beer :laughing: