Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
ca-valencia:slackware:beginners_guide [2014/12/31 13:07 (UTC)] – [Actualitzant el Sistema] el_pinux_penat | ca-valencia:slackware:beginners_guide [2015/01/08 11:05 (UTC)] – [Canvia a un nucli Genèric] some typos corrected el_pinux_penat |
---|
| |
| |
===== Switch to a generic kernel ===== | ===== Canvia a un nucli Genèric ===== |
| |
It's recommended that you switch to Slackware's //generic// kernel. This is easy to do but there are a few steps to follow. | Es recomana que canvies al nucli //generic// d'Slackware. Açò és fàcil de fer però hi ha uns pocs passos a seguir. |
| |
<note tip>What is the difference between a "generic" kernel and the "huge" kernel which has been installed as the default kernel? \\ The "huge" kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name "huge"). When this kernel boots it will use up a lot your RAM (relatively speaking... with 1 GB of RAM you will not really be troubled by a few MB less RAM). \\ The "generic" kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand. This will make your kernel's memory consumption lower and the boot process a bit faster. The smaller size allows for the use of an initial RAM disk or "initrd". An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.\\ For now, you need to remember that a "huge" kernel will not support an intial RAM disk, but the "generic" kernel will. We go for maximum flexibility and use a "generic" kernel.</note> | <note tip>Quina és la diferència entre el nucli "generic" i el "huge", que s'ha instal·lat com a nucli per defecte? \\ El nucli "huge" és essencialment un nucli que té tots els controladors de maquinari necessaris per a un instal·lació satisfactòria del teu ordinador. Pensa en controladors de disc i de xarxa (de cable), sistemes de fitxers, xifrat i molt més. Tots aquests controladors incorporats donen com a resultat una imatge del nucli gran (d'ahí el nom "huge" (enorme)). Quan este nucli arranca utilitzarà molt la teua RAM (relativament parlant... amb 1 GB de RAM uns pocs MB menys no suposaran un problema). \\ Per una altra banda, el nucli "generic", és un nucli que virtualment no té controladors incorporats. Tots els controladors es carregaran a la RAM baix demanda. Açò farà que el consum de memòria del teu nucli siga més baixa i el procés d'arrancada una miqueta més ràpid. La menor mida permet l'ús d'un RAM disc inicial o "initrd". Un RAMdisk inicial és requisit indispensable en certes configuracions, com RAID de programari, o un disc dur completament xifrat.\\ Per ara, necessites recordar que un nucli "huge" no suportarà un disc en RAM, però el "generic" sí. Nosaltres optem per la màxima flexibilitat i usem un nucli "generic".</note> |
| |
* You will need to create an initial RAM disk ("//initrd//" for short). The //initrd// functions as a temporary root file system during the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root: <code> | * Caldrà què crees un disc RAM inicial (abreviat "//initrd//"). L'//initrd// funciona com un sistema de fitxers arrel temporal durant la fase inicial de l'arrancada del nucli, i ajuda a fer que el sistema de fitxers arrel siga muntat quan el teu sistema s'inicia. Executa açò, com a root: <code> |
# /usr/share/mkinitrd/mkinitrd_command_generator.sh | # /usr/share/mkinitrd/mkinitrd_command_generator.sh |
</code> This command will not actually //do// anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on: <code> | </code> Aquesta ordre de fet no //farà// res. És només informatiu, i mostrarà alguna cosa com açò - depenent de la teua versió del nucli, la configuració del teu maquinari, el sistema de fitxers arrel que vas triar al instal·lar Slackware i demés: <code> |
# | # |
# mkinitrd_command_generator.sh revision 1.45 | # mkinitrd_command_generator.sh revision 1.45 |
| |
mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz | mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz |
</code> Run the script's suggested ''mkinitrd'' commandline (as root) to generate the ''initrd.gz'' image. | </code> Executa la ordre ''mkinitrd'' suggerida pel guió (com a root) per a generar la imatge ''initrd.gz''. |
* If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file ''/etc/lilo.conf'' by adding a section to your Slackware entry as follows: <code> | * Si has instal·lat LILO (el carregador de l'arrancada per defecte d'Slackware), caldrà també que faces canvis al seu fitxer de configuració ''/etc/lilo.conf'' afegint una secció per a la teua entrada d'Slackware, com la següent: <code> |
image = /boot/vmlinuz-generic-3.2.29 | image = /boot/vmlinuz-generic-3.2.29 |
initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz | initrd = /boot/initrd.gz # afig esta línia per a que lilo veja initrd.gz |
root = /dev/sda1 | root = /dev/sda1 |
label = Slackware | label = Slackware |
read-only | read-only |
</code> Actually, the "''mkinitrd_command_generator.sh''" script will show an example section which can be added to ''/etc/lilo.conf'' if you pass it the name of the generic kernel as an argument, like this: <code> | </code> De fet, el guió "''mkinitrd_command_generator.sh''" mostrarà una secció d'exemple que es pot afegir a ''/etc/lilo.conf'' si li passes el nom del núcli genèric com argument, com ací: <code> |
# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29 | # /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29 |
</code> Note that it is recommended to //add a new section// instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work). | </code> Tingues en compte que es recomana //afegir una nova secció// enlloc d'editar la secció d'imatge del nucli existent. Assigna una etiqueta única a la teua nova secció. Després de reiniciar, LILO et donarà dos opcions: arrancar el teu nucli genèric acabat d'afegir, o arrancar amb el nucli huge failsafe (del que estas completament segur de que funcionarà). |
* After making the changes to ''/etc/lilo.conf'' you have to save the file and then run <code> | * Una vegada fets els canvis a ''/etc/lilo.conf'' has de salvar el fitxer i aleshores executar<code> |
# lilo -v | # lilo -v |
</code> to make your change permanent. Then, reboot. | </code> per a fer que els teus canvis siguen permanents. Aleshores, reinicia. |
| |
<note important> | <note important> |
* Have a look at ''mkinitrd'' manual page (''man mkinitrd'') for more information. | * Fes una ullada a la pàgina de manual ''mkinitrd'' (''man mkinitrd'') per a més informació. |
* If you use grub or another bootloader, then make changes which are applicable to the program you use. | * Si utilitzes grub o un altre carregador de l'arrancada, aleshores fes els canvis que siguen aplicables al programa que utilitzes. |
* If you try to use the generic kernel without creating an ''initrd.gz'', then booting will fail with a kernel panic. | * Si intentes utilitzar un nucli genèric sense crear un ''initrd.gz'' l'arrancada fallarà amb un ''kernel panic''. |
</note> | </note> |
| |