Minnowboard:Debian Bare Minimum Bootstrapping

From eLinux.org
Revision as of 19:40, 3 September 2013 by TheMoogle (Talk | contribs) (bootstrapping debian onto a minnowboard)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Bootstrapping Debian onto your MinnowBoard is a fairly simple process. At the end of this guide you will have a complete minimum Debian system you can use on your MinnowBoard.

Requirements:

  1. MinnowBoard that has a working micro SD card preloaded with the MinnowBoard Angstrom Linux Distribution
  2. USB Thumb drive >2GB or SATA drive
  3. Internet connection
  4. Some spare time

Lets Get Started

You will need a place to install Debian onto, for safety sake we are installing onto a drive other then the micro SD card. This way if you mess up you can simply format the drive and start over and still have a good install of Angstrom to use.

TIP: Set your CPU frequency scaling to Ondemand for both cores to keep your system cool during this procedure. Bootstrapping is fairly cpu intensive and things can heat up fast.

First plugin your thumb drive and use Disk Utility to properly partition it out. I suggest you name your root partition Debian to avoid any confusion later on. If your Feeling adventurous make a swap partition and leave some room for a boot loader.

Mount the Debian root partition

 mkdir /media/debian
 mount /dev/sdb1 /media/debian

Next make a root directory on your Angstrom micro SD card to hold all the bootstrap files call it debinst.

 mkdir /debinst
 cd /debinst

Then choose what version of Debian you want to use. http://ftp.debian.org/debian/pool/main/d/debootstrap/

 mkdir work
 cd work
 wget http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.48+deb7u1_all.deb

copy the package to the work folder, and extract the files from it.

 ar -x debootstrap_1.0.48+deb7u1_all.deb
 cd /
 zcat /debinst/data.tar.gz | tar xv

There is a small issue with the installer that needs to be fixed before we start the script. Edit /debinst/usr/sbin/debootstrap line 16 to

 DEBOOTSTRAP_DIR=/debinst/usr/share/debootstrap

Next Comes the part that will take some time. Running the bootsrtap script

 /usr/sbin/debootstrap --verbose --extrractor=ar --arch i386 wheezy \/media/debian http://ftp.us.debian.org/debian

If all goes well you now have Debian :) Lets configure a few things by chroot into the system.

 LANG=C.UTF-8 chroot /media/debian /bin/bash

Set the terminal to be compatible with the Debian System

 export TERM=xterm-color

Now we can create the device files (there may be a better way to do this)

 apt-get install makedev
 cd /dev
 MAKEDEV generic

Mount points in fstab

 editor /etc/fstab

(more information needed here on proper fstab settings)

Timezone settings

The following command allows you to choose your timezone.

 dpkg-reconfigure tzdata

Configure Networking

 editor /etc/network/interfaces

add the following lines to enable dhcp

 auto eth0
 iface eth0 inet dhcp

Enter your nameserver(s) and search directives in /etc/resolv.conf:

 editor /etc/resolv.conf

Enter your system's host name (2 to 63 characters)

 echo DebianMinnow > /etc/hostname

Configure Apt

Debootstrap will have created a very basic /etc/apt/sources.list you can add more repositories

 deb-src http://ftp.us.debian.org/debian wheezy main
 deb http://security.debian.org/ wheezy/updates main
 deb-src http://security.debian.org/ wheezy/updates main

Install a Kernel

If you intend to boot this system, you probably want a Linux kernel and a boot loader. Identify available pre-packaged kernels with:

 apt-cache search linux-image

Once you find one you like to use do:

 aptitude install linux-image-ArchOfYourChoice-etc

Boot Loader

(Not working yet.)

 aptitude install grub-pc
 grub-install /dev/hdb1
 update-grub

SSH and Remote Access

(Needs fixing)

 aptitude install ssh
 passwd

Expanding Further

As mentioned earlier, the installed system will be very basic. You can expand your system more with the following command

tasksel install standard

From the bootstrapping process there will be a ton of left over packages in /var/cache/apt/archives/. You may want to remove them.

 aptitude clean