SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just updated my netbook to Slack64-current, with the 3.9.5 kernel. I couldn't seem to get mkinitrd_command_generator.sh to work correctly while 3.8.13 was still running, so I rebooted (I don't run LILO as this is a dual-boot machine with Debian ... I use grub). I knew I would have to boot using the Slack 14 DVD (since I hadn't created an initrd), but I'd done this before, so did not worry too much ...
However, when I rebooted using the disc and attempted to build an initrd, I got the following:
Code:
root@catbutt:/usr/share/mkinitrd# ./mkinitrd_command_generator.sh /boot/vmlinuz-generic-3.9.5
File '/boot/vmlinuz-generic-3.9.5' does not look like it is a kernel file!
and indeed, behold:
Code:
root@catbutt:/boot# file vmlinuz-generic-3.9.5
vmlinuz-generic-3.9.5: x86 boot sector
... huh?
Never seen the like. I mean, sure, I can see where the line in the script is that's generating that message, but ...
... I guess I'm wondering how I convince not only mkinitrd_command_generator.sh, but the file command / my system that that file is indeed a kernel file.
Any advice would be welcome. This has me confused.
root@sl64-current:~# file /boot/vmlinuz-huge-3.9.5
/boot/vmlinuz-huge-3.9.5: x86 boot sector
root@sl64-current:~# file /boot/vmlinuz-generic-3.9.5
/boot/vmlinuz-generic-3.9.5: x86 boot sector
root@sl64-current:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/vmlinuz-huge-3.9.5
File '/boot/vmlinuz-huge-3.9.5' does not look like it is a kernel file!
root@sl64-current:~# uname -a
Linux sl64-current 3.8.13 #2 SMP Sun May 12 17:23:24 CDT 2013 x86_64 QEMU Virtual CPU version 1.2.0 AuthenticAMD GNU/Linux
The 'file' utility changed its output message... bad bad.
This patch to the script will make it work again (for old as well as new Slackware versions):
Code:
$ diff -uar source/a/mkinitrd/mkinitrd_command_generator.sh{.orig,}
--- source/a/mkinitrd/mkinitrd_command_generator.sh.orig 2012-12-11 23:28:40.000000000 +0100
+++ source/a/mkinitrd/mkinitrd_command_generator.sh 2013-06-13 13:16:00.480483900 +0200
@@ -380,7 +380,7 @@
KFILE=$(basename $KFILE)
fi
KFILE=${KFILEPATH}/$KFILE
- if [ -z "$(file $KFILE | grep 'Linux kernel x86 boot')" ]; then
+ if [ -z "$(file $KFILE | grep -E 'Linux kernel x86 boot|x86 boot sector')" ]; then
echo "File '$KFILE' does not look like it is a kernel file!"
exit 1
fi
I will notify Pat so that he can apply this to the Slackware tree.
If the kernel you pass to mkinitrd options is not present, mkinitrd will tell
you with an error message.
Once you know what you *specifically* need and how to do it, write a shell
script yourself. If it takes you more than 30 lines you're giving more
importance to your creation than to the function it was created to.
For example, I don't use LVM or RAID so this is all what I need in my desktop
after a fresh Slackware installation (the awk string contains one space and one
tab between the square brackets):
And being simple is useful like a memory-aid too. When you are in front of a
problem like the one you describe you easily figure out how to workaround it.
Using free software does not free you, your mind does.
I do not think you ever need mkinitrd_commandline_generator.sh with a simple setup like yours.
The script is obviously not meant for you but for others with a more complex setup (LVM, RAID, LUKS, USB keyboard, exotic controllers etc).
I do not think you ever need mkinitrd_commandline_generator.sh with a simple setup like yours.
It's a useful script for anyone wanting to use the generic kernel, and I do think it's better to run the generic kernel than the huge one to get all the unused drivers out of the system memory.
I've never noticed a difference in speed myself, but it's nice to be able to unload and reload non-behaving device drivers (doesn't happen often, but it does happen) by way of reloading modules rather than rebooting the entire system.
Usually I run the mkinitrd_commandline_generator.sh only one time on a new machine, then I just enter the options it provides into /etc/mkinitrd.conf and use mkinitrd directly with the -k and -F options. Works all the time.
---
Just a clarification for the readers of this forum.
The Barrel of Shit Theory vs the Flush Toilet Theory (that I've already used on other thread) is just a funny metaphor that used a school teacher I had in my young years referring to thinking. Using it I am advocating the KISS Unix philosophy that Slackware supposedly follows.
Last edited by eloi; 06-18-2013 at 03:29 AM.
Reason: Added clarification
First, the bug was discussed, a patch was created and submitted already.
Second, I take offense to the phrase "Barrel of Shit" when you refer to this bug that you are not willing to discuss.
For you, only one answer remains: *PLONK*
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.