Ubuntu Jaunty 9.04 Network Install
This is a guide how to network install Ubuntu 9.04 (Jaunty) on the plug. The network installer (original Debian installer) supports SD cards and USB stick / drives but still does not support installation on the local NAND inside the plug (since it uses MTD stack).
Contents |
Kernel and initrd setup
Kernel
You need to build a kernel with initial ramdisk support. To do that, in the kernel configuration (with 'make menuconfig') and check
'Device Drivers' --> 'Block devices --> 'RAM block device support' 'General Setup' --> 'Initial RAM filesystem and RAM disk (initramfs/initrd) support'
Note that this has been done using the Marvell git kernel; but the same should apply on all different kernels.
Initial Ramdisk
You can use this File:Ubuntu.initrd file as the ubuntu initrd file.
The file is generates by downloading the Versatile ARM board initrd, downloadable from - initrd.gz
and then create an initrd image suitable for U-Boot by running the command -
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initrd.gz -d initrd.gz Ubuntu.initrd
Starting the installer (using TFTP)
- Place the new uImage (kernel) and Ubuntu.initrd images into a host PC TFTP server directory
- Power on the plug and stop U-Boot on the count down. Then run the following commands -
tftpboot 0x00200000 uImage tftpboot 0x01100000 Ubuntu.initrd setenv bootargs console=ttyS0,115200
In this stage you should have the new uImage at address 2MB in the DDR and Ubuntu.initrd at address 17MB. Run the kernel with the initrd -
bootm 0x00200000 0x01100000
And the installer should start.
Starting the installer (using USB stick)
- Place the new uImage (kernel) and Ubuntu.initrd images on a FAT16 formatted USB stick
- Power on the plug and stop U-Boot on the count down. Then run the following commands -
usb start fatload usb 0:1 0x00200000 uImage fatload usb 0:1 0x01100000 Ubuntu.initrd setenv bootargs console=ttyS0,115200
In this stage you should have the new uImage at address 2MB in the DDR and Ubuntu.initrd at address 17MB. Run the kernel with the initrd -
bootm 0x00200000 0x01100000
And the installer should start.
NOTE that u-boot on the plug support FAT16 mode (and not FAT32); which means you must format it in FAT mode if you are using a Windows box.
Running the actual installer
You will mostly hit enter on most items, but will be asked on the following -
- Lack of kernel module - choose to continue without those
- Questions on md kernel module - continue installation without those. If you need LVM and RAID stack then rebuild the kernel with those modules.
- At the end of the base installation, you will be asked that there is no kernel to install - click continue on that too.
At the end of the installation the installer will reboot, so stop the u-boot count down back again and jump to the next section.
Serial console fixup
OK. You are here; which means you have Ubuntu basically installed.
But, there is a small tweak needs to be done; the installer doesn't provide a serial terminal login on the serial port by default. So you must manually add this.
On U-Boot, boot the newly just installed Ubuntu image but with bypassing the usual Ubuntu initialization (provide 'init=/bin/bash' to the command line).
I installed on a SDHC card, so my U-Boot env variable will like the following -
Marvell>> printenv bootargs_root bootargs_root=root=/dev/mmcblk0p1 init=/bin/bash
On installation on USB stick / disk, it would look like -
bootargs_root=root=/dev/sda1 rootdelay=10 init=/bin/bash
The rootdelay=10 is important only for USB stick since it instructs the kernel to wait 10 seconds before mounting the rootfs, which is enough time for the disk to spin-up and USB stack to discover it. Now boot the kernel with the 'init=/bin/bash' in the bootargs_root env variable, and you should get bash shell. Edit a new file /etc/event.d/ttyS0
vi /etc/event.d/ttyS0
Cut and paste the following to it -
# ttyS0 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc2 start on stopped rc3 start on stopped rc4 start on stopped rc5 stop on runlevel 0 stop on runlevel 1 stop on runlevel 6 respawn exec /sbin/getty 115200 ttyS0
This will open a console login on /dev/ttyS0, which is the serial console of the plug. Now reboot the plug and remove the 'init=/bin/bash' from the 'bootargs_root' env variable -
Marvell>> printenv bootargs_root bootargs_root=root=/dev/mmcblk0p1