You are not logged in.
Is there any simple way of adding a script to installation process without internet access or archiso?
After extraction of archlinux-2022.01.01-x86_64.iso to arch directory I tried "xorrisofs -V "ARCH_202201" -J -r -o archlinux.iso arch/"
or to add my script directly to archlinux.iso "xorriso archlinux-2022.01.01-x86_64.iso -add my_script.sh"
Newly created iso is not bootable and while running from usb stick there is information about missing OS. Untouched archlinux.iso is bootable.
https://bbs.archlinux.org/viewtopic.php?id=159414 same problem here, but solution is unclear.
Last edited by sliz (2022-01-16 13:57:45)
Offline
Do you actually need it to be an .iso file that you can then reburn to other usbs? Or do you just want the result of burning the iso to a flash drive but with your additional script(s)? If the latter, this approach is likely the best.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I believe that the latest versions of the iso have cloud-init installed, you could use that to initially configure your machine and copy a file over.
Offline
@Trilby
It's good solution because pendrive is booting fine, but where should I put my little installation script to be accessible while installation?
Offline
Hi,
sliz wrote:
> to add my script directly to archlinux.iso
> "xorriso archlinux-2022.01.01-x86_64.iso -add my_script.sh"
With this line xorriso should complain
xorriso : FAILURE : Not a known command: 'archlinux-2022.01.01-x86_64.iso'Well, probably you already used command -dev with parameter
archlinux-2022.01.01-x86_64.iso . In this case you only have to tell
xorriso to keep the boot equipment as is:
cp archlinux-2022.01.01-x86_64.iso my_arch-2022.01.01.iso
xorriso -dev my_arch-2022.01.01.iso \
-boot_image any keep \
-add my_script.sh --(I add "--" for didactical reasons. End-of-arguments serves the same
purpose of terminating the parameter list of command -add.
For more control over the path in the ISO, consider command -map)
Then compare the boot equipment of the original ISO with the equipment
of my_arch-2022.01.01.iso. At the same time verify that /my_script.sh
is in my_arch-2022.01.01.iso:
xorriso -indev archlinux-2022.01.01-x86_64.iso \
-report_el_torito plain -report_system_area plain
xorriso -indev my_arch-2022.01.01.iso \
-report_el_torito plain -report_system_area plain \
-lsdl /my_script.sh --Have a nice day ![]()
Thomas
Offline
... where should I put my little installation script to be accessible while installation?
Wherever you want. /root/ (the root users home directory) would make the most sense to me. Or you could put it in /usr/bin and it'd be able to run just like any other executable.
Last edited by Trilby (2022-01-15 22:05:10)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hi,
it turns out that -boot_image "any" "keep" does not yield a valid EFI
partition with the new partition layout of archlinux-2022.01.01-x86_64.iso.
(I will have to investigate whether this can be fixed in xorriso.)
A better result is achived by letting xorriso copy the ISO and
replay the found boot equipment:
# Remove target ISO if it already exists
test -f my_arch-2022.01.01.iso && rm my_arch-2022.01.01.iso
# Build new my_arch-2022.01.01.iso from original ISO
xorriso -indev archlinux-2022.01.01-x86_64.iso \
-outdev my_arch-2022.01.01.iso \
-add my_script.sh -- \
-boot_image any replay --Have a nice day ![]()
Thomas
Offline
@scdbackup
Hey,
you are right about -dev one, I just copied wrong one from history. My script is added, but system is not booting from pendrive. Here are all differences between arch.iso and my_arch.iso
xorriso : UPDATE : 109 nodes read in 1 seconds | xorriso : UPDATE : 110 nodes read in 1 seconds
Drive current: -indev 'archlinux-2022.01.01-x86_64.iso' | Drive current: -indev 'my_arch-2022.01.01.iso'
Boot record : El Torito , MBR isohybrid cyl-align-all GPT | Boot record : El Torito , MBR isohybrid cyl-align-off GPT
Media summary: 1 session, 442534 data blocks, 864m data, 28. | Media summary: 1 session, 442642 data blocks, 865m data, 28.
El Torito catalog : 118 1 | El Torito catalog : 442639 1
System area options: 0x00000302 | System area options: 0x00000202
System area summary: MBR isohybrid cyl-align-all GPT | System area summary: MBR isohybrid cyl-align-off GPT
ISO image size/512 : 1770136 | ISO image size/512 : 1770568
MBR partition : 1 0x80 0x00 64 16178 | MBR partition : 1 0x00 0xcd 64 17705
MBR partition : 2 0x00 0xef 1617920 1515 <Offline
sliz wrote:... where should I put my little installation script to be accessible while installation?
Wherever you want. /root/ (the root users home directory) would make the most sense to me. Or you could put it in /usr/bin and it'd be able to run just like any other executable.
And all of that is in airootfs.sfs that I would need to extract somehow and pack it again?
Offline
Hi,
sliz wrote:
> Here are all differences between arch.iso and my_arch.iso
That's the problem which i noticed yesterday after switching the original
ISO from archlinux-2020.10.01-x86_64.iso to archlinux-2022.01.01-x86_64.iso
The original ISOs now have the EFI partition as appended blob and not
as data file in the ISO any more. For some reason - which i still have to
explore - this causes the conversion of the MBR partition table
MBR partition : 1 0x80 0x00 64 1617856
MBR partition : 2 0x00 0xef 1617920 151552to
MBR partition : 1 0x00 0xcd 64 1770504The latter does not mark the FAT filesystem with the EFI boot files.
So EFI does not find them.
The result of above proposal
# Remove target ISO if it already exists
test -f my_arch-2022.01.01.iso && rm my_arch-2022.01.01.iso
# Build new my_arch-2022.01.01.iso from original ISO
xorriso -indev archlinux-2022.01.01-x86_64.iso \
-outdev my_arch-2022.01.01.iso \
-add my_script.sh -- \
-boot_image any replay --yields:
MBR partition : 1 0x80 0x00 64 1617856
MBR partition : 2 0x00 0xef 1617920 151552The size of my test script did fit into the cylinder alignment padding
of the original first partition. So that partition size did not grow.
If my_script.sh is larger, then the partition might grow by 1 MiB.
In spring 2021 there was an Arch ISO layout with pure GPT as partition
table. Very neat. But then some old BIOS firmware showed up which took
the presence of GPT as reason not to boot.
https://bbs.archlinux.org/viewtopic.php?id=264096
Next there were found EFI firmwares which hated a pure MBR partition table.
So the newer arch ISOs are again wild jackalopes with valid MBR table
and invalid but present GPT. The difference to the ISOs from 2020 is
that the EFI partition is not a file in the ISO and thus the two MBR
partitions do not overlap - which they did in 2020 and before.
Have a nice day ![]()
Thomas
Offline
The simplest approach would be using the command line parameter "script=", but that requires a working Internet connection.
Alternatively, as Slithery said, you can use cloud-init. https://wiki.archlinux.org/title/Instal … ess_server explains how to prepare the medium and has examples of "write_files" .
Offline
Thanks for all your help. Here is a solution that is working for me, based on what did you wrote guys:
xorriso -indev archlinux-2022.01.01-x86_64.iso \
-outdev my_arch-2022.01.01.iso \
-add my_script.sh -- \
-boot_image any replay --
sudo dd bs=4M if=my_arch-2022.01.01.iso of=/dev/sdx conv=fsync oflag=direct status=progressin arch-live:
cp /run/archiso/bootmnt/my_script.sh .
./my_script.shThat solution from @Trilby is also perfectly fine (UEFI only). I just needed to find out where is my_script.sh and move it to the root home directory. I could also run script with
. /run/archiso/bootmnt/my_script.shso there is no need to cp/move it anywhere.
Last edited by sliz (2022-01-17 16:07:04)
Offline