Sunday, October 29, 2023

BIOS Updates and UEFI

I finally figured out how to rebuild my EFI boot entry after a BIOS update. I boot to the Slackware USB boot drive. When it has me select a kernel I hit tab and enter the following command:

huge.s root=/dev/nvme0n1p2 rdinit=ro

Then once it finally boots to my existing Slackware installation, I issue this command:

efibootmgr -c -d /dev/nvme0n1p1 -l "\\EFI\\Slackware\\elilo.efi" -L "Slackware"

I wish that the EFI boot entry wouldn't be deleted, but since the BIOS updater automatically clears all BIOS settings, it is inevitable.

Update 3/18/2024: I finally got smart and make a shell script for the efibootmgr command and put it in /root so that it's handy whenever I have a new BIOS available.

Sunday, February 19, 2023

Even More UEFI Stuff

About five years ago I posted about getting UEFI to work with Slackware and elilo. I made it a bit more confusing than it needed to be. To make an initrd, you just need to go into the /boot directory as root and use the command geninitrd. Slackware will automagically make the proper initrd.gz so your system will boot.

Then copy the generic and huge kernels as well as initrd.gz to /boot/efi/EFI/Slackware. eliloconfig will create an elilo.conf file there but it will only create one entry. You can make your own. The syntax is very similar to lilo. Here's my current elilo.conf. I noticed there was some weirdness in the one from five years ago. This is for the latest kernel as of this writing on my fancy new WD Black NVMe drive. Zoom!

chooser=simple
delay=100
timeout=100
prompt
#
image=vmlinuz-generic-5.15.94
       label=generic
       description="Slackware 15.0"
       initrd=initrd.gz
       read-only
       append="root=/dev/nvme0n1p2 vga=normal ro"

image=vmlinuz-huge-5.15.94
       label=huge
       description="Slackware 15.0 Huge"
       read-only
       append="root=/dev/nvme0n1p2 vga=normal ro"

Friday, October 1, 2021

Wake for Cron

I recently installed an SSD in my computer and decided to upgrade to Slackware -current (the developmental branch, soon to be Slackware 15). One pleasant surprise is that for the first time my computer will sleep and wake properly. That's great, but that means the various cron jobs won't run because my computer will be asleep when they're supposed to run. I thought of using anacron since I had used that many moons ago when I was running Red Hat. My concern was that it hadn't been updated since June 2000.

So I did a little research and decided to use rtcwake. That will make the computer wake up at a time you set. I checked /usr/spool/cron/crontabs/root to see when the cron jobs run. Turns out that daily runs at 4:40 A.M., weekly at 4:30, and monthly at 4:20. I knew that when my computer woke up, KDE would automatically put it back to sleep after an hour. So I decided to wake it up at 4:10 A.M. Everything seemed to work fine. So I created another file in cron.daily called rtcwake with the following in it:

#!/bin/sh
/usr/sbin/rtcwake -m no -l -t $(date +\%s -d "tomorrow 04:10")

The -m no tells it not to immediately put the device to sleep. -l means that the clock is set to local time and not UTC. The crazy looking date command translates "tomorrow at 4:10 A.M." into the time since the Unix epoch (number of seconds since midnight on January 1, 1970) which the rtcwake command command needs. I executed the command on its own last night. It ran properly. That cron job makes sure it will run tomorrow too. Pretty handy!

Sunday, December 16, 2018

Fix for Asus Chromebook Flip C302CA Not Charging

I had a mild heart attack this evening when I tried to charge my Asus Chromebook Flip C302CA and nothing would happen. Unfortunately those who have a USB C charger here were already in bed, so I couldn't check if it was the charger or the Chromebook itself. Turns out it was the latter. A quick Google search turned up this Reddit post with a solution. I just had to hold the reload button and then tap the power button. Apparently that does an EC reset that resets the charging controller. Now it is safely recharging. Crisis averted.

Saturday, July 28, 2018

Brother HL-L2350DW and WiFi

I bought a new Brother HL-L2350DW because my old Brother printer was needing a new drum and had some other minor issues. It served me well for many years. However, I noticed with the HL-L2350DW that after it went to sleep, it wouldn't wake up to print. Hitting buttons, opening and closing the lid on it, etc. didn't help. After a little Googling I found a culprit. I had to change a setting on my router (Asus RT-86U). It's under Wireless->Professional. I had to switch "Airtime Fairness" to "Disable." Thankfully it just has to be on the 2.4Ghz channel so it shouldn't be a big deal to my network (hopefully).

Now if I could just figure out how to get my Chromebook to work with it without using Google Cloud Print . . .

Tuesday, February 13, 2018

UEFI and Slackware 14.2

I inherited my dad's computer that has Secure Boot/UEFI. Here's what I had to do to get elilo to work:
  1. Create an initrd (I'm using the generic kernel). I used this command in the /boot directory:
    mkinitrd -c -k 4.4.115 -m ext4 -f ext4 -r /dev/sda3
    This assumes that you are using ext4 and that /dev/sda3 is root
  2. Copy initrd.gz, vmlinuz-generic-4.4.115, and vmlinuz-huge to /boot/efi/EFI/Slackware
  3. Edit elilo.conf to reflect the boot parameters you want. Mine looks like this:
    default=generic
    prompt chooser=simple
    delay=100
    timeout=100
    #
    image=vmlinuz-generic-4.4.115
         initrd=initrd.gz
         root=/dev/sda3
         label=generic
         description="Slackware64 14.2"
         read-only

    image=vmlinuz
         root=/dev/sda3
         label=huge description="Slackware64 14.2 Huge"
         read-only
         append="root=/dev/sda3 vga=normal ro"

Wednesday, January 11, 2017

HDMI Sound in Slackware64 14.2

Phew! Gotta blow some dust off the ol' blog! Anyway, I recently installed Slackware64 14.2 and AlienBob's Plasma 5 packages. I was struggling to get HDMI sound to work. After lots of searching, trial, and error, I finally figured it out. I found that I had to go to the Configuration tab in pavucontrol. There were two options for built-in audio. The one profile said "Digital Stereo (HDMI) Output." I left that one alone. The other one said "Analog Stereo Output." I had to change that one to "Off." Then it worked fine.