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:
Code: Select all
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
Code: Select all
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
Code: Select all
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: 5
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
 
Posts: 974
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:
Code: Select all
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.
Code: Select all
pacman-key --init
pacman-key --populate archlinuxarm
pacman -S --needed linux-raspberrypi4

Remove total_mem=2048 from config.txt and reboot.

Thanks
umbrellarunaround
 
Posts: 5
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
 
Posts: 974
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).

Code: Select all
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: 5
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
Code: Select all
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
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
Code: Select all
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
umbrellarunaround
 
Posts: 5
Joined: Fri Mar 12, 2021 12:31 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 3 guests