Home NAS (Advanced) • How to create your basic root filesystem for ARM

How to create your basic root filesystem for ARM

 - 

Now that we have the kernel ready (previous post), we can start creating a minimal root filesystem for your NAS to work on, note that this is a very minimal installation, but when the process is finished, you can install all the software you like.

Since i’m using Ubuntu, which is Debian based, there is a tool called debootstrap. With debootstrap it’s possible to create a basic working Linux environment, which can be copied to the harddisk of your NAS and continue working that way.

Before continuing, make sure you are root (sudo su -)!

Debootstrap is not installed by default, so we have to install it first:
apt-get install debootstrap

Now that debootstrap is installed, we can start building our minimal system, first create a directory to store your basic filesystem in:
mkdir rootfs

Now download and prepare the ARM basic filesystem:
debootstrap --verbose --arch armel --foreign squeeze rootfs http://ftp.nl.debian.org/debian

With this command you build a minimal foreign (other arch) system for armel using Debian Squeeze with verbose output. We are using the newer armel repo since the old arm repo is outdated and not being used anymore, only on legacy hardware. And i choose to run Squeeze since this is the soon to be released new Debian in a couple of weeks, so all packages are pretty up-to-date.

When this process is done you’ll end up with a rootfs directory containing your minimal system. You need to tar it first before we can deploy it:
cd rootfs
tar vczf rootfs.tgz *
mv rootfs.tgz ../

Now you have the packed filesystem in the same place as your kernel/modules are, which we’ll need for the second part, but i’ll be discussing that later :).

Author:langerak

4 responses to “How to create your basic root filesystem for ARM”

  • Chris 09-02-2011 at 22:34 Reply 

    Sorry about this 🙁

    But the debootstrap line doesn’t work. Entering exactly as per your syntax produces:

    cd: 352: can’t cd to http://ftp.nl.debian.org


    • langerak 09-02-2011 at 22:43 Reply 

      No problem :), as for this to be good, people need to test it, because with these things, it’s easy to forget something as in this article.

      I’ve made some modifications on the article, try again!


  • Chris 09-02-2011 at 22:57 Reply 

    That worked! Removing the slash from rootfs did the trick.

    Looking forward to your next article on how to get this puppy onto the LaCie 😀


    • langerak 10-02-2011 at 19:28 Reply 

      Oh don’t worry, there is (much) more to come 😉


Leave a Reply

Your email address will not be published. Required fields are marked*

*

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.