[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisioneRevisione precedente
Prossima revisione
Revisione precedente
Ultima revisioneEntrambe le parti successive la revisione
it:slackware:liveslak [2022/01/03 16:09 (UTC)] – [Scripts e tools] twenty-sevenit:slackware:liveslak [2022/01/07 18:48 (UTC)] – [Scripts e tools] twenty-seven
Linea 563: Linea 563:
  
  
-== Layout of the USB stick ==+== Layout della chiavetta USB ==
  
-The "iso2usb.sh" script wipes and re-partitions the USB stick unless the "-r" or //refresh// parameter is used See section "[[#transfering_iso_content_to_usb_stick|Transfering ISO content to USB stick]]" for an explanation of all commandline switches. \\ The script will create partitions:+Lo script "iso2usb.sh" cancella e ri-partiziona la penna USB a meno che non vengano usati i parametri "-r" //refresh//Vedi la sezione "[[#Trasferire il contenuto di una ISO su una penna USB|Trasferire il contenuto di una ISO su una penna USB]]" per una spiegazione di tutte le impostazioni da linea di comando. \\ Lo script creera' partizioni:
  
-  * First partitiona small (1 MB in size) FAT partition which  is not used for Slackware Live Edition.  It can be used by an alternative bootloader if needed You can also store your LUKS keyfile on it to unlock a LUKS-encrypted Slackware Linux computer (see the [[http://ftp.osuosl.org/pub/slackware/slackware64-current/README_CRYPT.TXT|README_CRYPT.TXT]] file on your Slackware DVD for more information on LUKS keyfiles). +  * Prima partizioneuna piccola (1 MB di dimensionepartizione FAT che non e' usata dalla Slackware Live Edition. Puo' essere usata da un bootloader alternativo se si necessitaPotete anche metterci il vostro keyfile LUKS per sbloccare un computer con Slackware Linux criptato con LUKS (vedete il file [[http://ftp.osuosl.org/pub/slackware/slackware64-current/README_CRYPT.TXT|README_CRYPT.TXT]] sul vostro DVD Slackware per maggiori informazioni sui LUKS keyfile). 
-  * Second partitiona 100 MB VFAT partition containing the kernel, initrd and all the other stuff required by syslinux and grub2 to boot Slackware Live Edition. +  * Seconda partizioneuna partizione VFAT di 100MB contenente il kernel, l' initrd e tutte le altre cose necessarie a syslinux grub2 per avviare Slackware Live Edition. 
-  * Third partitionLinux partition taking up all of the remaining spaceIt contains the actual liveslak modulesthe persistent live storage and optionally your encrypted homedirectoryYou can use the remainder of this Linux //ext4// filesystem's free space to store anything you like.+  * Terza partizioneuna partizione Linux che occupa tutto il resto dello spazioConterra' i moduli liveslak, lo spazio di archiviazione persistente e, opzionalmente, la vostra directory home criptataPotete usare il resto dello spazio libero di questo filesystem Linux //ext4// per metterci tutto quello che volete.
  
-Note that this script is the only supported method of transfering the liveslak ISO content to a USB stick and make that USB stick into a persistent live OS.  Several 3rd party tools (like multibootusb, rufus, unetbootin) that claim to be able to mix several Live OS'es on a single USB stick and make them all work in multi-boot setupare not currently supporting liveslak.+Notate che questo script e' l' unico metodo supportato per trasferire il contenuto della ISO liveslak su una penna USB e di rendere quella stessa USB un Live OS con persistenzaDiversi tool di terze parti (come mulibootusb, rufus, unetbootin), che dichiarano di essere in grado di mischiare diverse Live OS su una singola penna USB e renderle funzionanti in un setup multi-boot, attualmente non supportano liveslak.
  
-== Mounting a filesystem in an encrypted container == 
  
-The script will create a file of requested size in the root of the Live partition using the 'dd' command.  The 'cryptsetup luksCreate' command will initialize the encryption, which causes the script to prompt you with "are you sure, type uppercase YES" after which an encryption passphrase must be entered three times (two for intializing, and one for opening the container). +== Montare un filesystem in un container criptato ==
-If the container is used for an encrypted /home, its filename will be "slhome.img" The script will copy the existing content of the ISO's /home into the container'filesystem which will later be mounted on top of the ISO's /home (thereby masking the existing /home). +
-The Live OS is instructed to decrypt the container and mount the filesystem.  This is done by editing the file "/luksdev" in the initrd and adding a line: "/slhome.img"+
-The iso2usb.sh script only supports creating and configuring an encrypted /home, but you can create additional encrypted containers yourself and mount them on other locations in the ISO's filesystem.  In order for this to work, you need to edit the "/luksdev" file and add a line "/your/container.img:/your/mountpoint" i.e. container path and the target mount directory on a single line, separated by a colon.  The Live init script will create the mount point if it is missing.+
  
-== Using a container file for storing persistence data ==+Lo script creera' un file di dimensione richiesta nella root della partizione Live usando il comando 'dd'. Il comando 'cryptsetup luksCreate' inizializzera' la cifratura, che fara' in modo che lo script vi chieda "se siete sicuri, digitate YES in maiuscolo", dopodiche' dovrete inserire una passphrase tre volte (due per l' inizializzazione, una per l' apertura del container). Se il container e' usato per una /home criptata, il nome del suo file sara' "slhome.img". Lo script copiera' il contenuto esistente della /home della ISO nel filesystem del container che sara' montato piu' tardi sulla /home della ISO (coprendo quindi la /home esistente). 
 +Il Live OS e' istruito per decriptare il container e montare il filesystem. Questo e' fatto editando il file "/luksdev" nell' initrd e aggiungendo una linea: "/slhome.img"
 +Lo script iso2usb.sh supporta solamente la creazione e configurazione di una /home criptata, ma potete creare dei containers criptati aggiuntivi da voi e montarli in altri posti del filesystem della ISO. Affinche' tutto cio' funzioni, dovete editare il file "/luksdev" e aggiungere una linea "/vostro/container.img:/vostro/mountpoint", cioe'il path del container e la directory target per il mount su una singola linea, separati dai due punti. Lo scritp di init Live creera' un mount point, nel caso sia mancante.
  
-A second type of encrypted container exists, which can be used for storing your persistence data.  The Live init script will check if it needs to enable persistence in this order: 
-  - is the USB filesystem writable?  If so, 
-    - does a directory /persistence exist? If so, use that; if not, 
-    - does a file /persistence.img exist?  If so, mount the file and if it is an encrypted container, ask for a passphrase during boot. 
  
-== Adding USB wait time ==+== Utilizzare un file container per immagazzinare dati persistenti ==
  
-For slow USB mediathe default 5 seconds wait time during boot are sometimes insufficient to allow the kernel to detect the partitions on your USB device The script can optionally add more wait time.  It does this by editing the file "wait-for-root" in the initrd and updating the value which is stored there (by default "5" is written there by the "make_slackware_live.sh" script).+Esiste un secondo tipo di container cifratoche puo' essere usato per immagazzinare i vostri dati persistentiLo script di init della Live controllera' se sia necessario abilitare la persistenza in questo ordine: 
 +  il filesystem USB e' scrivibile? Se si', 
 +    esiste una directory /persistence? Se si', usala; altrimenti, 
 +    - esiste un file /persistence.img? Se si', montalo e, nel caso sia un container cifrato, chiedi la password durante il boot.
  
 +== Aggiungere il tempo di atteda all' USB ==
 +
 +Per media USB lenti, il tempo di attesa di default di 5 secondi durante il boot talvolta e' insufficiente per permettere al kernel di rilevare le partizioni sul vostro dispositivo USB. Lo script puo' opzionalmente aggiungere piu' tempo di attesa. Cio' viene fatto editando il file "wait-for-root" nell' initrd e aggiornando il valore che e' vi e' contenuto (di default "5" e' scritto la' dallo script "make_slackware_live.sh").
  
 === makemod === === makemod ===
  
 +Il terzo script:
  
-The third script:+Lo script "makemod" vi permette di creare un modulo Slackware Live facilmente, con un pacchetto Slackware o un albero di directory come parametro di input.
  
-The "makemod" script allows you to create a Slackware Live module easily, with a Slackware package or a directory tree as its input parameter.+Utilizzo: 
 +  # makemod <nome_pacchetto|directory> nome_modulo.sxz
  
-Usage: +  * Il primo parametro e' il percorso completo di un pacchetto Slackware, oppure una directory. 
-  # makemod <packagename|directory> modulename.sxz+    * Se il nome di un pacchetto viene passato come primo parametro, sara' installato in una directory temporanea utilizzando l' "installpkg" di Slackware. Il contenuto della directory temporanea sara' squashato in un modulo dal programma "squashfs"
 +    * Se viene passato il nome di una directory, il suo contenuto sara' squashato in un modulo dal programma "squashfs"
 +  * Il secondo parametro e' il nome del percorso completo del modulo di output che sara' creato.
  
-  * The first parameter is either the full path to a Slackware package, or else a directory. +Potete copiare il modulo che avete appena creato (tenendo mente le convenzioni sui nomi dei file per i moduli della Slackware Live, vedete il paragrafo "Formato dei moduli della Slackware Live"nella directory optional/ oppure addon/ del vostro Live OS. Se lo copiate nella directory optional/ addon/ dei sorgenti della liveslak, allora "make_slackware_live.sh" usera' il modulo quando creera' l' immagine ISO.
-    * If a packagename is supplied as first parameter, it will be installed into a temporary directory using Slackware's "installpkg". The content of the temporary directory will be squashed into a module by the "squashfs" program. +
-    * If a directoryname is supplied, its content will be squashed into a module by the "squashfs" program.. +
-  * The second parameter is the full pathname of the output module which will be created. +
- +
-You can copy the module you just created (minding the filename conventions for a Slackware Live modulesee paragraph "Slackware Live module format"to either the optional/ or to the addon/ directory of your Live OS. If you copy it to the optional/ or addon/ directory of the liveslak sources then "make_slackware_live.sh" will use the module when creating the ISO image.+
  
  
 === setup2hd === === setup2hd ===
  
 +Il quarto script:
  
-The fourth script+Lo script "setup2hd" e' un installer di Slackware modificatoin modo da farvi trovare a vostro agio con il processoLa sezione 'SOURCE' offre due tipi di sceltauna normale installazione di Slackware da rete, utilizzando un server NFS, HTTP, FTP Samba, oppure l' installazione della live che state utilzzandoLo script sa dove trovare i moduli squashfs, cosicche' la selezione "Install Live OS" non vi chidera' di inserire ulteriori inputs. 
- +  * L' installazione di rete di Slackware e' identica a quella del medium ufficiale di Slackware
-The "setup2hd" script is a modified Slackware installerso you will be comfortable with the process The 'SOURCE' section offers two types of choices a regular Slackware network installation using a NFS, HTTP, FTP or Samba serveras well as a choice of installing the Live OS which you are runningThe script knows where to find the squashfs modulesso the "Install Live OS" selection will not prompt further inputs. +  * Se scegliete di installare la Live OS, allora dopo che selezionerete la/e partizione/i oggettoogni modulo attivo della specifica variante della Live OS (SLACKWARE, KTOWN, MATE, ...) sara' estratto sul disco fisso. 
-  * The Slackware network installation is identical to that of the official Slackware installation medium. +Dopo che l' estrazione sara' completatalo script fara' il sommario di quanti moduli sono stati estrattiMostrera' inoltre un comando di esempio per estrarre ogni modulo inattivo o disabilitato rimanente a mano. 
-  * If you chose to install the Live OS, then after you select the target partition(s)every active module of the Live OS variant (SLACKWARE, KTOWN, MATE, ...) is extracted to the hard drive After extraction has completedthe script summarizes how many modules have been extracted It will also show an example command to extract any remaining inactive or disabled modules manually The final step in the installation is again the stock Slackware installer which kicks off the Slackware configuration scripts.+Lo step finale nell' installazione e' ancora l' installer stock di Slackware, il quale fara' partire gli scripts di configurazione di Slackware.
  
  
 === pxeserver === === pxeserver ===
  
 +Il quinto script:
  
-The fifth script+Lo script ''pxeserver'' funziona nel seguente modo
- +  * Ha bisogno di una rete cablatail boot PXE da wireless e' impossibile
-The ''pxeserver'' script works as follows+  * Lo script pxeserver provera' trovare un' interfaccia di rete cablatapotete esplicitamente passargli un nome di interfaccia come parametro allo script (opzionale). 
-  * It requires a wired networkwireless PXE boot is impossible+  * Se vengono rilevate interfacce di rete cablate multiple, una finestra dialog chiedera' all' utente di scegliere quella giusta
-  * The pxeserver script tries to find wired interfaceyou can pass an explicit interfacename as parameter to the script (optional). +  * Per l' interfaccia scelta verra' fatto un check della configurazione con DHCP; 
-  * If multiple wired interfaces are detecteddialog asks the user to select the right one+    * Se verra' trovata una configurazione DHCP, allora il pxeserver non attiverail suo DHCP, affidandosi invece al DHCP server della vostra rete LAN
-  * check is done for DHCP configuration of this wired interface+    * Se non verra' trovata nessuna configurazione DHCP, allora lo script vi chiedera' il permesso di avviare il suo DHCP server internoInoltre all' utente sar'a chiesto di configurare un indirizzo IP per l' interfaccia di rete e le proprieta' della classe IP per il server DHCP interno
-    * If DHCP configuration is found then pxeserver will not start its own DHCP server and instead will rely on your LAN'DHCP server. +  * Lo script a quel punto avviera' il server PXEcostituito da
-    * If no DHCP config is foundthe script will ask permission to start its own internal DHCP server.  Additionally the user will be prompted to configure an IP address for the network interface and IP range properties for the internal DHCP server. +    * dnsmasq che fornira'DNS, DHCP BOOTP; 
-  * The script will then start the PXE server, comprising of+    * demoni NFS RPC; 
-    * dnsmasq providing DNS, DHCP and BOOTP; +  * Lo script rilevera' se avete una connessione di rete in uscita su un' altra interfaccia e abilitera' l' inoltro dei pacchetti IP se necessariocosicche'clients PXE avranno anch' essi accesso alla rete
-    * NFS and RPC daemons+  * La Live OS avviata via pxelinux e' configurata con parametri di boot aggiuntivi <code>
-  * The script will detect if you have an outside network connection on another interface and will enable IP forwarding if neededso that the PXE clients will also have network access+
-  * The Live OS booted via pxelinux is configured with additional boot parameters: <code>+
 nfsroot=<server_ip_address>:/mnt/livemedia nfsroot=<server_ip_address>:/mnt/livemedia
 luksvol= luksvol=
Linea 644: Linea 643:
 locale=<server_locale> locale=<server_locale>
 kbd=<server_kbd_layout> kbd=<server_kbd_layout>
-</code> Which shows that the configuration of the Live OS where the PXE server runs is largely determining the configuration of the PXE clients. +</code> Che mostrano che la configurazone della Live OS dove il server PXE gira e' largamente determinante per la configurazione dei clients PXE
-  * Note that when networkbootingthe hostname of the Live OS will be suffixed with the machine'MAC address to make the hostname of every network-booted computer unique.+  * Notate che quando fate il boot da retel' hostname della Live OS avracome suffisso l' indirizzo MAC della macchina, in modo da rendere unico l' hostname di ogni computer che faccia il boot da rete.
  
  
Linea 651: Linea 650:
  
  
-The sixth script:+Il sesto script:
  
-The "upslak.sh" script's runtime usage is explained in detail in a previous paragraph "Updating the kernel (and moreon a USB stick".+L' utilizzo a runtime dello script "upslak.sh" espiegato nel dettaglio in un paragrafo precedente "Aggiornare il kernel (e altrosu una penna USB".
  
-This section explains how the script modifies the content of the Live USB stick.+Questa sezione spiega come lo script modifica il contenuto della penna USB Live.
  
-When the script is startedit will do some sanity checks and then extracts the content of the initrd imageSome characteristics of the initrd will be recorded+Quando lo script e' avviatofara' alcuni controlli di di integrita' e poi estrarra' il contenuto dell' immagine initrd. Alcune caratteristiche dell' initrd saranno registrate
-  * existence of previously backed-up kernel modules is checked+  * sara' verficata l' esistenza di moduli del kernel precedentemente backuppati
-  * template variables and their values are obtained from the init sctript+  * saranno recuperate le variabili dei template, coi loro valori dallo script di init, 
-  * the current USB wait time is checked+  * sara' verificato il tempo di attesa dell' USB corrente
-Depending on the parameters passed to the script, it will then perform one or more of the following actions:+A seconda dei parametri passati allo script, esso eseguira una o piu' delle seguenti azioni:
  
-== Update the kernel and moules == 
  
-You can provide a new kernel and its modules in two ways.  The '-k' option accepts a kernel image file or else a Slackware package contaning a kernel.  The '-m' option accepts a directory tree of modules below "/lib/modules/, or else a Slackware package containing kernel modules. +== Aggiornare il kernel e i moduli ==
-If there is sufficient space on the Linux and EFI partitions, the script will make a backup of the current kernel and modules by renaming the kernel and the module directory with a ".prev" suffix.  Sufficient space means that at least 10 MB of free space must remain on the partition(s) after making the backup and installing the new kernel plus modules. If space is an issue, you can skip making a backup by providing the '-b' parameter to the script (a possibly unsafe choice).+
  
-== Restore backed-up kernel and modules ==+Potete fornire un nuovo kernel e i suoi moduli in due modi. L' opzione '-k' accetta un file immagine del kernel oppure un pacchetto di Slackware contenente un kernel. L' opzione '-m' accetta un albero di directory dei moduli sotto "/lib/modules", oppure un pacchetto Slackware contenente moduli del kernel. 
 +Se c'e' sufficiente sapzione sulle partizioni Linux e EFI, lo script fara' un backup del kernel e dei moduli correnti rinominando la directory che li contiene con un suffisso ".prev"
 +Spazio sufficiente significa che devono rimanere almeno 10 MB di spazio libero sulla/e partizione/i dopo aver fatto il backup e installato il nuovo kernel piu' i moduli. Se lo spazio e' un problema, potete saltare il backup fornendo il parametro '-b' allo script (come possibile scelta insicura).
  
-If a backup was made of kernel and modules, the upslak.sh script is able to restore these using the '-r' option, thereby removing the replacements.  This comes in handy when the replacement kernel turns out to be non-functional.+== Restorare kernel e moduli backuppati ==
  
-== Add network support modules ==+Se e' stato fatto un backup del kernel e dei moduli, lo script upslak.sh e' in grado di restorarli usando l' opzione '-r', rimuovendo quindi quelli che li avevano rimpiazzati. Questo torna utile quando il kernel nuovo si rivela non funzionante.
  
-This should normally not be needed.  By default, all liveslak ISO images have network support built-in.  But customized Live ISO images may be shipped without network support initially.  If you want your Live OS to be PXE-bootable you need network support in the kernel.  Use the '-n' option.+== Aggiungere i moduli per il supporto di rete ==
  
-== Increase (or decrease) USB wait time ==+Questo noromalmente non dovrebbe servire. Di default, tutte le immagini ISO liveslak hanno il supporto per la rete integrato. Ma le immagini ISO Live customizzate possono essere fornite senza supporto inizialmente. Se volete che la vostra Live OS sia bootabile da PXE avrete bisogno il supporto della rete nel kernel. Utilizzate l' opzione '-n'.
  
-Similar to the functionality of the "iso2usb.sh" script, the "upslak.sh" script is able to alter the USB wait time at boot using the '-w' option.+== Aumentare (o diminuire) il tempo di attesa della USB ==
  
-== Replace the liveslak init script ==+Similmente alla funzionalita' dello script "iso2usb.sh", lo script "upslak.sh" e' in grado di alterare il tempo di attesa dell' USB al boot, utilizzando l' opzione '-w'.
  
-The init script inside the initrd image is the core of liveslak.  The init script prepares the Live filesystem and configures several run-time OS parameters.  If you have made modifications to this init script you can easily replace the default init script with your own script using the '-i' option.  The "upslak.sh" script is smart enough to recognize a iveslak template as input.  The ".tpl" extension of some liveslak files means that these are templates.  They are not usable as-is, because they contain placeholder strings like "@VERSION@" or "@DISTRO@" that first need to be replaced with real values.  The "upslak.sh" script will take care of these substitutions.+== Rimpiazzare lo script di init della liveslak ==
  
-== Wrap persistence data into new squashfs module ==+Lo script di init dentro l' immagine initrd e' il nucleo della liveslak. Quello script di init prepara il filesystem della Live e configura diversi paramentri del runtime dell' OS. Se avete fatto delle modifiche questo script di init potete facilmente rimpiazzare l' init script di default con il vostro, utilizzando l' opzione '-i'. Lo script "upslak.sh" e' abbastanza smart da riconoscere un template liveslak come input. L' estensione ".tpl" di alcuni file della liveslak significa che questi sono templates. Non sono utilizzabili cosi' come sono, perche' contengono delle stringhe segnaposto come "@VERSION@" o "@DISTRO@" che necessitano prima di essere espanse con valori reali. Lo script "upslack.sh" si prendera' cura di queste sostituzioni.
  
-Persistence data will accumulate over time on the USB stick.  That is perfectly OK, and you can wipe it on boot if that is needed.  But sometimes you want to capture the packages you installed into the persistent storage, and create a new squashfs module out of them.  The "upslak.sh" script is able to move your persistence data into a new squashfs module using the '-p' option.  The new module will be created in the "/liveslak/addons/" directory so that it will be loaded into the Live OS everytime your USB Live boots up.  After creating the new module, the persistence store will be re-initialized (i.e. its content will be erased on the next boot).  The new module's name is time-stamped (/liveslak/addons/0099-slackware_customchanges-yyyymmddHHMMSS.sxz where yyyymmddHHMMSS is the timestamp) so that this action can be repeated as many times as you want.+== Contenere i dati persistenti in un nuovo modulo squashfs ==
  
 +I dati persistenti si accumuleranno lungo il tempo sulla penna USB. Questo e' perfettamente normale, e potete cancellarli al boot se volete. Ma talvolta potreste voler prendere i pacchetti installati nello storage persistente e creare da essi un nuovo modulo squashfs. Lo script "upslak.sh" e' in grado di di spostare i vostri dati persistenti in un nuovo modulo squashfs, usando l' opzione '-p'. Il nuovo modulo sara' creato nella directory "/liveslak/addons/", cosicche' esso sara' caricato nella Live OS ogni volta che la Live USB si avviera'. Dopo la creazione del nuovo modulo, lo storage di persistenza sara' reinizializzato (cioe' il suo contenuto sara' cancellato al successivo boot). Il nome del nuovo modulo avra' un timestamp (/liveslak/addons/0099-slackware_customchanges-yyyymmddHHMMSS.sxz dove yyyymmddHHMMSS e' il timestamp) cosicche' questa azione possa essere ripetuta tutte le volte che volete.
  
 ==== Creating a Live ISO from scratch ==== ==== Creating a Live ISO from scratch ====
 it:slackware:liveslak ()