You are not logged in.
An offline (100% no internet connection) installation of Arch Linux from/off of a USB storge medium device
Offline ("local"), custom repository, stored on a USB device
The "CacheDir" option will error out if "." is used instead of a fully qualified path; E.G: --cachedir = /foo/bar/ vs --cachedir = . (produces an error)
Mounted a USB storage medium device (FAT32 and EXT4 filesystems, respectively), verified with lsblk and executed the following:
mkdir /usb/foobar
cd /usb/foobar
pacman -Syw --cachedir /usb/foobar --dbpath /usb/foobar iw
repo-add $PWD/custom.db.tar.zst $PWD/*.pkg.tar.zst
Rebooted into the functional live Arch Linux USB and attempted to install the package (Intel Wireless; iw) offline via:
pacman -Sy iw
Archlinux keyring out of date; no internet connection found
A quick reboot, amendment of archlinux-keyring and a retry later yields similar results (package verification/signature necessary; attempts to use the internet).
The pacman.conf on both the non-live install (harddrive/solid state drive) and live install (USB device) were modified; no sandbox, installing user is a real user (not alpm); the custom repo was enabled with the path modified and the block (order of repositories are linear; top to bottom; ascending order) reordered.
Suggestions of other methods (E.G: archinstall, squshfs, archiso, abs, etc
Suggestions of how to format/reformat my post/thread
An inquisition as to my decision making or reasons for selecting this particular method
A solution to using pacman, repo-add and a USB storage medium using the latest Arch Linux live ISO in conjunction with my preferred packages on an alternate partition ('persistent data' / 'modifiable USB') on the same USB storage device (simplified: Partition A contains the live Arch Linux ISO and partition B contains Nth GB/TB of read-write data).
Thank you very much in advance!
Step 1. Creating a repository
CREATE A "custom" repository for localized (offline/intranet/internet) use
pacman -Syw --cachedir /mnt/foobar/cache --dbpath /tmp/blankdb base linux linux-firmware
Step 2a. Adding packages and package signatures
repo-add /var/pacman/cache *.ztd *.sig
Step 2b. Editing pacman configuration file
CREATE a custom repo (referred in /etc/pacman.conf literally as [NAME])
cd /var/pacman/cache (where all desired packages to be copied/saved/added/used are)
repo-add ./custom.db.tar.zst ./*[^sig]
Step 3. Editing pacman configuration file
MODIFY /etc/pacman.conf
/etc/pacman.conf "custom" is the "custom.db.tar.zst" file's name (as long as the filename matches: Everything works; pick what pleases you)
[custom]
SigLevel = Optional
Server = file:///mnt/foobar
Step 4. Using your custom repo for offline installation
FROM A live USB run: You can (100% offline) install ALL desired packages as usual
pacstrap -K /mnt base linux linux-firmware
Motherboard (CMOS/BIOS) time, system time (Arch Linux's timedatectl or hwclock) must agree and must agree with the file timestamps (inode meta data can be affected by ext3/ext4 options)
archlinux-keyring MUST be up-to-date (pacman -S archlinux-keyring)
pacman-key --init / populate / refresh should be ran AFTER archlinux-keyring (offline ONLY) is updated
Absolute paths (see: echo $PWD) must be used instead of relative paths (see: .) until the bugfix is posted
User ALPM, sandbox, signature requirements and other related options should not cause a problem anymore; the repo can be stored on the USB itself or a storage medium or an intranet; pacman version 7+ was tested successfully under multiple conditions.
100% no internet connection required
Last edited by foobarDestroyer (Yesterday 00:29:06)
Offline
paraphrased from memory … pacman.conf on both the non-live install (harddrive/solid state drive) and live install (USB device) were modified … package verification/signature necessary; attempts to use the internet
https://bbs.archlinux.org/viewtopic.php?id=57855
How is anyone supposed to tell you why an unspecific setup fails with an undisclosed error?
"Because you did it wrong."
Start by posting the actual outputs reg. the problems you face.
Online
From another machine running Arch Linux with an internet connection, you can quickly create a custom repository and install the packages in just a few seconds.
mkdir repo && cd repo || exit 1
cp /var/cache/pacman/pkg/* .
repo-add ./custom.db.tar.gz ./*[!sig]
Transfer this folder to a external medium and uncomment the following settings in /etc/pacman.conf:
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
[custom]
SigLevel = Optional TrustAll
Server = file:///repo
You have to comment the core and extra repositories configuration too.
Offline
Step 1. Creating a repository
CREATE A "custom" repository for localized (offline/intranet/internet) use
pacman -Syw --cachedir /mnt/foobar/cache --dbpath /tmp/blankdb base linux linux-firmware
Step 2a. Adding packages and package signatures
repo-add /var/pacman/cache *.ztd *.sig
Step 2b. Editing pacman configuration file
CREATE a custom repo (referred in /etc/pacman.conf literally as [NAME])
cd /var/pacman/cache (where all desired packages to be copied/saved/added/used are)
repo-add ./custom.db.tar.zst ./*[^sig]
Step 3. Editing pacman configuration file
MODIFY /etc/pacman.conf
/etc/pacman.conf "custom" is the "custom.db.tar.zst" file's name (as long as the filename matches: Everything works; pick what pleases you)
[custom]
SigLevel = Optional
Server = file:///mnt/foobar
Step 4. Using your custom repo for offline installation
FROM A live USB run: You can (100% offline) install ALL desired packages as usual
pacstrap -K /mnt base linux linux-firmware
Motherboard (CMOS/BIOS) time, system time (Arch Linux's timedatectl or hwclock) must agree and must agree with the file timestamps (inode meta data can be affected by ext3/ext4 options)
archlinux-keyring MUST be up-to-date (pacman -S archlinux-keyring)
pacman-key --init / populate / refresh should be ran AFTER archlinux-keyring (offline ONLY) is updated
Absolute paths (see: echo $PWD) must be used instead of relative paths (see: .) until the bugfix is posted
User ALPM, sandbox, signature requirements and other related options should not cause a problem anymore; the repo can be stored on the USB itself or a storage medium or an intranet; pacman version 7+ was tested successfully under multiple conditions
The Arch Linux installation can be entirely automated with minimal human interraction covering swaths of exponentally (N ^ 23 or so) different configurations using an overly simplified [key = value] dichtonomous set of options (nested when applicable) or an overly complicated yet acceptable JSON format (XML) style document to refer to all nestable options (BIOS/UEFI/Secure Boot/MBR/GPT/NVRAM firmware direct boot/intermediate bootloader/encrypted options/Linux kernels/unified kernel image/kernel options/kernel boot options/custom kernel/X/Wayland/terminal/WM/DE/packages stored (uninstalled)/packages installed (explicit/automatic/order controlled for later managerial usage)/multi-boot system (UNIX/Linux/Windows/emulator/other); this is not an all inclusive list.
Essentially hardware related packages (bloatware, effectively if not tailored to a target audience) can be automatically installed and configured in an ascending order for security sake as well as raw performance; makepkg, pacman and custom solutions are no exception; esentially a serverless, single-user desktop Wayland system can be automatically installed and fully configured from scratch from beginning to end in under 2min (with custom, high security/special CPU instruction set gcc/clang/other compiler/linker options); preferred binaries (official, AUR and other) are no exception.
A fully functional commercial enterprise (intranet) workstation environment (N * Y machines) can be simultaneously powered on remotely (PXE-boot) while offline and blank slates and configured to be as secure as possible (up to and including generalized client-level firewall settings and complex SYSLinux/AppArmor/PAM settings per general 'office worker category' topologically crafted).
A much lengthier version will not be posted after much consideration.
Thank you... This is 100% possible without any secondary machine using the internet nor even a primary machine at any point.
I hope this helps.
Last edited by foobarDestroyer (Yesterday 00:25:50)
Offline