Bootstrapping Alpine on Soekris net4xxx: Difference between revisions

From Alpine Linux
m (Reverted edits by 141.223.149.36 (Talk); changed back to last version by Cschieli)
m (RfD. Nowiki'd a dead link.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Delete|The devices this page references do not meet the minimum system requirements for any currently supported version of Alpine (lack of CMOV and SSE instructions will prove troublesome!).}}
[[Category:Installation]]
This is a step-by-step guide on bootstrapping the latest (developement) Alpine Linux on a CF card for Soekris net4xxx routers
This is a step-by-step guide on bootstrapping the latest (developement) Alpine Linux on a CF card for Soekris net4xxx routers


Line 9: Line 13:
First, we download the latest usbdrive tarball
First, we download the latest usbdrive tarball


  wget http://dev.alpinelinux.org/alpine/v1.7/usbdrive/alpine-1.7.5-i386.tar.gz
  wget <nowiki>http://dev.alpinelinux.org/alpine/v1.7/usbdrive/alpine-1.7.5-i386.tar.gz</nowiki>


and unpack it on our CF card
and unpack it on our CF card

Latest revision as of 21:49, 3 September 2023

This material is proposed for deletion ...

The devices this page references do not meet the minimum system requirements for any currently supported version of Alpine (lack of CMOV and SSE instructions will prove troublesome!). (Discuss)
Make sure no other pages link here and check the page's history before deleting.


This is a step-by-step guide on bootstrapping the latest (developement) Alpine Linux on a CF card for Soekris net4xxx routers


We assume our CF reader is at /dev/sdb, with a 512+ MB CF formatted card loaded and will be mounted on /mnt/flash. We also assume root priviledges.

export FLASHDEVICE=/dev/sdb1
export MNT=/mnt/flash

First, we download the latest usbdrive tarball

wget http://dev.alpinelinux.org/alpine/v1.7/usbdrive/alpine-1.7.5-i386.tar.gz

and unpack it on our CF card

mount $FLASHDEVICE $MNT
tar xzf ../alpine-1.7.5-i386.tar.gz -C $MNT

Next step is to build a custom initrd (for the serial console to work)

mkdir /tmp/alpine
cd /tmp/alpine
zcat $MNT/kernel/generic/hd-ext3.gz > soekris
tar xjf $MNT/base.tar.bz2 ./etc/inittab
sed -i -e 's/^::respawn.*//' -e 's/^tty.*//' -e 's/^#\(ttyS0.*\) 115200 \(.*\)/\1 19200 \2/' etc/inittab
echo etc/inittab | cpio -o -H newc -A -O soekris
gzip -c -9 soekris > $MNT/kernel/generic/soekris.gz

and a custom syslinux.cfg

cat > $MNT/syslinux.cfg <<EOF
serial 0 19200
timeout 0
default generic-soekris

label generic-soekris
        kernel /kernel/generic/bzImage
        append initrd=/kernel/generic/soekris.gz rw alpine_dev=hda1:vfat root_dev=none:tmpfs alpine_base=base.tar.bz2 pkg_dev=hda1:vfat pkg_subdir=/apks cfg_dev=hda1:vfat modloop=/kernel/generic/modloop.cmg console=ttyS0,19200
EOF

Finally, we make the CF bootable

syslinux $FLASHDEVICE
umount alpine