2

I've recently learnt that Arch ARM is not designed to work being booted from a USB, and can only work from an SD card following the installtion guide on their site (https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3). This is because USB's do not have the /dev/mmcblk0p2 partition that SD cards do, but Arch ARM tries to mount it on boot. When it fails to do so, it drops you into an emergency shell.

So my question is, is it possible to install Arch ARM to a USB such that it can boot? How can I go about doing that?

I've been told to include the contents of cmdline.txt, /etc/fstab, fstab -l /dev/mmcblk0' and the PARTUUID of the USB drive, however I only know how to find /etc/fstab so some guidance on how to attain the other information would be appreciated.

/ect/fstab:

# Static information about the filesystems.
# See fstab(5) for details.

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

Edit - Adding new information:

PARTUUID's:

sda1: 24da48ba-01
sda2: 24da48ba-02

cmdline.txt:

root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
3
  • If you do not know how to list or edit files on your system it is difficult to help. The /etc/fstab listed does NOT look like ANY Raspberry filesystem. fstab -l /dev/mmcblk0 should have been fdisk -l /dev/mmcblk0 . If you performed step 2 of the tutorial you should have the information - fdisk -l /dev/sdX will show this.
    – Milliways
    Commented Jul 10, 2018 at 2:21
  • the blkid command will show PARTUUID's - cmdline.txt is in the first (FAT32) partition Commented Jul 10, 2018 at 7:51
  • Thanks, I've added the PARTUUID's and the cmdline.txt contents from the first partition. I'm assuming you need to run the fdisk command while the pi is booted, will that work with only shell and no bash though? Commented Jul 10, 2018 at 16:07

2 Answers 2

1

Assuming the image has the up-to-date firmware required to boot the Pi3B+, you only have to do 2 things:-

  1. Modify the cmdline.txt root entry to

    root=PARTUUID=24da48ba-02
    
  2. Change the 2 lines in /etc/fstab to

    PARTUUID=24da48ba-01  /boot           vfat    defaults          0       2
    PARTUUID=24da48ba-02  /               ext4    defaults,noatime  0       1
    

The cmdline.txt you listed contains console=ttyAMA0,115200 - BUT on the Pi3B Pi3B+, ttyAMA0 is normally connected to the Bluetooth device. This raises concerns if the image is actually designed for the Pi3B+ - you should test on a SD Card image to see if it even works!

NOTE the console=ttyAMA0,115200 is NOT NEEDED if you are not using a serial console. The kernel debugger is also connected to this port kgdboc=ttyAMA0,115200 and is definitely NOT needed!

For reference, the following is my cmdline.txt:

dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=c49c1da4-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
1
  • so program_usb_timeout=1 is not needed in config.txt ? it's just to be on the safe side ? I would rather use the UUID of the fs than the PARTUUID
    – solsTiCe
    Commented Jan 19, 2019 at 10:34
2

Flash the image you have just flashed to the SD Card to an USB stick. Attach the USB stick to a computer with linux operating system, e.g. with Debian, Arch, Ubuntu or so and mount its two partitions:

~$ mkdir mnt1
~$ mkdir mnt2
~$ sudo mount /dev/sdb1 mnt1/
~$ sudo mount /dev/sdb2 mnt2/

Then in mnt1/cmdline.txt change mmcblk0p2 to sda2 and in mnt2/etc/fstab change mmcblk0p1 to sda1. You may have to use sudo. The files should look like this:

~$ sudo cat mnt1/cmdline.txt
root=/dev/sda2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop

~$ sudo cat mnt2/etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

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

Unmount the partitions:

~$ sudo umount mnt1/
~$ sudo umount mnt2/

Have a look at "sda" and "sdb". Don't mix up them. Remove the SD Card from your Raspberry Pi 3B+, attach the USB stick and power on the raspi. It should boot now.

1
  • I confirm this works. And this is enough. Just booted successfully on a RPi 4 (armv7l) with these changes alone.
    – Atralb
    Commented Feb 24, 2021 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.