Sunday, 13 July 2025

grub

grub-mkconfig - generate a GRUB configuration file

  • grub-mkconfig -o /boot/grub/grub.cfg

mkinitrd after uprade but before reboot
    Skip 1 to 3 below. 

mkinitrd after upgrade of kernel (fresh install of slackware64 15.0 and then upgrade packages of kernel results in unbootable system.)

  1. Important to mkinitrd to build the modules before rebooting. If rebooted without mkinitrd then the system crashes. Boot with usb and run below.
    • mkdir /mnt/Slackware
    • mount -t ext4 /dev/sda3 /mnt/Slackware
    • mount -t proc /proc /mnt/Slackware/proc
    • mount --rbind /sys /mnt/Slackware/sys
    • mount --rbind /dev /mnt/Slackware/dev
    • mount --rbind /run /mnt/Slackware/run
    • chroot /mnt/Slackware env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h
    • mount /dev/sda1 /boot/efi   (Incase of EFI boot - Mount the boot partition)
  2. Check the version of the upgrade kernel and replace in command. /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.2.29
  3. Run the mkinitrd as shown in step 3. eg
    • mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sda2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz
  4. Run one of below
    • a) For lilo check the entry in /etc/lilo.conf and run lilo -v
    • b) For EFI Check that /boot/efi partition is mounted and copy /boot/initrd.gz to /boot/efi/EFI/Slackware and run eliloconfig 
    • c) For grub Check that /boot/efi partition is mounted and copy /boot/initrd.gz to /boot/efi/EFI/Slackware
  5. Run update-grub or grub-mkconfig -o /boot/grub/grub.cfg 

TermRecord

TermRecord is a simple terminal session recorder with easy-to-share self-contained HTML output! TermRecord -o /tmp/session.html