[Guide] Boot ArchLinux ARM from USB (Raspberry Pi 3+)

This forum is for discussion about general software issues.

[Guide] Boot ArchLinux ARM from USB (Raspberry Pi 3+)

Postby jyno » Sun Feb 27, 2022 6:51 am

Tested on Raspberry Pi3+

This guide will assist you to move your ArchLinux ARM installation into USB or SSD drive.
In this guide, USB may also be refered to as SSD.

Step 1
Copy the microSD into USB
microSD is /dev/sdX
USB is /dev/sdY
$this->bbcode_second_pass_code('', '$ sudo dd bs=52M status=progress if=/dev/sdX of=/dev/sdY')

Remove microSD card.
From now on, you DO NOT need the microSD card.
Keep the microSD card in a box for backup!

Step 2
Open USB drive and make the following changes.

Edit /etc/fstab
Replace mmcblk0p1 by sda1

Before:
$this->bbcode_second_pass_code('', '
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
/dev/mmcblk0p1 /boot vfat defaults 0 0
')

After:
$this->bbcode_second_pass_code('', '
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
/dev/sda1 /boot vfat defaults 0 0
')

Edit /boot/cmdline.txt
Replace mmcblk0p2 by sda2

Before:
$this->bbcode_second_pass_code('', 'root=/dev/mmcblk0p2 rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200')

After:
$this->bbcode_second_pass_code('', 'root=/dev/sda2 rw rootwait console=serial0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=serial0,115200')

Step 3
Insert the USB drive to the SBC.
Now you're able to boot just from USB.

Cheers!
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm

Re: [Guide] Boot ArchLinux ARM from USB (Raspberry Pi 3+)

Postby robg » Sun Feb 27, 2022 5:22 pm

Thank your for this tutorial and for contributing back to the community!

As a minor comment, you may want to add that in Step 2, instead of using sda{1,2}, using the UUID as returned by `blkid` is more robust (in the sense that plugging in various USB drives will not result in a change of boot/root target.)
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: [Guide] Boot ArchLinux ARM from USB (Raspberry Pi 3+)

Postby ufo6000 » Sun Feb 27, 2022 6:09 pm

Another hint, to give the bootloader more time to detect anything "external", e.g. when it's not an SSD but a HDD:

$this->bbcode_second_pass_code('', '
# /boot/config.txt
boot_delay=10
')

$this->bbcode_second_pass_code('', '
# /boot/cmdline.txt
... rootwait rootdelay=35 ...
')
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: [Guide] Boot ArchLinux ARM from USB (Raspberry Pi 3+)

Postby jyno » Mon Feb 28, 2022 2:50 pm

Awesome! Thanks guys.

I didn't know of blkid and the HDD. Please write a complete paragraph so I'll be adding your hints untouched.
jyno
 
Posts: 67
Joined: Wed May 05, 2021 4:37 pm


Return to General

Who is online

Users browsing this forum: No registered users and 5 guests