From 1da743cc4ea0dc344e46d3f760ccdfec5c9baecf Mon Sep 17 00:00:00 2001 From: nl6720 Date: Sat, 18 Feb 2023 12:39:27 +0200 Subject: README.transfer.rst: update instructions Convert the file to reStructuredText markup. Fixes #39. Rewrite the instructions where possible or otherwise update them. E.g. fix the changed boot loader paths, etc. The "Manual formatting (BIOS only)", previosly "PC-BIOS (ISOHYBRID-MBR)", method is not tested and it is not clear if it still even works. --- docs/README.transfer.rst | 212 +++++++++++++++++++++++++++-------------------- 1 file changed, 122 insertions(+), 90 deletions(-) (limited to 'docs') diff --git a/docs/README.transfer.rst b/docs/README.transfer.rst index f366061..ab99b10 100644 --- a/docs/README.transfer.rst +++ b/docs/README.transfer.rst @@ -1,133 +1,165 @@ -INDEX ------ +============================================== +Transfer ISO to target medium (configs/releng) +============================================== -* Transfer ISO file to target medium (configs/releng) - * To -> CD / DVD / BD - * To -> USB-key / SD / HDD / SSD - * PC-BIOS (MBR) - * PC-BIOS (ISOHYBRID-MBR) - * PC-EFI (GPT) [x86_64 only] - * PC-EFI (ISOHYBRID-GPT) [x86_64 only] +ISO images names consist of: ``archlinux-YYYY.MM.DD-x86_64.iso``. +Where: ``YYYY`` is the year, ``MM`` the month and ``DD`` the day. +.. contents:: -*** Transfer ISO image to target medium (configs/releng) +Burn to an optical disc +======================= -ISO images names consist of: archlinux-..
-x86_64.iso + .. note:: + All ISO images are BIOS and UEFI bootable via "El Torito" in no-emulation mode. -Where: - Year - Month -
Day +Burn the ISO using your favorite disc burning program. +For example: -** To -> CD / DVD / BD +.. code:: sh -Note: All ISO images are booteable on a PC-BIOS via "El Torito" in no-emulation mode, - All x86_64 ISO images are booteable on a PC-EFI via "El Torito" in no-emulation mode. + xorriso -as cdrecord -v -sao dev=/dev/sr0 archlinux-YYYY.MM.DD-x86_64.iso + +Write to an USB flash drive / memory card / hard disk drive / solid state drive / etc. +====================================================================================== + + .. tip:: + See https://wiki.archlinux.org/title/USB_flash_installation_medium for more detailed instructions. Nomeclature: - scsibus number - target number - lun number - (Note: see cdrecord -scanbus, for these numbers) +```` + Device node of the drive where ISO contents should be copied (example: ``/dev/sdx``). +```` + Device node of the partition on ```` (example: ``/dev/sdx1``). +```` + Represents the file system label of the ``archlinux-YYYY.MM.DD-x86_64.iso`` (example: ``ARCH_201703``). -1) Write it directly using your favorite recording program. -# cdrecord dev=,, -dao archlinux-..
-x86_64.iso +ISOHYBRID (BIOS and UEFI) +------------------------- + .. note:: + This method is the most easily, quick and dirty, but is the most limited if you want to use your target medium + for other purposes. If using this does not work, use the `File system transposition (UEFI only)`_ method instead. -** To -> USB Flash Drive (USB-key) / Memory card (SD) / - Hard-Disk Drive (HDD) / Solid-State Drive (SSD) +Directly write the ISO file to the target medium: -Note: These steps are the general workflow, you can skip some of them, - using another filesystem if your bootloader supports it, - installing to another directory than "arch/" or using more than - one partition. Just ensure that main boot params options - (archisolabel= and archisobasedir=) are set correctly according to your setup. +.. code:: sh -Nomeclature: -: Device node of the drive where ISO contents should be copied - (example: /dev/sdx) -: Device node of the partition on - (example: /dev/sdx1) -: Mount point path where is mounted - (example: /mnt/sdx/1) -: Path to the ISO file archlinux-..
-x86_64.iso - (example: ~/archlinux-2017.03.01-x86_64.iso) -: Represents the filesystem label of the - (example: ARCH_201703) + dd bs=4M if=archlinux-YYYY.MM.DD-x86_64.iso of= conv=fsync oflag=direct status=progress + +File system transposition (UEFI only) +-------------------------------- + +This method extracts the contents of the ISO onto a prepared UEFI-bootable volume. + +If your drive is already partitioned and formatted, skip to the "Mount the target file system" step. + + .. note:: + Using MBR with one FAT formatted active partition is the most compatible method. + +1. Partition the drive with *fdisk*. + + .. code:: sh + + fdisk + + 1) Create a new MBR partition table with command ``o``. + + .. warning:: + This will destroy all data on the drive. + + 2) Create a new primary partition with command ``n`` and set its type code to ``0c`` with command ``t``. + + 3) Mark the partition as bootable with the ``a`` command. + + 4) Write the changes and exit with ``w``. + +2. Format the newly created partition to FAT32 + + .. code:: sh + + mkfs.fat -F 32 /dev/disk/by-id/-part1 + +3. Mount the target file system + + .. code:: sh + + mount /mnt + +4. Extract the ISO image on the target file system. + + .. code:: sh + + bsdtar -x --exclude=boot/syslinux/ -f archlinux-YYYY.MM.DD-x86_64.iso -C /mnt + +5. Unmount the target file system. + + .. code:: sh + + umount /mnt + +Manual formatting (BIOS only) +----------------------------- + .. note:: + These steps are the general workflow, you can skip some of them, using another file system if your boot loader + supports it, installing to another directory than ``arch/`` or using more than one partition. Just ensure that + main boot parameters (``archisolabel=`` and ``archisobasedir=``) are set correctly according to your setup. -* PC-BIOS (MBR): + Using here a MBR partition mode as example, but GPT should also work if the machine firmware is not broken. Just + ensure that partition is set with attribute ``2: legacy BIOS bootable`` and use ``gptmbr.bin`` instead of + ``mbr.bin`` for syslinux. -Note: Using here a MBR partition mode as example, but GPT should also works - if machine firmware is not broken. - Just ensure that partition is set with attribute "2: legacy BIOS bootable" - and use gptmbr.bin instead of mbr.bin for syslinux. +1) Create one partition entry in MBR and mark it as "active" (bootable). -1) Create one partition entry in MBR and mark it as "active" (booteable). -Note: Type "b" for FAT32, "83" for EXTFS or "7" for NTFS. -# fdisk + .. note:: + Type ``b`` for FAT32, ``83`` for EXTFS or ``7`` for NTFS. -2) Create a FAT32, EXTFS or NTFS filesystem on such partition and setup a label. -Note: COW is not supported on NTFS. -# mkfs.fat -F 32 -n -# mkfs.ext4 -L -# mkfs.ntfs -L + .. code:: sh -3) Mount target filesystem. -# mount + fdisk -4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=EFI/ --exclude=loader/ -f -C +2) Create a FAT32, EXTFS or NTFS file system on such partition and setup a label. -5) Install syslinux bootloader on target filesystem. -# extlinux -i /arch/boot/syslinux + .. note:: + COW is not supported on NTFS. -6) Unmount target filesystem. -# umount + .. code:: sh -7) Install syslinux MBR boot code on target drive. -# dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of= + mkfs.fat -F 32 -n + mkfs.ext4 -L + mkfs.ntfs -L +3) Mount the target file system. -* PC-BIOS (ISOHYBRID-MBR): + .. code:: sh -Note: This method is the most easily, quick and dirty, but is the most limited - if you want to use your target medium for other purposes. - If using this does not work, use PC-BIOS (MBR) method instead. + mount /mnt -1) Dump ISO file to target medium. -# dd if= of= +4) Extract the ISO image on the target file system. + .. code:: sh -* PC-EFI (GPT) [x86_64 only] + bsdtar -x --exclude=boot/grub/ --exclude=EFI/ -f archlinux-YYYY.MM.DD-x86_64.iso -C /mnt -Note: Using here a GPT partition mode as example, but MBR should also works - if machine firmware is not broken. +5) Install the syslinux boot loader on the target file system. -1) Create one partition entry in GPT (of type "ef00") -# gdisk + .. code:: sh -2) Create a FAT32 filesystem on such partition and setup a label. -# mkfs.fat -F 32 -n + extlinux -i /mnt/boot/syslinux -3) Mount target filesystem. -# mount +6) Unmount the target file system. -4) Extract ISO image on target filesystem. -# bsdtar -x --exclude=isolinux/ --exclude=EFI/archiso/ --exclude=arch/boot/syslinux/ -f -C + .. code:: sh -5) Unmount target filesystem. -# umount + umount /mnt +7) Install syslinux MBR boot code on the target drive. -* PC-EFI (ISOHYBRID-GPT) [x86_64 only] + .. code:: sh -Note: This method is the most easily, quick and dirty, but is the most limited - if you want to use your target medium for other purposes. - If using this does not work, use PC-EFI (GPT) method instead. + dd bs=440 count=1 conv=notrunc if=/usr/lib/syslinux/bios/mbr.bin of= -1) Dump ISO file to target medium. -# dd if= of= -- cgit v1.2.3-70-g09d2