Bug#728948: Detailed installation-instructions for Wheezy on Pogoplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sources:
Our Debian-installation started from Arch-Linux, which could be booted on the
Pogoplug-device already. This was installed following these instructions:
<link>
http://archlinuxarm.org/platforms/armv5/pogoplug-v2-pinkgray
</link>
Instructions to install Debian from scratch via SSH.
[u-boot-instructions are missing there for ARM-systems]
<link>
http://www.debian.org/releases/stable/armel/apds03.html.en
</link>
uboot installation made easy:
<link>
http://mehl.co/files/pogoplug-debian.sh
</link>
** Next follow the step-by-step instructions:
** Under Arch-Linux [everything is done as root] **
* Partition USB-Stick for Debian using fdisk:
<code>
fdisk -l /dev/sda
</code>
* This is our result:
<code>
Device Boot Start End Blocks Id System
/dev/sdb1 2048 14338047 7168000 83 Linux
/dev/sdb2 14338048 15368191 515072 5 Extended
/dev/sdb5 14340096 15368191 514048 82 Linux swap / Solaris
</code>
[The swap-space was put on a logical partition, a primary partition would also do here]
* format /dev/sdb1 as ext3 and disable automatic fsck.
* The swap-partition is also made and activated:
<code>
mkfs.ext3 /dev/sdb1
tune2fs -c 0 -i 0 /dev/sdb1
mkswap /dev/sdb5
swapon /dev/sdb5
</code>
* Prepare and mount a directory for the Debian-installation:
<code>
mkdir /mnt/debinst
mount /dev/sdb1 /mnt/debinst
</code>
* The Debootstrap-archive is extracted there:
<code>
/usr/sbin/debootstrap --arch ARCH wheezy /mnt/debinst http://ftp.us.debian.org/debian
</code>
[Alternatively the archive can be downloaded using wget.
Search online for ’debootstrap_1.0.26_dump.tar.gz’ or similar, download and extract to
'/mnt/debinst']
* mount /proc/ and chroot into the newly extracted debootstrap-system:
<code>
mount -t proc proc /mnt/debinst/proc
LANG=C.UTF-8 chroot /mnt/debinst /bin/bash
</code>
[From this point on packages can be installed using aptitude or apt-get]
* Devices are created:
<code>
apt-get install makedev
mount none /proc -t proc
cd /dev
MAKEDEV generic
</code>
* Edit /etc/fstab :
<code>
# etc/fstab
UUID=f5bf5451-9ad6-484c-88a4-9a260c893528 / ext3
defaults 0 1 UUID=b9dbd61f-0c12-46f1-8e87-0dedadc779f0
none swap sw 0 0 proc /proc
proc defaults 0 0 </code>
[UUIDs on your system are found by 'ls -l /dev/disk/by-uuid/']
* Set time:
<code>
# etc/adjtime
0.0 0 0.0
0
UTC
</code>
* Choose timezone
<code>
dpkg-reconfigure tzdata
</code>
* Configure network-interface to use dhcp preliminarily:
<code>
# etc/network/interfaces
auto eth0
iface eth0 inet dhcp
</code>
* Set package-sources for dpkg:
<code>
# /etc/apt/sources.list
deb http://ftp2.de.debian.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
</code>
* Don't forget to update the package-cache:
<code>
aptitude update
</code>
* Install and configure locales:
<code>
aptitude install locales
dpkg-reconfigure locales
</code>
* Configure keyboard:
<code>
aptitude install console-setup
dpkg-reconfigure keyboard-configuration
</code>
* Install the right kernel for Pogoplug v2 :
<code>
aptitude install linux-image-3.2.0-4-kirkwood
</code>
** U-boot configuration according to <link> http://mehl.co/files/pogoplug-debian.sh
</link> **
* First some packages need to be installed:
<code>
aptitude install mtd-utils
aptitude install flash-kernel
aptitude install module-init-tools
aptitude install uboot-envtools
aptitude install binutils
</code>
* Then the kernel is copied to the NAND-Flash:
<code>
export KERNEL_VERSION=3.2.0-4-kirkwood
/usr/bin/mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n
Linux-$KERNEL_VERSION -d /boot/vmlinuz-$KERNEL_VERSION /boot/uImage </code>
[Explanation of options:
- -A architecture
- -O operating-system
- -T image-type
- -C compression
- -a specify loading-address
- -e specify point of entry
- -n specify image-name
- -d specify kernel-image
/boot/uImage is the image for uboot.]
* Copy InitRamDisk to NAND-flash :
<code>
/usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n
initramfs-$KERNEL_VERSION -d /boot/initrd.img-$KERNEL_VERSION /boot/uInitrd </code>
* Set hostname and C as default-locale .
<code>
echo 'space-pogo' > /etc/hostname
echo LANG=C > /etc/default/locale
</code>
* Edit /etc/fw_env.config .
<code>
# etc/fw_env.config
/dev/mtd0 0xc0000 0x20000 0x20000
</code>
* Edit the following file:
<code>
#/etc/kernel/postinst.d/zz-flash-kernel
#!/bin/sh
version="$1"
bootopt=""
# passing the kernel version is required
[ -z "${version}" ] && exit 0
echo "Running flash-kernel ${version}"
flash-kernel ${version}
</code>
* inittab is edited to send boot-messages to the serial interface and disable virtual
terminals:
<code>
#/etc/inittab
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux
</code>
* Edit /etc/default/rcS
<code>
# etc/default/rcS
HWCLOCKACCESS=no
CONCURRENCY=shell
</code>
* Finally the following commands were executed, while it is unclear whether these are
essential
<code>
if [ -e /etc/blkid.tab ]; then rm /etc/blkid.tab; fi
ln -s /dev/null /etc/blkid.tab
if [ -e /etc/mtab ]; then rm /etc/mtab; fi
ln -s /proc/mounts /etc/mtab
</code>
** this is it, DONE, everything works just fine**
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlLOh4AACgkQ5+rBHyUt5wsZUwCgwSMlhDkBhdNecml2Au+CRzk4
QhoAoIrvR4qI0DoEaXtfAgpGgOb2US/F
=o7gt
-----END PGP SIGNATURE-----
Reply to: