ARM installer for R Pi 3

Hi,

On Fedora workstation Silverblue 35, I installed arm-image-installer using

sudo rpm-ostree install  arm-image-installer uboot-images-armv8.noarch uboot-images-armv7.noarch

The instructions in the Fedora Docs are not clear to me.
“Installing Fedora Server on Single Board Computers - Raspberry Pi & Co.”

Where I’m struggling is;

  1. After I install the ARM installer, unmount the SD card with
umount /path/to/mountpoint/above

should have been a bit more clear after the command lsblk.
What goes on path, to and above?

  1. How to select the image for Pi 3 and transfer to the SD Card
arm-image-installer --image=Fedora-Server-34-1.2.aarch64.raw.xz --target=rpi4 --media=/dev/mmcblk0

Replacing the target with rpi3 suffice?

  1. On the Download Fedora server page, which image is recommended? Standard, netinstall or raw.
    I’m going to use it for a home file server, which is not too heavy on network traffic.

Thanks,

  1. Use the mount command and if you see the device mounted then it needs to be unmounted. lsblk also gives you the device path which may be a /dev/sdX or /dev/mmcblkX device.

For example, with my sd card reader I see the sd card as /dev/sdf and it usually mounts /dev/sdf1 and /dev/sdf2. Thus I use the command sudo umount /dev/sdf1 and repeat that for sdf2 so both partitions are unmounted.

  1. The image you select for the transfer using the arm-image-installer should be the one you download in from question 3. Note that the image installer is only for use with the raw image.
arm-image-installer --image=Fedora-Server-34-1.2.aarch64.raw.xz --target=rpi4 --media=/dev/mmcblk0

Thus --image will be the path/to/the/image/downloaded (full or relative). It is easiest if you download to some location then cd to that location before running the installer. I download to Downloads then ‘cd Downloads’ and use ‘ls’ to see the exact file name to use as the image name.
--target is not needed for either the Pi 3 or Pi 4. That target is only if using uboot which those boards do not need. Fedora by default installs grub to boot.
--media is the device identified in 1 above. For me it is usually /dev/sdf but should be whatever you identified it as in step 1.

I also add --resizefs so the installer can automatically expand the / file system to fill the sd card. The image is only ~9 GB without that and you would manually have to expand the file system if not using the --resizefs option.

You can get a lot of info about the arm-image-installer by simply using that command with no options and it will give a help screen.

  1. use the raw image. That is the one the image installer is designed to use.

It is your choice on which type image to download, but I use the server image since I manage the Pi from my desktop and do not need the gui desktop running on the Pi. However, if you choose to use VNC or similar to manage the Pi then you would probably select the workstation image.

1 Like

Thanks for the guide, @computersavvy . The sd card is corrupted (IO error). I’ll get a new one and try the steps.

The card may not be bad. Your command was wrong.
The command you posted was

sudo arm-image-installer --image=Fedora-Server-35-1.2.armhfp.raw.xz --media=/mmcblk1

It should have been

sudo arm-image-installer --image=Fedora-Server-35-1.2.armhfp.raw.xz --media=/dev/mmcblk1

That is assuming that the command “lsblk” (with the card plugged in) showed the device /dev/mmcblk1. If it did not then use whichever device “lsblk” shows but the whole path as I showed above.

2 Likes

I corrected the file path and added --resizefs as you pointed out.

  1. Old card:
    /dev/mmcblk1: fsync device failed: Input/output error

  2. New card:
    The ARM installer wrote the image, but spits out it is unsuccessful.

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 62521343 62513152 29.8G c W95 FAT32 (LBA)
/dev/mmcblk1p2 2048 8191 6144 3M 83 Linux

Partition table entries are not in disk order.

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Error: mount /dev/mmcblk12 /tmp/boot failed

I may have missed something. Do I have to partition the third manually?

That actually indicates it completed.

  1. Did you make certain all partitions on /dev/mmcblk1 were not mounted before you started the image installer?
  2. Have you tried the resulting sd card and checked if it will actually boot.
  3. On the arm install there are only 2 partitions created with every sd card I have created. Fedora workstation, fedora IOT, and fedora server.

I checked point 1 with the following steps.
$ sudo fdisk -l

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 62521343 62513152 29.8G c W95 FAT32 (LBA)
/dev/mmcblk1p2 2048 8191 6144 3M 83 Linux

Partition table entries are not in disk order.

I guess this answers your question 3.

I missed the step to unmount - my bad. So I unmount it and re-run the image writing commands.
$ umount /dev/mmcblk1
umount: /dev/mmcblk1: not mounted.

However, it comes with the following message.

Partition table entries are not in disk order.

The partition table has been altered.
Calling ioctl() to re-read partition table.
/dev/mmcblk1: fsync device failed: Input/output error
Error: mount /dev/mmcblk12 /tmp/boot failed

  1. It is not booting with the resulting sd card.

Well, that is an incorrect command again

mmcblk1 is the device not the partition. The device is not normally mounted, but the partitions with file systems usually are.

If when you insert the card reader it mounts the partitions you can see that with the mount command. The individual partitions will be what you just saw with the fdisk -l command.

Thus the commands to ensure the device is not mounted before writing to it would be

sudo umount /dev/mmcblk1p1
sudo umount /dev/mmcblk1p2

Then do the image writing and it will write the image without having a partition already mounted that then gets changed during writing.

The partitions were not created correctly.
What I did is;
$ sudo fdisk /dev/mmcblk1
$ sudo mkfs.vfat -f /dev/mmcblk1
The partition type was set to W95 FAT32 (LBA).

$ lsblk
mmcblk1 179:24 0 29.8G 0 disk
├─mmcblk1p1 179:25 0 5.6G 0 part
└─mmcblk1p2 179:26 0 24.2G 0 part

Done.

I recall the partitions need to be formatted (activated) and labeled.

What else did I miss and what did I do wrong?

Please bear with me. I used the Fedora Media Writer for the Workstation set-up and never did the file system/partitions, let alone Raspberry Pi Partition.

This was all wrong.

Since you are using the fedora arm-image-writer you do NOT need to do anything with the partitions. The image writer does that for you.

Simply (As I have said before)

  1. plug in the card reader with the card in it
  2. sudo fdisk -l (to see the current partitioning and identify the partitions)
  3. “sudo umount /dev/mmcblk1p1” & “sudo umount /dev/mmcblk1p2” (to make certain any existing partitions are not mounted)
  4. Clean up anything that may have been corrupted by prior attempts with
dd if=/dev/zero of=/dev/mmcblk1 bs=1024 count=1
  1. Write the image to the device using the image writer.
sudo arm-image-installer --image=Fedora-Server-35-1.2.armhfp.raw.xz --media=/dev/mmcblk1 --resizefs
  1. Put the newly written card into the R Pi 3 device and boot.

You should do nothing else but what I have listed to the sd card.
Step 4 is to clean out any corruption that may remain from prior failed attempts. As long as the device is still identified as /dev/mmcblk1 in step 2 then the commands as written should be all that is needed.

It seems you are trying too hard, and doing a lot of things that may interfere.

Do you not understand that the image writer does a complete partitioning, formatting, and writing process to create a bootable device from the downloaded image?

Do you not understand the difference between a device (/dev/mmcblk1) and a partition on that device (/dev/mmcblk1p1)?

Do you not understand that a partition with a file system (/dev/mmcblk1p1) is what the system mounts (and needs to be unmounted before writing the image to the device)?

It is not required that you do anything else but use the image writer to create the bootable sd card from the image.

Thanks. It worked fine up to step 4 but below happened on step 5 (two sd cards).

= Fedora-Server-35-1.2.armhfp.raw.xz
= To: /dev/mmcblk1 …
7496278016 bytes (7.5 GB, 7.0 GiB) copied, 752 s, 10.0 MB/s
0+606133 records in
0+606133 records out
7516192768 bytes (7.5 GB, 7.0 GiB) copied, 761.375 s, 9.9 MB/s
= Writing image complete!
Warning: Error fsyncing/closing /dev/mmcblk1: Input/output error
= Resizing /dev/mmcblk1 …
sfdisk: /dev/mmcblk1: cannot modify partition 3: no partition table was found
sfdisk: /dev/mmcblk1: cannot modify partition 3: no partition table was found
Error: mount /dev/mmcblk12 /tmp/boot failed

I might use an sd card reader in a different laptop instead of the built-in sd card slot.

Ah, built in card reader. –

No wonder it always shows as mmcblk1. I suspect the mmcblk0 is reserved for the full size sd card slot. I had a usb card reader that did similar with 2 slots. My newest one does not do that.

If you use a usb card reader it likely will show the sd card as a standard flash drive designation (/dev/sdX) instead of /dev/mmcblk1. Other than that everything else should be the same.

1 Like

@computersavvy as expected, writing to the sd card worked fine using the sd card reader. Just to sum up

  1. Change directory to cd Downloads (where the raw image is downloaded)
  2. Plug in the card reader with the card in it
  3. Check the device / partitions by $ lsblk
    No partitions identified.
  4. $ sudo fdisk -l
    Disk /dev/sda: 29.81 GiB, 32010928128 bytes, 62521344 sectors
    Disk model: MassStorageClass
  5. Clean up anything that may have been corrupted by prior attempts with
dd if=/dev/zero of=/dev/sda  bs=1024 count=1
  1. Write the image to the device using the ARM image writer.
$ sudo arm-image-installer --image=Fedora-Server-35-1.2.armhfp.raw.xz --media=/dev/sda --resizefs

7516192768 bytes (7.5 GB, 7.0 GiB) copied, 227.91 s, 33.0 MB/s

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1230847 1228800 600M 6 FAT16
/dev/sda2 1230848 3327999 2097152 1G 83 Linux
/dev/sda3 3328000 62521343 59193344 28.2G 8e Linux LVM

= Installation Complete! Insert into the board and boot.

It is booted up okay. I didn’t create a user name and moved to the login prompt.

Question: On the fedora login prompt/password what should I enter?

Thanks for being patient with me, much appreciated.

I’ll continue next steps: remote access for headless set-up, networking/config, storage/RAID, SAMBA share, rdiff, and Cockpit.

1 Like

You skipped the step to create a user name thus cannot log in. You have to have an active user account in order to log in to the server.

I believe, when first booting up, you get an initial setup dialogue.
There you can set your computer name, interface config, user and things I don’t remember.
The network time comes to mind.
This is at least with the pi 4 the case.

But one shouldn’t quit this dialogue before setting up an account.

1 Like

… Three years later …

The arm-imager doesn’t seem to work on SilverBlue right now (I’m on Aurora-dx), so the process of creating a bootable Fedora arm image is a maze of twisty passages, all different.
At this point, I’m tempted to stay with Debian on the pi because that takes 5 mins and this it just going to be n Ansible control server.

Please do not reopen necro threads that already have a solution.
I am closing this one and if you need to discuss an issue with your current problem open a new thread. 3 years ago fedora 35 would have been the current platform.