[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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:slackware:kernel_huge_for_generic [2020/01/03 08:46 (UTC)] – Some minor layout and language improvements, and an alternative commandline shown as tip. alienbobhowtos:slackware:kernel_huge_for_generic [2021/02/22 08:47 (UTC)] (current) – Some polishing of text and example commands to remove ambiguities alienbob
Line 1: Line 1:
-====== How to switch from Kernel Huge to Generic? ======+====== How to switch from the Huge to the Generic kernel? ======
  
-At the end of this recipe the user will be able to switch from Kernel Huge to Kernel Generic on Slackware, and enjoy its benefits.+At the end of this recipe the user will be able to switch from the Huge to the Generic kernel on Slackware, and enjoy its benefits.
 You may be wondering what benefit you get from this change. The benefits of switching from Huge to Generic are: You may be wondering what benefit you get from this change. The benefits of switching from Huge to Generic are:
  
Line 7: Line 7:
   * The modules are not embedded, thus giving better flexibility.   * The modules are not embedded, thus giving better flexibility.
  
-So what is Kernel Huge for? Simple, because it has huge support for many drivers, it is ideal for use in installing the system. Thus allowing to support larger number of machine types+So what is the Huge kernel for? Because it has 'hugesupport for many drivers built right into the kernel file, it is ideal for use in installing on wide range of hardware
-After installation Huge is no longer needed, which is why we should make the switch.+After installation Huge kernel is no longer needed, which is why we should make the switch.
  
 ===== Starting the recipe ===== ===== Starting the recipe =====
  
-Login as root, every process will be done by the superuser, after that we will execute the command 'mkinitrd_command_generator.sh' which is present in ///usr/share/mkinitrd//+Login as root, every step in the process will be done by the superuser. After login we will execute the command '''mkinitrd_command_generator.sh'' which is present in ///usr/share/mkinitrd//
  
 <code> <code>
Line 18: Line 18:
 </code> </code>
  
-The output will be an example''mkinitrd'' command-line with the all the modules necessary for booting your machine. Example:+The output will be an example''mkinitrd'' command-line which containsall the modules necessary for booting your machine hardware and accessing the root filesystem. Example output:
  
 <code> <code>
Line 31: Line 31:
 # A suitable 'mkinitrd' command will be: # A suitable 'mkinitrd' command will be:
  
-mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m  +mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
-usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:    +
-usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:     \ +
-hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:+
-ext4 -u -o /boot/initrd.gz+
 </code> </code>
  
-Copy the entire line where it starts with the command '''mkinitrd -c -k ...''' and right after that paste it into your terminal. The ''mkinitrd'' command will be executed and will have output in this format:+Copy the entire line where it starts with the command '''mkinitrd -c -k ...'''paste it into your terminal and press <key>ENTER</key>. The ''mkinitrd'' command will be executed and will have output in this format:
  
 <code> <code>
-mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz+mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
  
 OK: /lib/modules/4.4.172/kernel/drivers/usb/storage/usb-storage.ko added. OK: /lib/modules/4.4.172/kernel/drivers/usb/storage/usb-storage.ko added.
Line 54: Line 50:
  
 <note tip>Tip: the following command will automatically execute the ''mkinitrd'' commandline so that you do not have to copy and paste it yourself:\\ <note tip>Tip: the following command will automatically execute the ''mkinitrd'' commandline so that you do not have to copy and paste it yourself:\\
-<code>$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)</code></note>+<code>$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)</code>\\ 
 +This is useful to execute the command within a script where you can also pass additional parameters such as the partition UUID and a specific file name for initrd.gz:\\ 
 +<code>$(/usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-4.4.172 -a "-o /boot/initrd_specific_file_name.gz -r "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122"")</code>\\ 
 +In the note above replace the kernel number, the UUID 32 digits hexadecimal number and the initrd filename based on what you have on you system.</note>
  
 After that we will enter in lilo the information needed for Kernel Generic to be able to load, you can do this manually or you can simply run the command: '''/usr/share/mkinitrd/mkinitrd_command_generator.sh''' with the "-l" option then pass the full path to the location of vmlinuz-generic. After that we will enter in lilo the information needed for Kernel Generic to be able to load, you can do this manually or you can simply run the command: '''/usr/share/mkinitrd/mkinitrd_command_generator.sh''' with the "-l" option then pass the full path to the location of vmlinuz-generic.
  
 <code> <code>
-/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.172+/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.172
  
 image = /boot/vmlinuz-generic-4.4.172 image = /boot/vmlinuz-generic-4.4.172
Line 69: Line 68:
 </code> </code>
  
-Now let's add this information to "/etc/lilo.conf". Add the block of text above (starting with "image =") at the end of lilo.conf. It is extremely important that you do NOT delete the Kernel Huge call, always leave it in case of tragedy with your system. . This for a possible rescue. +Now let's add this information to "/etc/lilo.conf". Add the block of text above (starting with "image =") at the end of lilo.conf. One way of doing that is: <code> 
- +/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.172 >> /etc/lilo.conf 
-Change the label to a better name like "Generic" or something. This label will be appearing on the Lilo screen. With a better name it is easier for you to identify your new boot selection. After you have done the whole process you need to run '''lilo''' for the new configuration to be saved:+</code> 
 +It is extremely important that you do NOT delete the section for the Huge kernel from ''/etc/lilo.conf'', always leave it in case of tragedy with your system. . This for a possible rescue. More generally speaking: never touch the section in ''/etc/lilo.conf'' which defines the kernel you are running at the moment.
  
 +Using an ASCII text editor, you now change the value of the //label// statement to a better name like "Generic" or something. This text-label  will be appearing in the selection menu on the Lilo screen. With a better name it is easier for you to identify and select your new kernel. \\ After you have done the above steps you need to run the command '''lilo''' for the new configuration to be saved (note that you always need to re-run ''lilo'' after you do something to your boot kernels):
 <code> <code>
 lilo lilo
Line 82: Line 83:
 </code> </code>
  
-Ready! Now just reboot your machine and select Kernel Generic.+Ready! Now just reboot your machine and select your "Generic" kernel.
  
 ====== Sources ====== ====== Sources ======
 howtos:slackware:kernel_huge_for_generic ()