LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-23-2013, 02:56 AM   #16
s3phir0th115
LQ Newbie
 
Registered: Jan 2007
Distribution: Slackware
Posts: 22

Rep: Reputation: 3

I might have forgotten about it long ago, but now that I manually alter my lilo.conf to add absolute hard drive partition locations based on the drive itself, and do things like use the generic kernel, it just has come with habit.
 
Old 05-23-2013, 03:20 AM   #17
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 226Reputation: 226Reputation: 226
I no longer have this problem.

Any kernel I have in lilo.conf has been copied to a subdir under /boot along with its initrd image.

The kernel images that Slackware installs are therefor not used directly and can be changed without causing grief.
 
Old 05-23-2013, 03:54 AM   #18
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,866

Rep: Reputation: 885Reputation: 885Reputation: 885Reputation: 885Reputation: 885Reputation: 885Reputation: 885
Quote:
Originally Posted by rkelsen View Post
3 cheers for UEFI and eLILO!

Once the new kernel has been added to elilo.conf, there is nothing more to do.
You don't need UEFI for that, Slackware also ships with Syslinux (which includes Extlinux). You can do the same thing.

Once the new kernel has been added to extlinux.conf, there is nothing more to do.
 
Old 05-23-2013, 09:38 AM   #19
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 258

Rep: Reputation: 39
He he - in my wayyy distant youth I used to forget it about every 2nd time - which is the reason why I never use it anymore ... legacy-grub for me, 3 times over!!
 
Old 05-23-2013, 10:43 AM   #20
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,465

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
I have written a modified version of the lookkernel function in slackpkg that checks if a generic kernel has been upgraded. It reminds that a new initrd is needed and will offer to run a mkinitrd command if there is a file /boot/lastmkinitrd.txt.
The file /boot/lastmkinitrd.txt was initially generated with:
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh > /boot/lastmkinitrd.txt
The modified function is in a file /usr/libexec/slackpkg/functions.d/q_mkinitrd-function.sh that needs to be set executable for the modified function to be sourced. The file name is started with q as it needs to be listed after the existing post-functions.sh
Code:
lookkernel() {
        NEWKERNELMD5=$(md5sum /boot/vmlinuz 2>/dev/null)
        if [ "$KERNELMD5" != "$NEWKERNELMD5" ]; then
                if $(stat -c %N /boot/vmlinuz | grep -q generic); then
                       echo -e "\n
Your kernel image was updated to a generic kernel. You need a new initrd."
                        NEWKERNELVERSION=$(stat -c %N /boot/vmlinuz | sed -e "s/'$//" -e 's/.*-\([1-9]\)/\1/')
                        if [ -d /lib/modules/$KERNELVERSION ] && [ -f /boot/lastmkinitrd.txt ]; then
                               MKINITRD_CMD=$(sed 's/-k .\{5,13\} -/-k '$NEWKERNELVERSION' -/' /boot/lastmkinitrd.txt)
                               echo -e "\n
$MKINITRD_CMD
Do you want slackpkg to run the above command? (Y/n)"
                               answer
                               if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
                                        $MKINITRD_CMD && echo "$MKINITRD_CMD" > /boot/lastmkinitrd.txt
                               fi
                        fi
                fi
                if [ -x /sbin/lilo ]; then
                        echo -e "\n
Your kernel image was updated.  We highly recommend you run: lilo
Do you want slackpkg to run lilo now? (Y/n)"
                        answer
                        if [ "$ANSWER" != "n" ] && [ "$ANSWER" != "N" ]; then
                                /sbin/lilo
                        fi
                else
                        echo -e "\n
Your kernel image was updated and lilo is not found on your system.
You may need to adjust your boot manager(like GRUB) to boot appropriate
kernel."
                fi
        fi
}
Now I get the lilo reminder _after_ dealing with the initrd!
 
Old 05-23-2013, 02:27 PM   #21
mattallmill
Member
 
Registered: Nov 2009
Location: Salina,Kansas
Distribution: Slackware64-current
Posts: 205

Rep: Reputation: 31
Quote:
Originally Posted by brianL View Post
Me too. Anybody who hasn't?
Certainly not I. I can't count the number of times I upgraded a kernel (or just compiled a newer version on my own), and forgot to run lilo. Hello, series of 99's!

Painful memories, those. But you live and learn and go on.
 
Old 05-23-2013, 06:58 PM   #22
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,771

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by ruario View Post
You don't need UEFI for that
Actually, I had no choice. It's what came with the laptop. It doesn't have a 'legacy' mode.

I'm guessing it'll only get harder to find non-UEFI hardware from here on out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reminder Command Salem Programming 10 09-23-2012 05:42 AM
[SOLVED] Reminder using cron MTK358 Linux - General 7 04-20-2010 01:36 PM
Reminder application General Linux - Software 1 05-14-2006 03:19 AM
ad reminder jeremy LQ Suggestions & Feedback 8 01-09-2003 03:02 PM
Installation reminder... sspiro Linux - Newbie 0 06-04-2002 05:33 PM


All times are GMT -5. The time now is 10:29 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration