Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1857869
  • 博文数量: 473
  • 博客积分: 13997
  • 博客等级: 上将
  • 技术积分: 5953
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-22 11:52
文章分类

全部博文(473)

文章存档

2014年(8)

2013年(38)

2012年(95)

2011年(181)

2010年(151)

分类: LINUX

2012-06-22 13:37:21

Debian comes with a useful tool for systems installers called debootstrap that eases creating your initial root file store.

To get debootstrap (in case it's not yet installed on your Ubuntu distro), type:

$ sudo apt-get install debootstrap

debootstrap is usually run in two stages. The first stage is on a working Debian (or Ubuntu) machine to create a very basic area. The second stage is run on the target machine (in this case your FOX Board G20) to fill in that area.

The steps are detailed and minor mistakes can lead to an unbootable system or a system that is highly unreliable.

To make life easier you can use this shell script: .

There are some settings at the start of the script that you may want to change. In particular:

# Where to get Debian files from - pick one local to you! url=http://ftp.uk.debian.org/debian

You can find the official list of alternate mirrors here:

# This MUST match the version of the kernel you are using on your target kernel_version=2.6.38 # Either set eth=static and then also address, netmask and gateway # OR set eth=dhcp # Comment out which ever you are NOT using # Target machine network details   #eth=static #address=192.168.1.90 #netmask=255.255.255.0 #gateway=192.168.1.1   eth=dhcp

Once edited gen_squeeze.sh has to be run as root (it is a requirement of debootstrap):

$ sudo ./gen_squeeze.sh

When the script runs, it will create the sub-directory armel-root in the Linux directory and will copy the first stage bootstrap files in there.

Once completed, you need to copy the contents of the directory armel-root to the root area of your microSD.

Format you microSD card as recommended on this article then copy the stage1 rootfs files typing:

$ sudo cp -rp armel-root/. /media/rootfs $ sync

As with all large microSD operations the cp may complete almost instantly - because the files are still being copied over by Linux. Then sync will take a long time as it waits for the files to really appear on the microSD.

Now unmount your microSD card, transfer it to your FOX Board G20, insert your and boot.

Depending on your network connection (and the speed/load of the Debian repository) stage2 can take 30 minutes or more to complete.

A prompt will ask you to setup your root password after that the FOX Board G20 will reboot automatically into multi-user Debian.

Type these commands to stop Perl (and everything that uses Perl) from complaining about locale issues:

root@foxg20:~# apt-get update root@foxg20:~# apt-get install locales root@foxg20:~# dpkg-reconfigure locales

Some locales run out of memory when you try to configure them on the Fox (localedef crashes). If you are hit by this do:

root@foxg20:~# apt-get install locales-all

before running dpkg-reconfigure.

WARNING: installing locales-all takes a long time - at least 15 minutes!

阅读(789) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~