Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Building the base image
- This documents exactly what I did step by step. As I had some small mis-steps, it's longer than needs to be. When I give it another go, I'll condense it to the bare minimum.
- First use debootstrap to generate a chrootable rootfs. We do this on any speedy machine (faster to do the dependency calculation there) and do the next bit on the raspi.
- sudo debootstrap \
- --include=ssh,python,lua5.1,build-essential,lxde,sudo,locales,xserver-xorg,bash-completion \
- --components=main,contrib,non-free \
- --verbose \
- --foreign --arch armel \
- sid sid_rootfs http://www-uxsup.csx.cam.ac.uk/pub/linux/debian
- Now tar that over the network to the raspberry pi
- sudo sh -c "tar -cpf - sid_rootfs | ssh user@raspi sudo tar -xpf -"
- Then, on the raspi:
- cd sid_rootfs
- sudo chroot .
- ./debootstrap/debootstrap --second-stage
- apt-get clean # get rid of downloaded .debs
- You know longer need to be in the chroot, but might prefer to be.
- Configure `etc/fstab`:
- cat <<EOF > etc/fstab
- proc /proc proc defaults 0 0
- /dev/mmcblk0p1 /boot vfat defaults 0 0
- /dev/mmcblk0p2 / ext3 defaults,noatime 0 0
- /dev/mmcblk0p3 none swap sw 0 0
- EOF
- Configure `etc/apt/sources.list`
- cat <<EOF > etc/apt/sources.list
- deb http://www-uxsup.csx.cam.ac.uk/pub/linux/debian sid main contrib non-free
- deb-src http://www-uxsup.csx.cam.ac.uk/pub/linux/debian sid main contrib non-free
- EOF
- Configure `etc/network/interfaces`:
- echo "auto usb0" >> etc/network/interfaces
- echo "iface usb0 inet dhcp" >> etc/network/interfaces
- Now set up hostname:
- export NEWHOSTNAME=blank # or whatever you want
- echo $NEWHOSTNAME > etc/hostname
- printf "127.0.1.1\t$NEWHOSTNAME\n" >> etc/hosts
- Now copy `/lib/modules/*` from root fs and set up vchiq:
- cp -a /lib/modules/* lib/modules
- echo vchiq >> etc/modules
- cp -a /etc/init.d/vchiq etc/init.d/
- chroot .
- inserv /etc/init.d/vchiq
- exit
- The image now *should* be bootable. Tar it over the network, compress it,
- archive it. On the computer connected to the raspi do:
- ssh eupton@10.42.43.40 sudo tar -cpf - -C sid_rootfs . | bzip2 --best > rootfs_sid_armel_blank_20_09_11.tar.bz2
- Now we can rewrite card and boot the new system, then do the post-system
- setup.
- Edit `/etc/shadow` and remove the `*`. Now
- you can log in as root with no password.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement