[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 02:42:31 UTC 2019


On 11/5/19 9:11 PM, Hongyi Zhao via arch-general wrote:
>>> $ sudo ddrescue -f archlinux-2019.11.01-x86_64.iso /dev/sdc2
>> The ISO contains multiple partitions, so probably not.
> 
> Why when using the whole usb disk, the problem will disappear?
> 

As both Eli and I have both explained, because if you use the whole disk
you're writing a partition table as *the partition table for the
device*. If you try to write to a partition, you end up with nested
partition tables. The .iso file is a *disk image*, not a *partition image*.

>> Why are you
>> trying to do this, precisely?
> 
> I want to use a usb disk for installation of multiple distros, say,
> Debian, Ubuntu, Arch, and so on.
> In this case, I must not using the whole usb disk for only one iso,
> and on the other hand, using whole usb disk for only one iso, is
> wasting of the usb's space, considering that we cannot use it for
> doing other things.  Furthermore, I noticed that the dd-based method
> is more robust than using the iso directly with grub's loopback
> module.

In what way? I do not agree with this. It's far easier to update the
ISO, it's far easier to add new distributions to the bootloader (and
both updating and adding new entries can even be done by regular users
without granting disk reformatting permissions), etc. with grub loopback.

> To say the least, for the Debian iso, the dd-based method can do the
> trick while the loopback method will fail to detect the cd-rom during
> the installation progress.

Are you using the appropriate kernel cmdline args in the menu entry?
They're different from Arch's grub loopback menu entry.

https://wiki.debian.org/DebianLive/MultibootISO

> 
>>
>> Alternatively, you can use grub to boot an ISO *file* as a loopback
>> device. Some people do this to create multiboot USBs.
> 
> As I said above, this method is not so robust as the dd-based method.
>  In detail, the most robust method for using  the usb disk to
> installation a unix/linux OS, should be the dd-based method which
> using the whole usb disk.  But this method has the shortcoming that it
> will occupy the whole usb disk with only a small iso image and
> prohibit us for using the usb disk to do other things at the same
> time.

This seems highly subjective. What makes using DD superior to a
loopback? It occupies the same exact disk space as if you dd'd to a
partition except requires no modifications to the host disk.

Now, if you *really* want to save space, you'd extract the squashed
filesystems/initrds/kernels from each ISO you want to add and create
grub entries that boot those directly, but that only affords you a
couple extra megabytes per distribution. However, *that is not what grub
loopback is*. Grub boots an iso file *directly*, with no modifications
required. I guarantee it's far more maintainable and robust than any use
of dd.

-- 
brent saner
https://square-r00t.net/
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/d1d14a4a/attachment.sig>


More information about the arch-general mailing list