Install arch from scratch on BeagleBone Black

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

Install arch from scratch on BeagleBone Black

Postby falstaff » Fri Jul 12, 2013 10:52 pm

A short how to install archlinux from scratch using arch-install-scripts. I started using the provided root filesystem from a uSD-Card.

1. Create partitions and format the internal eMMC using the fdisk commands from the archlinux arm installation instructions
2. Copy the Bootloader
$this->bbcode_second_pass_code('', 'mount /dev/mmcblk0p1 /mnt
mkdir /mnt-boot
mount /dev/mmcblk1p1 /mnt-boot
cp /mnt/* /mnt-boot
umount /mnt
umount /mnt-boot
')
3. Install prequisits
$this->bbcode_second_pass_code('', 'pacman -S arch-install-scripts')
4. Create a file system and mount the partition
$this->bbcode_second_pass_code('', 'mkfs.ext4 /dev/mmcblk1p2
mount /dev/mmcblk1p2 /mnt')
5. Install the base system
$this->bbcode_second_pass_code('', 'pacstrap /mnt base')
6. Chroot into it
$this->bbcode_second_pass_code('', 'arch-chroot /mnt')
7. Remove default kernel and install the BeagleBone kernel
$this->bbcode_second_pass_code('', 'pacman -R linux-armv7
pacman -S linux-am33x')
8. Enable DHCP service (optional)
$this->bbcode_second_pass_code('', '
systemctl enable dhcpcd@eth0
')

This is it, after reboot you should have your new installation of archlinux.

Question: Wouldn't it be more the arch way to provide this as installation instruction for the BeagleBone Black?
--
falstaff
falstaff
 
Posts: 10
Joined: Mon Jun 24, 2013 8:08 am

Re: Install arch from scratch on BeagleBone Black

Postby kmihelich » Sat Jul 13, 2013 3:10 am

We've discussed internally the idea of creating a bare-bones kernel+initramfs package that you would ssh into and then do things more the "Arch way" for installation, but haven't really gone forward with any of it. Realistically, people have enough problems with the installation instructions as they are now, I really can't imagine the level of forum explosion if we had people go through an Arch-like install procedure.

On a side note, I noticed from your instructions that I accidentally left my linux-armv7 test kernel in the base group. That will be rectified shortly in the next hour or so when the rebuilt package gets into the repo, so you'll be able to remove the 'pacman -R linux-armv7' step.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: Install arch from scratch on BeagleBone Black

Postby pepedog » Sat Jul 13, 2013 11:04 am

For a laugh I had a go at this (but for odroid u2)
dbus connection errors stopped and systemctl commands so did these in the arch-chroot
$this->bbcode_second_pass_code('', 'pacman -S openssh ntp
ln -s /usr/lib/systemd/system/dhcpcd@.service /etc/systemd/system/multi-user.target.wants/dhcpcd@eth0.service
ln -s /usr/lib/systemd/system/ntpd.service /etc/systemd/system/multi-user.target.wants/ntpd.service
ln -s /usr/lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service
ln -s /usr/lib/systemd/system/sshdgenkeys.service /etc/systemd/system/multi-user.target.wants/sshdgenkeys.service
passwd #to change root password')
Once booted
hostnamectl set-hostname alarm
Then localectl, timedatectl things. Odroid needs fstab entry too, makes kernel update go ok
$this->bbcode_second_pass_code('', '/dev/mmcblk0p1 /boot vfat defaults 0 0')
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Install arch from scratch on BeagleBone Black

Postby vaizki » Fri Jul 26, 2013 9:42 pm

Personally I think it would be great to have ready made barebones 1GB uSD card images available which you could boot from and then bootstrap arch in an archy way (x86 style). Maybe spice it up with a few scripts to help arch-newbies along? There are after all Arch ISO images available for x86 which I always keep at hand... Oh and while you're at it, I need one for the Cubieboard A20 as well. Please?

The uSD images would also be great in recovery situations where you quickly need a bootable uSD to fix your eMMC-install. I have one uSD card with such a setup but I originally set it up using the factory-flashed Ångström on the BBB. Which is almost but not completely trivial, downloading to the eMMC, swapping the uSD between USB reader and uSD slot etc etc.

Then again, going with Arch is - or should be - a conscious choice to jump into the deeper end of the Linux pool? So it doesn't work if your feet reach the bottom while your head is above the surface ;)
vaizki
 
Posts: 7
Joined: Tue Jul 02, 2013 9:38 pm

Re: Install arch from scratch on BeagleBone Black

Postby moosbart » Thu Aug 22, 2013 8:43 pm

Thank you for the guide! I was wondering exactly if this type of installation was possible.
However at the very last step it returns an error:
$this->bbcode_second_pass_code('', '
# systemctl enable dhcpcd@eth0
Operation failed: Invalid argument
')
Have you got any idea, what went wrong?
Am accessing the board via a ssh connection through the ethernet. Is that why this command doesn't work?
moosbart
 
Posts: 5
Joined: Thu Aug 22, 2013 8:37 pm

Re: Install arch from scratch on BeagleBone Black

Postby cda0 » Fri Aug 23, 2013 7:49 am

$this->bbcode_second_pass_code('', 'systemctl enable dhcpcd@eth0.service')

I think that line should work.
cda0
 
Posts: 4
Joined: Mon Aug 19, 2013 3:02 pm

Re: Install arch from scratch on BeagleBone Black

Postby moosbart » Fri Aug 23, 2013 10:06 am

thank you! it works. bummer, I should have think of that on my own.
moosbart
 
Posts: 5
Joined: Thu Aug 22, 2013 8:37 pm


Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 3 guests