doc:appunti:linux:sa:grml
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:grml [2023/11/30 11:03] – [Create a new partition into the USB stick] niccolo | doc:appunti:linux:sa:grml [2025/10/03 16:51] (current) – [Add scripts and other files to the USB] niccolo | ||
|---|---|---|---|
| Line 15: | Line 15: | ||
| - Create the USB boot stick from the **GRML ISO image**. | - Create the USB boot stick from the **GRML ISO image**. | ||
| - Create a **new GRMLCFG partition** into the USB stick. | - Create a **new GRMLCFG partition** into the USB stick. | ||
| - | - Customize the GRML environment at your will and create a **config.tbz**; copy the file into the new partition. | + | - Customize the GRML environment at your will and create a **config.tbz**. Copy the file into the new partition. |
| - | - Create a **scrits/** directory into the partition containing scripts to be run at boot. | + | - Create a **scripts/** directory into the partition containing |
| ==== Create the USB stick from the ISO image ==== | ==== Create the USB stick from the ISO image ==== | ||
| Line 38: | Line 38: | ||
| The option **%%--wipe never%%** is required because the device contains an **iso9660 signature** that otherwise will be removed by the write command. | The option **%%--wipe never%%** is required because the device contains an **iso9660 signature** that otherwise will be removed by the write command. | ||
| - | Using the **n** key to **add a new partition** it is possible to create the ''/ | + | Using the **n** key to **add a new partition** it is possible to create the ''/ |
| + | |||
| + | < | ||
| + | Command (m for help): n | ||
| + | Partition type | ||
| + | Select (default p): p | ||
| + | Partition number (3,4, default 3): | ||
| + | First sector (1751040-122879999, | ||
| + | Last sector, +/-sectors or +/ | ||
| + | </ | ||
| + | |||
| + | Select **p** (//print the partition table//) and **w** (//write table to disk and exit//) to finalize the partitioning, | ||
| < | < | ||
| Line 57: | Line 68: | ||
| ==== Customize the environment and save the config.tbz ==== | ==== Customize the environment and save the config.tbz ==== | ||
| - | Now it is time to customize your environment. You can for example: | + | Now it is time to customize your environment; check the **[[https:// |
| + | |||
| + | You can for example: | ||
| * Generate an SSH RSA key running the **ssh-keygen** utility. The key will be saved into '' | * Generate an SSH RSA key running the **ssh-keygen** utility. The key will be saved into '' | ||
| - | * Customize the shell by editing the **$HOME/.zsrc** file, e.g. by adding alias commands, customizing the **PATH** or other environment variables. etc. | + | * Customize the shell by editing the **$HOME/.zshrc** file, e.g. by adding alias commands, customizing the **PATH** or other environment variables. etc. |
| * Run and configure some programs that will save preferences into the **$HOME/**, e.g. the Midnight Commander **mc** will save its files into '' | * Run and configure some programs that will save preferences into the **$HOME/**, e.g. the Midnight Commander **mc** will save its files into '' | ||
| + | * Create an '' | ||
| + | |||
| + | At the end of the customization, | ||
| + | |||
| + | < | ||
| + | save-config -all | ||
| + | </ | ||
| + | |||
| + | A file named **config.tbz** will be saved into the current directory. The file is a //grml configuration archive//, which may contains several components: hidden files from the '' | ||
| + | |||
| + | Mount the custom partition and copy the file into its root directory: | ||
| + | |||
| + | < | ||
| + | mkdir / | ||
| + | mount /dev/sdc3 / | ||
| + | cp -p config.tbz / | ||
| + | </ | ||
| + | |||
| + | If you want to modify the **config.tbz** archive without re-creating it via the '' | ||
| + | |||
| + | <code bash> | ||
| + | mkdir config | ||
| + | cd config | ||
| + | tar jxvf ../ | ||
| + | # Do whatever you need to the extracted files... | ||
| + | mv ../ | ||
| + | tar jcvf ../ | ||
| + | </ | ||
| + | |||
| + | ==== Add scripts and other files to the USB ==== | ||
| + | |||
| + | If you want to have some scripts run at bootstrap by GRML, create a **script/** directory into the root of the custom USB partition, and place the scripts into it. During the execution of the script the partition will be mounted under **/ | ||
| + | |||
| + | You can place also files into the partition, so e.g. you can install additional deb packages on-the-fly. | ||
| + | |||
| + | Here it is an example of script named **scripts/ | ||
| + | |||
| + | < | ||
| + | #!/bin/sh | ||
| + | echo "=== Execution of \" | ||
| + | loadkeys it | ||
| + | loadkeys / | ||
| + | </ | ||
| + | |||
| + | The file **/ | ||
| + | |||
| + | < | ||
| + | shift altgr keycode 26 = braceleft | ||
| + | shift altgr keycode 27 = braceright | ||
| + | </ | ||
| + | |||
| + | ====== Obsolete ====== | ||
| + | |||
| + | :!: **WARNING**: | ||
| ===== Boot via PXE ===== | ===== Boot via PXE ===== | ||
| Line 70: | Line 137: | ||
| Vedere [[install]]. | Vedere [[install]]. | ||
| + | |||
| ===== Personalizzazione ===== | ===== Personalizzazione ===== | ||
| La partizione VFAT quando il sistema live è avviato, risulta accessibile sotto **''/ | La partizione VFAT quando il sistema live è avviato, risulta accessibile sotto **''/ | ||
| - | |||
| - | FIXME (Verificare se funziona davvero) Se nella chiavetta USB contenente GRML si crea un archivio **'' | ||
| - | |||
| - | FIXME (Verificare se funziona davvero) dopo l' | ||
| La via più comoda di avere una GRML personalizzata è passare il parametro **'' | La via più comoda di avere una GRML personalizzata è passare il parametro **'' | ||
| Line 114: | Line 178: | ||
| </ | </ | ||
| - | ===== Web References ===== | + | ====== Web References |
| - | * [[http:// | + | * [[https:// |
| + | * [[https:// | ||
| * [[http:// | * [[http:// | ||
doc/appunti/linux/sa/grml.1701338600.txt.gz · Last modified: by niccolo
