You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a pluglist file the argument list should not be quoted (`"`). This is only needed on the command line to keep bash from doing silly things.
38
+
One key benefit of using a pluglist file is the argument list does not need to be quoted (`"`). This is only needed on the command line to keep bash from doing silly things.
39
39
40
40
Plugins are run in the order they are encountered on the command line or the plugin @file,
41
41
@@ -275,7 +275,7 @@ copyfile copies the files into the IMG in /etc/sdm/assets/copyfile during Phase
275
275
#### Examples
276
276
277
277
*`--plugin copyfile:"from=/usr/local/bin/myconf.conf|to=/usr/local/etc"` The config file will be copied from /usr/local/bin/myconf.conf on the host system to /usr/local/etc/myconf.conf in the IMG during Phase1. The file will be owned by the same user:group as on the host, the file protection will be the same as well.
278
-
*`--plugin copyfile:"filelist=/usr/local/bin/`. The list of files in the provided `filelist` will be processed per above.
278
+
*`--plugin copyfile:"filelist=/usr/local/bin/myfileslist"`. The list of files in the provided `filelist` will be processed per above.
279
279
280
280
### cryptroot
281
281
@@ -418,7 +418,7 @@ Clones the specified repository to the specified directory.
418
418
419
419
#### Examples
420
420
421
-
*`--plugin git-clone:"repo=https://github.com/gitbls/sdm|gitdir=/home/bls/work/sdm|user=bls|logspace`— Clone the sdm repo into /home/bls/work/sdm as user bls. Disk space will be logged before and after the clone.
421
+
*`--plugin git-clone:"repo=https://github.com/gitbls/sdm|gitdir=/home/bls/work/sdm|user=bls|logspace"`— Clone the sdm repo into /home/bls/work/sdm as user bls. Disk space will be logged before and after the clone.
422
422
423
423
### graphics
424
424
@@ -447,7 +447,7 @@ The videomode argument takes a string of the form: 'HDMI-A-1:1024x768M@60D'. sdm
447
447
448
448
#### Examples
449
449
450
-
*`--plugin graphics:"graphics=X11|nodmconsole`— Installs the X11 core components and disables the Display Manager on the console
450
+
*`--plugin graphics:"graphics=X11|nodmconsole"`— Installs the X11 core components and disables the Display Manager on the console
451
451
*`--plugin graphics:"videomode=HDMI-A-1:1920x1280@60D"`— Sets the specified video mode in /boot/firmware/cmdline.txt
452
452
453
453
### hotspot
@@ -476,7 +476,7 @@ The hotspot plugin configures the specified wireless device or USB0 to be a hots
476
476
*`--plugin hotspot:"hsname=myhotspot|wifissid=myssid|wifipassword=mypassword|ipforward=eth0|hsenable|type=routed"`— Configure a routed hotspot named `myhotspot` on wlan0 (the default), with SSID `myssid` and password `mypassword`, forwarding IP traffic to `eth0`.
477
477
*`--plugin hotspot:"device=wlan1|hsname=myhotspot|ipforward=eth0|hsenable|type=routed|dhcpmode=none|wlanip=10.6.0.1"`— Configure a routed hotspot on wlan1. wlan1's IP address will be set to 10.6.0.1, and you must configure your own DHCP server using, for instance, dnsmasq or the sdm plugin `ndm`
478
478
479
-
**Example** using the ndm plugin to configure dnsmasq:
479
+
**Example** using the ndm plugin to configure dnsmasq (in pluglist format):
*`--plugin hotspot:"device=usb0|hsname=myusbhotspot|ipforward=eth0|hsenable|type=routed"`— Configure a routed hotspot on usb0 so it can be a tethering host
@@ -576,7 +576,7 @@ The best way to use this plugin is:
@@ -758,27 +758,58 @@ Using the `parted` burn plugin implicitly sets `--no-expand-root` when used on a
758
758
759
759
#### Arguments
760
760
761
-
***rootexpand**— Expand the root partition by the number of MiB specified as the value for this argument. A value of 0 expands the partition to fill the disk. A value of 0 is not allowed when used with `--burnfile`
762
-
***addpartition**— Adds another partition at the end of the IMG. Arguments: size[fstype][,partitiontype,] where:
761
+
***rootexpand**— Expand the root partition by the number of MiB specified as the value for this argument. A value of 0 expands the partition to fill the disk. A value of 0 is not allowed when used with `--burnfile`. If specified, `rootexpand` must be used before any `addpartition` arguments.
762
+
***addpartition**— Adds another partition at the end of the IMG. Arguments: size[fstype][,mountpoint,] where:
763
763
*`size` is the number of MiB for the partition
764
-
*`fstype` is the type of file system. Supported file systems are: `btrfs`, `ext2`, `ext3`, `ext4`[default], `fat16`, `fat32`, `hfs`, `hfs+`, `ntfs`, `reiserfs`, `udf`, and `xfs`. Some file systems may require you to install additional apt packages on the host before running this plugin
765
-
*`partitiontype` is one of `primary`[default], `logical`, or `extended`
764
+
*`fstype` is the type of file system. Supported file systems are: `btrfs`, `ext2`, `ext3`, `ext4`[default], `fat16`, `fat32`, `hfs`, `linux-swap`, `ntfs`, `udf`, `vfs`, and `xfs`. Some file systems may require you to install additional apt packages on the host before running this plugin
765
+
*`mountpoint` is the location in the filesystem where you expect to mount your new partition. This will be added to fstab, and is optional.
766
766
* NOTE: Multiple partitions can be named on the command line by separating them with `+`. See example below.
767
767
768
768
#### Examples
769
769
770
770
*`--burn-plugin parted:"rootexpand=2048|addpartition=1024,ext4"`— Expand the RasPiOS root partition by 2048MiB and add a 1024MiB ext4 partition
771
-
*`--burn-plugin parted:"rootexpand=2048|addpartition=1024,ext4+2048,btrfs"`— Expand the RasPiOS root partition by 2048MiB and add: a 1MiB ext4 partition and a 1024MiB btrfs partition
771
+
*`--burn-plugin parted:"rootexpand=2048|addpartition=1024,ext4+2048,btrfs,/data/backups,MyBTRFS"`— Expand the RasPiOS root partition by 2048MiB and add: a 1024MiB ext4 partition and a 2048MiB btrfs partition
772
772
*`--burn-plugin parted:"rootexpand=1024|addpartition=@/path/to/partition-list"` where the file partition-list has one line for each partition to be added in the form: `nnnn,fstype,partitiontype,label`
773
773
774
774
#### Example partition-list file
775
775
776
-
This is a sample file for the addpartition=@/path/to/partition-list directive. It will expand the root partition by 2048MiB (2GiB) add a 1MiB partition and ext4 file system, and a 4MiB partition and btrfs file system. This method enables easily adding multiple partitions with a single plugin invocation, so the ability to use `+` for multiple partitions mentioned above does not work in a partition-list file.
776
+
This is a sample file for the addpartition=@/path/to/partition-list directive. It will expand the root partition by 2048MiB (2GiB) add a 1024MiB partition and ext4 file system, a 4096MiB partition and btrfs file system, and a 16GiB Swap partition. This method enables easily adding multiple partitions with a single plugin invocation, so the ability to use `+` for multiple partitions mentioned above does not work in a partition-list file.
777
777
778
778
```
779
779
1024,ext4,,ext4label
780
-
4096,btrfs,,btrfslabel
780
+
4096,btrfs,/data/backups,btrfslabel
781
+
16384,linux-swap,,swaplabel
781
782
```
783
+
If you enable `--gpt`, and use `addpartition` to create one of every partition type, without adding optional mount points your /etc/fstab will look something like (note, however that a mount point was specified for the first btrfs partition, hence is preceded by a commented notice to alert that the mount point directory /mybtrfs was not created.
* The `parted` plugin can only create up to 4 partitions when burning to an IMG, and conversion to GPT partition table is not supported
806
+
* Partition type `hfs` creates a HFS+ partition
807
+
* The `parted` burn plugin adds an entry to /etc/fstab for each additional partition. These won't interfere with use of the `system` plugin's `fstab` feature if you also use that.
808
+
*`linux-swap`: Provides an uncommented fstab entry so that your swap partition will activate on boot
809
+
* All others: If the specified mount point does not exist, the entry is commented out, but provides useful information such as the PARTUUID, partition number, and filesystem type. The other settings are sane for most partitions, although you should check they meet your needs.
810
+
* If you create your mount point during `customize` or `burn` with the `mkdir` plugin before the `parted` plugin runs, the partition will be uncommented and effective when the system boots. If the directory does not exist, you should only need to create the directory later, edit /etc/fstab, uncomment the line, and check the mount options to complete the process
811
+
* Be sure to check that fstab is set how you want. Refer to man swapon(8), mount(8), and fstab(5) for additional information
812
+
782
813
783
814
### piapps
784
815
@@ -862,8 +893,8 @@ postfix installs the postfix mail server. This plugin installs the postfix serve
862
893
863
894
#### Examples
864
895
865
-
*`--plugin postfix:"maincf=/path/to/my-postfix-main.cf`— Uses a fully-configured main.cf, and postfix will be ready to go.
866
-
*`--plugin postfix:"relayhost=smtp.someserver.com|mailname=mydomain.com|[email protected]`— Set some of the postfix parameters, but more configuration will be required to make it operational. A good reference will be cited here at some point.
896
+
*`--plugin postfix:"maincf=/path/to/my-postfix-main.cf"`— Uses a fully-configured main.cf, and postfix will be ready to go.
897
+
*`--plugin postfix:"relayhost=smtp.someserver.com|mailname=mydomain.com|[email protected]"`— Set some of the postfix parameters, but more configuration will be required to make it operational. A good reference will be cited here at some point.
867
898
868
899
### quietness
869
900
@@ -1118,7 +1149,7 @@ These configuration items affect the SSH service.
1118
1149
1119
1150
The `sshhostkey` plugin allows the generation new or import of existing SSH host keys.
1120
1151
Importing SSH host keys is useful to generate images with deterministic keys.
1121
-
Generating SSH host keys during an sdm customize or burn can be beneficial because the entropy during Pi's first boot is very limited, whereas sdm can access the entropy pool of the host OS.
1152
+
Generating SSH host keys during an sdm customize or burn can be beneficial because the entropy during Pi's first boot is very limited, whereas sdm can access the entropy pool of the host OS. Note, however, that unless you fully understand the ramifications of multiple hosts sharing SSH host keys, if the customized IMG is to be used by multiple host systems, you should only use the `sshhostkey` plugin during burn so that each host has unique SSH host keys.
1122
1153
1123
1154
#### Arguments
1124
1155
@@ -1127,7 +1158,7 @@ Generating SSH host keys during an sdm customize or burn can be beneficial becau
1127
1158
1128
1159
#### Examples
1129
1160
1130
-
*`--plugin sshhostkey:"generate-keys`— Generate a new set of host keys.
1161
+
*`--plugin sshhostkey:"generate-keys"`— Generate a new set of host keys.
1131
1162
*`--plugin sshhostkey:"import-keys=/path/to/hostkeys"`— Copy `ssh_host_*_key` and `ssh_host_*_key.pub` files from the specified host directory to the Pi's /etc/ssh/ directory
1132
1163
*`--plugin sshhostkey:"generate-keys|import-keys=/path/to/hostkeys"`— Useful to import a subset (e.g. RSA only) keys, and re-create the rest.
1133
1164
@@ -1227,7 +1258,7 @@ If the system plugin is invoked more than once in an IMG, either on customize or
@@ -1365,6 +1396,39 @@ Plugins are run in the order they are specified on the command line. I recommend
1365
1396
* If using `--plugin` on the command line, the dollar sign characters must be quoted using a backslash (`\$`)
1366
1397
* Alternatively, use a `userlist` file as described <ahref="#overview-and-handling-multiple-accounts">here</a>, or use `--plugin @/path/to/pluglist` as described <ahref="#invoking-a-plugin-on-the-sdm-command-line">here.</a>
1367
1398
1399
+
### venv
1400
+
1401
+
Use the `venv` plugin to do perform one or two python virtual environment (venv) functions:
1402
+
* Optionally create and populate the venv. If you want to create the venv use one of `create` or `createif`. The venv will be crated and populated.
1403
+
* Optionally pip install one or more packages via `install`, `requirements`, or both
1404
+
1405
+
#### Arguments
1406
+
1407
+
`path` is required. All other arguments are optional.
1408
+
1409
+
***chown**— Set the `owner:group` of all files in the created venv as specified by the `chown` value
1410
+
***create**— Create the venv at the provided path. Fail if it already exists.
1411
+
***createif**— Create the venv at the provided path if it doesn't exist. Fail if it already exists and is not a venv ($path/pyenv.cfg doesn't exist)
1412
+
***createoptions**— Switches to add to the `python -m venv` command (e.g., `--system-site-packages`; see <ahref="https://docs.python.org/3/library/venv.html"> Creating virtual environments</a>)
1413
+
***install**— Comma-separated list of pip modules to install
1414
+
***installoptions**— Switches to add to the `pip install` command (see `sudo pip install --help | less`)
1415
+
***list**— After the venv has created, list the installed modules with `pip list`
1416
+
***path**— Path to venv directory specifies the path to the venv
1417
+
***requirements**— /path/to/requirements-file. See <ahref="https://pip.pypa.io/en/stable/reference/requirements-file-format/">Requirements file format</a>
1418
+
***runphase**— Specify the phase when the venv should be created. Values are `phase1` or `post-install`
1419
+
***pyver**— Specify the python version. Not currently used, and set to "3"
1420
+
***name**— Name to use for the venv asset storage. Default is the *filename* of the `path`. Must be used if, for instance two venv invocations create venvs with the same directory name in the same IMG customization
1421
+
1422
+
**NOTES:**
1423
+
* The venv is always created by root. Use the `chown` argument to set different file ownership
1424
+
*`--requirement` and `--constraint` are not supported in requirements.txt files. Use `-r` and/or `-c`
1425
+
* If provided, a requirements file may use `-r` and/or `-c`. Those files, however, may NOT have any further nesting.
1426
+
1427
+
#### Examples
1428
+
1429
+
*`--plugin venv:"path=/usr/local/bin/myvenv|create|install=urllib3,requests"`— Installs modules `urllib3` and `requests`
1430
+
*`--plugin venv:"path=/home/bls/myvenv|create|list|chown=bls:users|install=urllib3,requests|requirements=/ssdy/work/myrqs.txt"`— Installs modules `urllib3`, `requests` and any modules listed in the requirements.txt file.
1431
+
1368
1432
### vnc
1369
1433
1370
1434
Install and configure either or both of Virtual VNC and RealVNC.
@@ -1381,7 +1445,7 @@ Only one of tigervnc or tightvnc can be installed and configured on a system by
1381
1445
1382
1446
#### Examples
1383
1447
1384
-
*`--plugin vnc:"realvnc|tigervnc=1280x1024,1600x1200`— Install RealVNC server for the console and tigervnc virtual desktop servers for the specified resolutions.
1448
+
*`--plugin vnc:"realvnc|tigervnc=1280x1024,1600x1200"`— Install RealVNC server for the console and tigervnc virtual desktop servers for the specified resolutions.
1385
1449
*`--plugin vnc:"realvnc=1600x1200"`— Install RealVNC server and configure the console for 1600x1200, just as raspi-config VNC configuration does.
1386
1450
*`--plugin vnc:"tigervnc=1024x768,1600x1200,1280x1024"`— Install tigervnc virtual desktop servers for the specified resolutions. Only configure RealVNC if it is already installed (e.g., RasPiOS with Desktop IMG).
0 commit comments