I am using MacOS to create a install media. In order to write the image to a USB stick we need to unmount all the filesystems that are located on the device.
diskutil unmount /dev/disk2s1
Here is how we can list all the disks attached to the system
Download isofile from https://archlinux.org/releng/releases/
Writing image to the USB device (notice that we do not write to a partition)
sudo dd if=archlinux-2021.01.01-x86_64.iso of=/dev/disk2
then we can flush data by ejecting the drive
diskutil eject /dev/disk2
Now we can plug the usb to a computer we want to install archlinux on. In my case it is Mac mini. Hold alt (option) button and select the install disk to boot up.
Here are commands to check what discs are attached to the system
cat /proc/partitions ls /dev/[s|x|v]d* lsblk fdisk –l ls /dev | grep ‘^[s|v|x][v|d]’$*
The install disk has free space which we can use (for example to create install scripts in case we use the install disk several times)
Select thf freespace and hit
Now we have unformatted partition. To screate FAT32 execute this commend
mkfs.vfat -F 32 /dev/sdb4
Mount it as home folder mount /dev/sdb4 /root # and go to the new home root cd
# this command was given by arch wiki but do not work for me # https://wiki.archlinux.org/index.php/FAT mount -i -t vfat -oumask=0000,iocharset=utf8 /dev/sdb4 /root
Now I realized I can edit system, so the partition that I have just created I can mount on start. There are steps I took.
Shrink vfat partition to 8000 MiB and place it at the and.
[2: 2.2 GiB]
[3: 59 MiB]
[4: 4000 MiB]
ARCH202101: It is the oryginal partition ISO9660 I had after writing image
CHROOT: This parition will contains files of the installer system. They are placed on Ext4 partition, so we can edit files and regenerate ISO file from it.
Now we copy read only files from read only system to writable partition
sudo mount -o loop /media/artur/ARCH202101/arch/x86_64/airfs.sfs /mnt sudo cp -T /mnt /media/artur/CHROOT