dch revised this gist . Go to revision
1 file changed, 2 insertions
sideloading-alpha3.md
| @@ -4,9 +4,11 @@ | |||
| 4 | 4 | - sync base packages | |
| 5 | 5 | - sync ports packages | |
| 6 | 6 | ||
| 7 | + | ``` | |
| 7 | 8 | # pkg prime-origins | sort | uniq > /etc/packages.lst | |
| 8 | 9 | # pkg fetch -yr FreeBSD-base -do /var/tmp/base -g FreeBSD-\* | |
| 9 | 10 | # pkg fetch -yr FreeBSD -do /var/tmp/pkg $(grep -v \# /etc/packages.lst) | |
| 11 | + | ``` | |
| 10 | 12 | ||
| 11 | 13 | - make a `pkg-base.conf` and a `pkg.conf` to use from these downloads | |
| 12 | 14 | ||
dch revised this gist . Go to revision
1 file changed, 79 insertions
sideloading-alpha3.md(file created)
| @@ -0,0 +1,79 @@ | |||
| 1 | + | # sideloading with pkgbase | |
| 2 | + | ||
| 3 | + | - stash a list of packages | |
| 4 | + | - sync base packages | |
| 5 | + | - sync ports packages | |
| 6 | + | ||
| 7 | + | # pkg prime-origins | sort | uniq > /etc/packages.lst | |
| 8 | + | # pkg fetch -yr FreeBSD-base -do /var/tmp/base -g FreeBSD-\* | |
| 9 | + | # pkg fetch -yr FreeBSD -do /var/tmp/pkg $(grep -v \# /etc/packages.lst) | |
| 10 | + | ||
| 11 | + | - make a `pkg-base.conf` and a `pkg.conf` to use from these downloads | |
| 12 | + | ||
| 13 | + | ``` | |
| 14 | + | # /usr/local/etc/pkg/repos/base.conf | |
| 15 | + | base: { | |
| 16 | + | url: "file:///var/tmp/base/${ABI}/latest/", | |
| 17 | + | mirror_type: none, | |
| 18 | + | enabled: yes | |
| 19 | + | } | |
| 20 | + | ``` | |
| 21 | + | ||
| 22 | + | ``` | |
| 23 | + | # /usr/local/etc/pkg/repos/pkg.conf | |
| 24 | + | pkg: { | |
| 25 | + | url: "file:///var/tmp/pkg/", | |
| 26 | + | mirror_type: none, | |
| 27 | + | enabled: yes | |
| 28 | + | } | |
| 29 | + | ``` | |
| 30 | + | ||
| 31 | + | - create an empty BE | |
| 32 | + | ||
| 33 | + | ``` | |
| 34 | + | # zfs create -o canmount=noauto -o mountpoint=/ zroot/ROOT/fifteen | |
| 35 | + | # bectl mount fifteen /mnt | |
| 36 | + | # mkdir -p /mnt/tmp /mnt/dev /mnt/var/cache | |
| 37 | + | # mount -t devfs devfs /mnt/dev | |
| 38 | + | # mount -t tmpfs tmpfs /mnt/tmp | |
| 39 | + | # mount -t tmpfs tmpfs /mnt/var/cache | |
| 40 | + | ``` | |
| 41 | + | ||
| 42 | + | - install base system again | |
| 43 | + | ||
| 44 | + | ``` | |
| 45 | + | # pkg -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:15:amd64 --rootdir /mnt install -r base -g FreeBSD-\* | |
| 46 | + | ``` | |
| 47 | + | ||
| 48 | + | - fix up loader.* | |
| 49 | + | ||
| 50 | + | ``` | |
| 51 | + | # cp -av /boot/loader.conf /mnt/boot/ | |
| 52 | + | # cp -av /mnt/boot/loader.efi /boot/efi/EFI/Boot/bootx64.efi | |
| 53 | + | ``` | |
| 54 | + | ||
| 55 | + | - and etc | |
| 56 | + | ||
| 57 | + | ``` | |
| 58 | + | # cd /etc | |
| 59 | + | # git init . && git add . && git commit -am sideloading | |
| 60 | + | # cd /mnt | |
| 61 | + | # mv /mnt/etc /mnt/etc.dist | |
| 62 | + | # cp -av /etc /mnt/ | |
| 63 | + | # cp -av /mnt/etc.dist//mnt/ | |
| 64 | + | # cd /mnt/etc | |
| 65 | + | ### repeat until you're happy | |
| 66 | + | # git diff ... | |
| 67 | + | # git restore ... | |
| 68 | + | # git commit ... | |
| 69 | + | ``` | |
| 70 | + | ||
| 71 | + | - install packages from cache | |
| 72 | + | ||
| 73 | + | ``` | |
| 74 | + | pkg -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:15:amd64 --rootdir /mnt install $(grep -v \# /etc/packages.lst) | |
| 75 | + | ``` | |
| 76 | + | ||
| 77 | + | Repeat the `/etc` git dance with `/usr/local/etc/` again | |
| 78 | + | ||
| 79 | + | reboot | |