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

Hongyi Zhao hongyi.zhao at gmail.com
Wed Nov 6 05:44:27 UTC 2019


brent s. <bts at square-r00t.net> 于2019年11月6日周三 下午1:15写道:
>
> On 11/6/19 12:01 AM, Hongyi Zhao via arch-general wrote:
> >> menuentry --hotkey=g 'Graphical install' {
> >>         set background_color=black
> >>         linux (loop)/install.amd/vmlinux vga=788 findiso=$iso_path components
> >> --- quiet
> >
> > IMO, this is the most difficult thing to figure out a workable
> > menuentry,  I mean, the follownig code inserted here:
> >
> > findiso=$iso_path components
> >
> > And from where can I find the full manual for this?  I have inspected
> > the following webpage:
> >
> > https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
> >
> > And I cannot find out the parameters/arguments used here: `findiso'
> > and `components'.
>
> "findiso" and "components" are unique to Debian's initialization
> scripts. The ones at
> https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
> are generic ones that the *kernel* uses, but others are used by the OS
> itself during initialization. They're both passed to /proc/cmdline
> (because it's the only reliable way of passing boot-time parameters to
> runtime kernel operations and the initrd/initramfs).
>
> "findiso" is documented here:
> https://manpages.debian.org/testing/live-boot-doc/live-boot.7.en.html
>
> As for "components", I have no idea what it does. You can extract the
> ISO's initrd and check the init system in there, though, to find out.
>
>
> > No, this is not the initial grub.cfg used by the iso when running in
> > the efi mode which is the de-facto nowsdays.  The first grub.cfg used
> > by the iso is:
> >
> > /EFI/debian/grub.cfg
> >
> > This file will then source all of the other grub.cfg, including the
> > one in /boot/grub/grub.cfg, which is the last grub.cfg in the chain.
>
> All that does is call other cfgs and do insmods. Follow the "source"
> directives and you will find that, yes, the one I mentioned is the menu
> config (the one you actually want, because you want to create *menu
> entries*) that is used by the Debian ISO.
>
> You *definitely* will not be able to use the "linking"/parent configs
> because they refer to paths inside the Debian ISO, not your USB drive.

Ok, again I promote the dd-based method here.  If use the dd-based
method, than just do the following:

# changing the ($root)/EFI/debian/grub.cfg as follows to make it more robust:
search --label --set=root 'Debian 10.1.0 amd64 1'
set prefix=($root)/boot/grub
source $prefix/x86_64-efi/grub.cfg

Repack the iso with above changed file and then dd it to usb's
arbitrary partition, and do the following:


grub> set root=(root-of-dd-iso-on-usb-partition)
grub> set prefix=($root)/boot/grub
grub> chainloader /EFI/boot/grubx64.efi
grub> boot

This will let all of the grub.cfg's invoked in order and obtain a
complete same effect with the one done by burning-on-dvd.

But, this method is not so convenient due change and repack the iso.

>
>
> --
> brent saner
> https://square-r00t.net/
> 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 mailing list