rpi4 model b 8GB USB boot

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

rpi4 model b 8GB USB boot

Postby umbrellarunaround » Sun May 09, 2021 10:24 pm

Hi All! :)

Thanks for maintaining archlinuxarm. I've used it all my Raspberry Pis and really appreciate it.

# Summary

When using the default install instructions [1], I can't seem to get my Raspberry Pi 4 Model B 8GB (rpi4) to boot from a USB SSD.

Do you know what I'm doing wrong? :!:

I have installed archlinuxarm to my USB SSD using the commands below.

When I power on the rpi4 with just the USB SSD connected, I see the following error during a boot loop:
$this->bbcode_second_pass_code('', 'Starting USB
bus xhci_pci: probe failed, error -110
no working controllers found
...
resetting cpu
')

Image of full boot text here [2].

# Background

I booted the rpi4 successfully from a micro SD card with archlinux. I then installed archlinux to the USB SSD.

## install archlinux arm to micro SD card
$this->bbcode_second_pass_code('', 'fdisk /dev/mmcblk0
cd /mnt
mkdir boot
mkdir root
mkfs.vfat /dev/mmcblk0p1
mkfs.ext4 /dev/mmcblk0p2
mount /dev/mmcblk0p1 boot
mount /dev/mmcblk0p2 root
bsdtar -xpf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C root
sync
mv root/boot/* boot
sync
sed -i 's/mmcblk0/mmcblk1/g' root/etc/fstab
umount boot root')

## boot rpi4 from sd card and install archlinuxarm to usb ssd
$this->bbcode_second_pass_code('', 'ssh alarm@alarmpi
su root
passwd alarm
pacman-key --init
pacman-key --populate archlinuxarm
pacmn -Syu
pacman -S dosfstools wget
fdisk /dev/sda
cd /mnt
mkdir boot
mkdir root
mkfs.vfat /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda1 boot
mount /dev/sda2 root
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C root
sync
mv root/boot/* boot
sync
sed -i 's/mmcblk0p/sda/g' root/etc/fstab
umount boot root
')

[1] https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4
[2] https://postimg.cc/9wWRH3Xk
umbrellarunaround
 
Posts: 14
Joined: Fri Mar 12, 2021 12:31 pm

Re: rpi4 model b 8GB USB boot

Postby graysky » Mon May 10, 2021 9:09 am

viewtopic.php?f=67&t=15190&p=66097#p66097

Then boot and install linux-raspberrypi4 which doesn't have this 8G bug. Then you can remove the total_mem= line to access all 8G.
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: rpi4 model b 8GB USB boot

Postby umbrellarunaround » Mon May 10, 2021 12:44 pm

Hi graysky

I've seen lots of your comments around. Thanks for the help. :idea:

Will the following procedure work for USB SSD boot?

Ensure config.txt on the boot partition of the USB SSD contains the following:
$this->bbcode_second_pass_code('', 'total_mem=2048')
Connect keyboard to rpi4. remove microsd. Boot rpi4.
When booted successfully from USB SSD for first time install linux-raspberrypi4 kernal package.
$this->bbcode_second_pass_code('', 'pacman-key --init
pacman-key --populate archlinuxarm
pacman -S --needed linux-raspberrypi4')
Remove total_mem=2048 from config.txt and reboot.

Thanks
umbrellarunaround
 
Posts: 14
Joined: Fri Mar 12, 2021 12:31 pm

Re: rpi4 model b 8GB USB boot

Postby graysky » Mon May 10, 2021 1:46 pm

That should allow you to boot off uSD media. I haven't booted from an external device is a while and don't remember specifics.
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: rpi4 model b 8GB USB boot

Postby umbrellarunaround » Wed May 12, 2021 6:37 pm

Hi graysky

Thanks for the suggestions.

Fortunately I've needed no config.txt tweaks to boot straight from the microsd card using the default image [1] and default procedure [2]. :)

I've tried the following from the thread you suggested. Unfortunately I see the same error (bus xhci_pci: probe failed, error -110).

boot rpi4 from microsd card
connect USB SSD (which has also has the default image installed using the standard procedure in my first post).

$this->bbcode_second_pass_code('', 'mount /dev/sda1 /mnt/boot
mount /dev/sda2 /mnt/root
cp /mnt/boot/config.txt config.txt.bak
vi /mnt/boot/config.txt (add total_mem=2048)
pacman -S arch-install-script
arch-chroot root/
pacman-key --init
pacman-key --populate archlinuxarm
pacmn -Syu
pacman -S --needed linux-raspberrypi4 raspberrypi-bootloader raspberrypi-bootloader-x raspberrypi-firmware firmware-raspberrypi
exit')

The ubuntu image [3] is able to boot straight from usb ssd on the rpi4 8GB, but I really much prefer the cleanless of archlinux ;) if I can figure out how to get it booting!

[1] ArchLinuxARM-rpi-aarch64-latest.tar.gz
[2] https://archlinuxarm.org/platforms/armv ... berry-pi-4
[3] ubuntu-21.04-preinstalled-server-arm64+raspi.img
umbrellarunaround
 
Posts: 14
Joined: Fri Mar 12, 2021 12:31 pm

Re: rpi4 model b 8GB USB boot

Postby umbrellarunaround » Sat May 15, 2021 10:48 am

Hi all

The following works for me.

1) install archlinuxarm to a micro SD using instructions at link below:
https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4

2) boot from micro SD and install archlinuxarm to usb ssd
$this->bbcode_second_pass_code('', 'ssh alarm@alarmpi
su root
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu
pacman -S dosfstools wget arch-install-scripts
fdisk /dev/sda
mkdir /mnt/boot
mkdir /mnt/root
mkfs.vfat /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda1 /mnt/boot
mount /dev/sda2 /mnt/root
cd /mnt
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz
bsdtar -xpf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C root
sync
mv root/boot/* boot
sync
sed -i 's/mmcblk0p/sda/g' root/etc/fstab')

3) update and configure archlinuxarm on usb ssd
$this->bbcode_second_pass_code('', 'umount /mnt/boot
mount /dev/sda1 /mnt/root/boot
arch-chroot /mnt/root
pacman -Syu
vi /etc/mkinitcpio.conf
# modify mkinitcpio.conf so MODULES=(pcie_brcmstb)
mkinitcpio -P
exit
poweroff')

4) remove micro SD card and boot from USB SSD

sources
https://archlinuxarm.org/forum/viewtopic.php?f=65&t=14672&start=30#p66123
https://gist.github.com/XSystem252/d274cd0af836a72ff42d590d59647928
Last edited by umbrellarunaround on Mon Aug 02, 2021 8:26 am, edited 1 time in total.
umbrellarunaround
 
Posts: 14
Joined: Fri Mar 12, 2021 12:31 pm

Re: rpi4 model b 8GB USB boot

Postby Diesel1 » Thu Jul 29, 2021 10:56 pm

I think you need to check the bsdtar -xpf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C root

and make it write to /mnt/root, also the mv command needs to take into account the /mnt prefix. Same again for the sed command.

Perhaps you should cd into the /mnt directory after you mount the root and boot directories.

Diesel1.
Diesel1
 
Posts: 5
Joined: Mon Nov 23, 2015 12:01 am

Re: rpi4 model b 8GB USB boot

Postby umbrellarunaround » Mon Aug 02, 2021 8:30 am

Hi Diesel1

Thanks for spotting that ;) I've added cd /mnt to the instructions above.

The basic install works fine at the moment but I've been having trouble booting with a second USB HDD attached.

https://archlinuxarm.org/forum/viewtopic.php?f=65&t=15467

Is there another website you would recommend posting?
umbrellarunaround
 
Posts: 14
Joined: Fri Mar 12, 2021 12:31 pm


Return to ARMv8

Who is online

Users browsing this forum: technosf and 11 guests