[arch-general] How to install archlinux using a specific parition of usb instead of the whole usb?

brent s. bts at square-r00t.net
Wed Nov 6 01:49:23 UTC 2019

On 11/5/19 8:35 PM, Hongyi Zhao via arch-general wrote:
> Hi,
> I try to use a specific partition of usb to install archlinux, the
> following is the step:
> Suppose the /dev/sdc is my usb:
> $ sudo ddrescue -f archlinux-2019.11.01-x86_64.iso /dev/sdc2
> Then I reboot my computer with the grub standalone bootloader and from
> within the command line of grub, I do the following:
> Suppose the (hd2,2) is the partition which corresponding to the
> /dev/sdc2, then I run the following   commands:
> grub> set root=hd2,2
> grub> chainloader /EFI/boot/bootx64.efi
> grub> boot
> But, the above step failed to boot, with the error similar to this in my ming:
> Failed to find the loader.efi
> OTOH, if I dd'ed the arch iso onto the whole usb disk like the following:
> $ sudo ddrescue -f archlinux-2019.11.01-x86_64.iso /dev/sdc
> Then, it will be successfully booted into the installation menu of
> archlinux.  So I want to know whether is is possible for me to use a
> specific partition of usb instead of the whole usb disk for
> installation archlinux?
> Regards

The biggest issue is this doesn't work because the ISO file *already
has* partitions/a partition table on it (which is what lets you DD
directly onto a block device rather than requiring partitioning of the
target device first):

[bts at cylon tmp]$ sudo kpartx -l archlinux-2019.11.01-x86_64.iso
  Warning: Disk has a valid GPT signature but invalid PMBR.
  Assuming this disk is *not* a GPT disk anymore.
  Use gpt kernel option to override.  Use GNU Parted to correct disk.
loop0p1 : 0 1300480 /dev/loop0 0
loop0p2 : 0 131072 /dev/loop0 164

[bts at cylon tmp]$ sfdisk -l archlinux-2019.11.01-x86_64.iso
Disk archlinux-2019.11.01-x86_64.iso: 635 MiB, 665845760 bytes, 1300480
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x65cc13ea

Device                           Boot Start     End Sectors  Size Id Type
archlinux-2019.11.01-x86_64.iso1 *        0 1300479 1300480  635M  0 Empty
archlinux-2019.11.01-x86_64.iso2        164  131235  131072   64M ef EFI

[bts at cylon tmp]$ parted --script archlinux-2019.11.01-x86_64.iso -- print
Model:  (file)
Disk /tmp/archlinux-2019.11.01-x86_64.iso: 666MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 2      84.0kB  67.2MB  67.1MB  primary  fat16        esp

brent saner
GPG info: https://square-r00t.net/gpg-info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20191105/a37c8d24/attachment.sig>

More information about the arch-general mailing list