Ubuntu HPPA Port Installation

Buildd | Archive

How to install Ubuntu HPPA?

This might be the first question one asks, since we don't yet have a working installer. That said, the port is alive and well, and can be run standalone on any HPPA machine (provided the machine is supported by the kernel, see this useful list).

To achieve a somehow "clean" installation, the install procedure uses an intermediary step by bootstraping the system from an existing Debian setup.

Assuming you're lucky enough to have two disks in your machine, what you want to do is:

  • Install Debian on disk B (preferably the one in the alternate boot path, this will spare you the pain of reconfiguring the PDC settings).
  • Boot Debian from disk B.
  • Format disk A to fit your needs.
  • Debootstrap Ubuntu on disk A (procedure follows).
  • Reboot into Ubuntu.

If you have only one disk, the general idea remains the same, except that:

  • When installing Debian, you want to format your disk considering how you want to use it in Ubuntu, and dedicating a "non-system" partition (eg, the future /home) to install the Debian system on it.
  • You will need to take special care when setting up the Ubuntu kernel (this will be explained).

Last but not least, please mind that the following is NOT a newbie howto, it expects the user to already have a strong knowledge in dealing with PA-RISC/Linux. Further explanations about the PA-RISC/Linux boot process can be found on the PA-RISC/Linux Boot HOWTO.

The installation procedure

Once you have Debian quickly installed (all you need is network support, really. Base system is enough) on your system, it is time to get nasty and bootstrap Ubuntu from that.

Step 1, format the target HD (if you haven't already done that). A typical format scheme is: (given as "mountpoint - type - size"):

  • /boot - F0 - 100MB
  • swap - 82 - whatever you need
  • / - 83 - remaining free space

Feel free to bend that to your particular needs, but make sure to keep /boot (type F0) within the first 2GB of the HD.

Format all but the first (/boot) partitions.

Step 2, grab the tools:

  • You will need Ubuntu's version of debootstrap.
  • As well as this modified hoary debootstrap script.
  • Install debootstrap (dpkg -i, and it needs binutils to work).

All the following operations happen as root.

Step 3, prepare the new filesystem:

  • Create a directory (ubuntu-fs in the following), in which you will mount the Ubuntu filesystem (that is, the root partition you have prepared to store the Ubuntu OS on Step 1).
  • Mount the target root device in that directory.
  • Once target root is mounted, don't forget to create as many subdirectories as you have sub-mountpoints in your target file system (except for ubuntu-fs/boot, we will deal with it later).
  • Mount your target sub-partitions (again, except the /boot one).

Step 4, debootstrap the new system:

  • Run "debootstrap hoary ubuntu-fs/ http://people.ubuntu.com/~lamont/ubuntu-hppa/tree hoary", assuming you have the above mentioned hoary debootstrap script in the current working directory.
  • Depending on your Internet bandwidth, you might consider getting some coffee at that point ;)
  • If everything goes fine, you should see the following line at the end of the process:
    I: Base system installed successfully.

Step 5, preconfigure the new system:

  • Edit ubuntu-fs/etc/fstab to match what will be the new system's filesystem.
  • If you are installing over serial line and will boot the new system as such, edit ubuntu-fs/etc/inittab to enable serial tty.
  • Edit ubuntu-fs/network/interfaces so that network will be properly configured upon reboot.
  • Edit ubuntu-fs/etc/apt/sources.list to look like:
    deb http://archive.slashdirt.org/ubuntu hoary main restricted universe
    deb-src http://archive.ubuntu.com/ubuntu hoary main restricted universe

Step 6, install a kernel:

  • Mount the proc filesystem in the chroot: "mount -o bind /proc ubuntu-fs/proc"
  • Run "unset LANG LANGUAGE"
  • Chroot into the Ubuntu filesystem: "chroot ubuntu-fs"
  • Run "apt-get update" (do NOT dist-upgrade at that point).
  • Run "apt-get install palo"
  • If you don't have multiple disks, mount your boot partition within the chroot, perform the kernel package installation step, configure palo.conf as needed, run palo and skip the remaining steps.
  • Edit /etc/palo.conf to contain something like:
    --update-partitioned=<target root disk> --format-as=3 --commandline=<bootdevN>/vmlinux root=/dev/<rootdevice> initrd=<bootdevN>/initrd.img
    Assuming /boot is /dev/sda1 and / is /dev/sda3, this would be:
    --update-partitioned=/dev/sda --format-as=3 --commandline=1/vmlinux root=/dev/sda3 initrd=1/initrd.img
  • Run "palo --format-as=3 --init-partitioned=<target root disk>" where <target root disk> is /dev/sda for instance. This will format the palo partition as ext3 for use as /boot.
  • Mount /boot: "mount /boot".
  • Run "apt-get install linux-image-<flavour>" where <flavour> is one of hppa32, hppa32-smp, hppa64, hppa64-smp. Answer "No" to the question asking you whether you want to install a boot block, and thus leave palo unconfigured at that point.
  • Create symlinks:
    cd /boot; ln -s vmlinux-<whatever> vmlinux; ln -s initrd.img-<whatever> initrd.img
  • If you need very specific kernel modules, add them to /etc/modules.

At that point you're almost done!

Step 7, reboot and finish configuration:

  • Unchroot yourself, unmount ubuntu-fs/proc, ubuntu-fs/boot, any other sub mounpoints you created, and finally ubuntu-fs itself.
  • Reboot the machine.
  • If you haven't installed on the primary disk, it's time to setup PDC to boot on the right one.
  • Once the system is booted, login as root (no password yet), and run base-config.
  • Don't let it touch sources.list (use "edit sources.list by hand"), let aptitude fail, quit it and run "apt-get dist-upgrade" by hand.
  • Add your new user to the sudoers with "visudo".
  • Setup a root password, or lock the account (as it should be) using "usermod -L root", and you're done!

Step 8, extra features:

  • You could help us gaining visibility by reconfiguring popularity-contest to send statistics: "dpkg-reconfigure popularity-contest" and answer "Yes".