Installation of Debian on Sam440 (and dual booting AmigaOS 4.x)

Loading an operating system on a Uboot supported hardware

Before starting you need to understand how an operating system is loaded with Uboot.
  1. Uboot loads a bootloader which is located on disk (CD-ROM or harddisk).
  2. This bootloader will then examine the bootable partitions on your disk.
  3. On these partitions, it will find a configuration file in which you defined which operating systems are available on your disk.
  4. Depending on the configuration file, the bootloader will show you the list of bootable operating systems. Then you choose which OS you want to boot.
  5. The bootloader loads the selected operating system.
More synthetically here is what happens: Uboot => Bootloader => Bootable partitions => Configuration file => Operating system

There are 2 available bootloaders: SLB, released by Hyperion on the OS4 CD, and Parthenope written by Giuseppe Coviello and made available on ACube Systems website.
Both bootloaders can read the AmigaOS configuration file, SYS:Kickstart/Kicklayout, and a configuration file on the Linux side, /boot/a1boot.conf (for SLB) or /menu.lst for Parthenope. So they both allow to boot either AmigaOS or Linux.

These two bootloaders need to read a partition to find the configuration file so you should use partitions formated with a supported filesystem. This is where these two bootloaders differ: Note: On the OS4.1 Update 1 CD, you'll find SLB 1.19 that allows Sam440 to also boot a Linux system. I explain here how to boot both systems using Parthenope.


First of all be sure you have at least the following:

Note on partitioning

In the configuration file you will create, you need to declare which partition of your hard disk is the one with your Linux installation. As Linux uses partition numbers you need to be sure you don't change the position of your Linux partition on your disk. For instance, if your system is stored on the 2nd partition of your hard disk, you'll define in the configuration file that you want to boot on partition "sda2". If later, you create/delete a partition before this second partition of your disk, the number will change. So you'll need to change the configuration file to reflect the change of the partition number.

As an example, here is the layout of my harddisk.
harddisk layout example
As you can see, I created the Linux partition near the beginning of the disk. So even if I create/delete some partitions in the free space area, the partition name doesn't change for Linux.

    Booting the Debian CD

  1. On ACube Systems website, download the Debian installation ISO and burn it on a CD-ROM (CD-R is prefered).
    Note: this is a netinstall CD, so you'll need an internet connection to fully install the OS.
  2. Start up your Sam440ep. You need to enter the Uboot prompt. From there you'll tell Uboot to boot from the CD.
  3. After a few seconds, you'll see a screen with title "Parthenope (ub2lb) version 0.01".

    Installing Debian

  4. Sam440 should now boot your CDROM and you should reach the Debian installation.
    Debian installation first window
  5. You are asked "Continue the install without loading kernel modules?"
  6. Connect the ethernet cable on the ethernet port at the rear of Sam (use the one at the far end).
  7. Continue partitioning?
  8. Creating partitions:
  9. The installer says "Installing the base system". It will last for a few minutes.
  10. When it asks "Continue without installing a kernel?"
  11. The installation asks to type a root password.
  12. Create a new user (it's one without root rights).
  13. Select your location so that Debian can show you the Debian mirrors. It needs to download all files for the installation now.
  14. Select a mirror and then a proxy if you need one on your network.
  15. When the installation asks to "Participate in the package usage survey".
  16. Choose which kind of usage you want in your system "Desktop environment, Web server....".
  17. The installation warns about an "IP multicast-enabled kernel".
  18. The installation will now download and install a lot of packages. Please wait while loading and decrunching ;-)
    During the installation, you'll have a few questions to answer. As I'm not a Linux expert I just give you what I answered.
  19. On the window titled "Configuring libpam0g", I just pressed enter.
  20. There's another warning about "IP multicast-enabled kernel".
  21. On message "no boot loader installed"

    Creating the configuration file

    At the end of the installation, the CD tray is ejected. Remove the CD-ROM but do not reboot immediately. The configuration file needs to be modified.
  22. Type Alt-F2 on the keyboard and press Enter to activate a new console.
  23. Type nano /target/menu.lst and do:
    1. Delete the line "root ide 0:x"
    2. At the end of the line "kernel /boot/uImage root=/dev/sdaX", add "console=tty0"
      Note: X here depends on the position of the Linux partition on your disk.
    3. Press Ctrl-X
    4. Type y
    5. Press "Enter".
    Here is an example of menu.lst:
    delay 5
    default 0

    title Debian
    kernel /boot/uImage root=/dev/sda2 console=tty0

    Note: This file menu.lst must be in the / directory of your Linux partition. This is in /target during the installation.

  24. Return to the installation.
  25. Press "Continue". This will reboot the Sam and Debian should be loaded from disk now.
If you don't need AmigaOS 4, you're done. Linux will always boot using Parthenope.

Upgrading the Parthenope bootloader to boot AmigaOS too

  1. Download the last Parthenope from ACube website, from the Sam440 page.
  2. Boot the OS4 CD.
  3. Using Media Toolbox, install Parthenope on your harddisk as you did with SLB (just select the Parthenope file). Also, set the boot priority of your Linux partition to -127. This will prevent AmigaOS to try to boot it. Save the changes.
Remember that Parthenope only handles partitions formated in FFS0 or SFS0. So you need to store your Kickstart directory on a partition in one of these formats.

Note that if you don't want to change the format of your SYS: partition, you are not forced to. You can create a very small partition (a few megabytes) somewhere on the harddisk. Be sure to format it in FFS0 or SFS0. Make it bootable and give it a boot priority of -127 so that you are sure AmigaOS will not start from this partition. Now copy only your kickstart directory on the partition.
Parthenope will find it on the disk and extract the boot configurations from the Kicklayout file.

As an example, here is what Parthenope displays on my system:
Parthenope screenshot

Uprading the Debian installation

When Debian is just installed, it probably needs updating to the last version. To do so, you need to edit your /etc/apt/sources.list file. Remove the installation CDROM from there and add the sources in your country. As an example here is my sources.list:
deb lenny main
deb-src lenny main

deb lenny/updates main
deb-src lenny/updates main
Then type in a shell (being root): apt-get update
and then type apt-get upgrade
This will download and install all the latest versions of the already installed programs.

Note on Xwindow setup

  1. Edit the file /etc/X11/xorg.conf to change your keyboard layout at line "Option XkbLayout".
  2. If you use a DVI or HDMI (i.e. digital) output, you should comment out a line in the xorg configuration file, or the X server won't start. To do so, edit the file /etc/X11/xorg.conf and comment out this line:
    Option "ConnectorTable" "64,2,1,2,60,1,1,1"

    Note: You must NOT comment out this line if you use a monitor thought the DVI->VGA adapter (analog output).

Thanks to New Gen Informatique for his several tests.