Install packages from a FreeBSD installer DVD – with neither a DVD nor a network connection
Install packages from a FreeBSD installer DVD – with neither a DVD nor a network connection
Related: Write to a USB drive from the URL of a compressed disc image.
The example below assumes that your USB drive is at /dev/da0
.
Run commands as the superuser.
mkdir /media/aninstaller
mount_cd9660 /dev/da0 /media/aninstaller
mkdir -p /usr/local/etc/pkg/repos
ee /usr/local/etc/pkg/repos/aninstaller.conf
pkg bootstrap --yes -r aninstaller
pkg update --repository aninstaller
pkg rquery -r aninstaller "%o%n" | sort | less
You'll get a list of available packages. Key q to quit the pager.
Then use pkg
as you normally would, but limited to the aninstaller
repo. For example:
pkg install -r aninstaller firefox
Content for the aninstaller.conf
file:
aninstaller: {
url: "file:////media/aninstaller/packages/FreeBSD:14:amd64",
REPO_AUTOUPDATE: "false",
mirror_type: "none",
enabled: yes
}
Important: switch from yes
, to no
, after temporarily using the USB drive as a source for the repo.
Some manual pages:
Interesting, thank you for sharing this.
2 0 ReplyAt https://www.freebsdmall.com/cgi-bin/fm/bsddvd14.1:
… How to install packages from the disc: …
Plus, there's a simpler, three-step routine if using the medium (not necessarily a disc) after installation of the OS – before exiting the installer.
- In the Manual Configuration dialogue, choose Yes
/bin/csh
setenv REPOS_DIR /dist/packages/repos
– then use
pkg
commands as normal.You'll have the DVD repo alone – with an archaic name,
FreeBSD_install_cdrom
– none of the online repos. This offline repo includes things such as graphics/drm-515-kmod, but not things such as x11/nvidia-driver. We can't have everything offline in this way, DVD image space is constrained.When you want no more from the offline DVD repo:
exit
– then, if an Internet connection was gained during installation, online repos will be available.
1 0 Reply