[arch-general] How to install archlinux using a specific parition of usb instead of the whole usb?
hongyi.zhao at gmail.com
Wed Nov 6 04:31:47 UTC 2019
brent s. <bts at square-r00t.net> 于2019年11月6日周三 上午10:42写道：
> 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?
See the following partition method and settings on my usb stick:
werner at debian-01:~$ sudo sfdisk -l /dev/sdc
Disk /dev/sdc: 114.6 GiB, 123010547712 bytes, 240254976 sectors
Disk model: Ultra USB 3.0
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: gpt
Disk identifier: BB18A52C-1382-4003-B6CF-CE137E913145
Device Start End Sectors Size Type
/dev/sdc1 2048 6143 4096 2M BIOS boot
/dev/sdc2 6144 210943 204800 100M EFI System
/dev/sdc3 210944 164050943 163840000 78.1G Linux filesystem
/dev/sdc4 188954624 191002623 2048000 1000M Linux filesystem
/dev/sdc5 191002624 199194623 8192000 3.9G Linux filesystem
/dev/sdc6 199194624 213530623 14336000 6.9G Linux filesystem
/dev/sdc7 213530624 215578623 2048000 1000M Linux filesystem
/dev/sdc8 215578624 218650623 3072000 1.5G Linux filesystem
/dev/sdc9 218650624 223361023 4710400 2.3G Linux filesystem
/dev/sdc10 223361024 234010623 10649600 5.1G Microsoft basic data
sdc1: bios_grub for grub booting with gpt
sdc2: EFI diretory
sdc3: boot diretory
sdc4- : dd-based iso images
>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.
> >> 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
> GPG info: https://square-r00t.net/gpg-info
Hongsheng Zhao <hongyi.zhao at gmail.com>
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493
More information about the arch-general