Sharing Knowledge about ARM, Linux and Development Platforms as Beaglebone Black.

07 May 2014

Installing Arch Linux

Our purpose for today is to install Arch Linux on a MicroSD card that we will plug onto our Beaglebone Black. It is not a difficult process and it is almost detailed on Arch Linux ARM webpage: LINK


We have selected this Linux distro because it is light and minimalist, has only and just necessary stuff (we will have to install manually some things that are preinstalled on other distros and probably this will cause us some headache but no pain no gain!).

The process will be as easy as format the MicroSD, download the Beaglebone bootloader, the Arch Linux filesystem and write them on the MicroSD. We will perform these steps on Linux so unless you have your preferred distro I will recommend you download and launch a Live USB with Xubuntu.


Xubuntu is an Ubuntu brother thought for medium age computers and from my point of view it works like a charm! Download it from here: Get Xubuntu!

If you are running Windows you should download a tool called "Universall USB Installer" from PendriveLinux guys that will simplify for you the Live USB Xubuntu creation. Get UUI! Install it, follow the steps, reboot your computer, change the BIOS for booting from an USB device and welcome to Xubuntu!

Ok, so you are now under Xubuntu, you took your time to configure WiFi, your Language, TimeZone, Keyboard, etc. Let's get started!

Open a Terminal and List partition tables so write:
 sudo fdisk -l
Search carefully (extract it and insert it twice to be sure!) for your MicroSD card, in my case: "sdb". Start fdisk to partition it:
 sudo fdisk /dev/sdb
1. Type o to clear any partition the card
2. Type p to list partitions (should be empty!)
3. Type n to add a partition, p for primary, 1 for the first partition, enter for the default first sector, +64M for the last sector. Type t to change the partition type, e for W95 FAT16 (LBA). Type a to set the bootable flag and 1 to apply it on first partition. Now type to add another partition, p for primary, for the second partition, enter for the default first sector, enter for the default last sector. Finally type w to write partition table.
4. Create the FAT16 filesystem:
 sudo mkfs.vfat -F 16 /dev/sdb1
5. Create the EXT4 filesystem:
 sudo mkfs.ext4 /dev/sdb2
6. Extract the bootloader into the first partition:
 sudo wget http://archlinuxarm.org/os/omap/BeagleBone-bootloader.tar.gz
 sudo mkdir boot 
 sudo mount /dev/sdb1 boot  
 sudo tar -xvf BeagleBone-bootloader.tar.gz -C boot
 sudo umount boot
7. Extract the root filesystem into the second partition:
 sudo wget http://archlinuxarm.org/os/ArchLinuxARM-am33x-latest.tar.gz
 sudo mkdir root 
 sudo mount /dev/sdb2 root  
 sudo tar -xvf ArchLinuxARM-am33x-latest.tar.gz -C root
 sudo umount root
8. That's all! Insert the MicroSD into the Beaglebone Black and power it while holding down the boot switch (the one nearest the HDMI connector), this will boot the board from MicroSD instead of eMMC. As User/Pass type root/root and enjoy!

Thanks for reading me and remember, if you can think it you can build it! :)
No comments

No comments :