LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-09-2013, 09:59 PM   #16
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273

Quote:
Originally Posted by enorbet View Post
I can't help but wonder why anyone would want to add what seems to me unnecessary complexity.
Hi enorbet. In my case I use initrd because I use RAID and partition encryption.

I wouldn't use initrd otherwise.
 
Old 12-09-2013, 10:43 PM   #17
thegoofeedude
Member
 
Registered: Aug 2004
Distribution: Slackware 13.37, 14.1
Posts: 75

Original Poster
Rep: Reputation: 17
Thank you all for your helpful replies!

The reason I was trying to get the kernel to boot with an initrd was so I could encrypt my root partition. I have since decided to only encrypt /home (and swap), thus avoiding the need to boot with an initrd (a decision based purely on my lack of time to play with it any longer.)

Before playing with grub2, I tried a lot of the suggestions above.

Then, I used grub2 to boot the system. It found the initrd I had created in /boot and added the appropriate parameters to load it with the kernel, but the configuration only listed the huge kernel in the menu. I booted into grub and manually edited the entry to point to the generic kernel, but later fell into despair peeking in /etc/grub.d to make those changes permanent. That's when I gave up and decided to just go back to trusty old lilo and abandon the need for an initrd altogether.

grub2 appears to be a massive piece of software; basically an entire OS just to boot linux. While I think it can do the job of booting the kernel with an initrd so I could unlock an encrypted root partition, I just ran out of time to learn about it/play with it. Thanks again for all your helpful replies!
 
Old 12-10-2013, 10:21 AM   #18
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
I booted into grub and manually edited the entry to point to the generic kernel, but later fell into despair peeking in /etc/grub.d to make those changes permanent.
Too bad I didn't see where you asked about that. The place you should have looked to make your edits permanent was /boot/grub/grub.cfg.

The stuff in /etc/grub.d is used by grub-mkconfig.

I've been using this to create my grub configuration for slackware: 09_slackware_linux.txt

Drop it into /etc/grub.d, remove the .txt extension, make it executable and run
Code:
grub-mkconfig
(no parameters, mind you!) to see what it outputs. (It's a hack of 10_linux that will place any generic vmlinuz-generic kernels first in order. It will also attempt to match a versioned initrd with a matching kernel version, which is nice to have when upgrading.)
 
1 members found this post helpful.
Old 12-10-2013, 11:44 AM   #19
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by Richard Cranium View Post
Too bad I didn't see where you asked about that. The place you should have looked to make your edits permanent was /boot/grub/grub.cfg.

The stuff in /etc/grub.d is used by grub-mkconfig.

I've been using this to create my grub configuration for slackware: Attachment 14180

Drop it into /etc/grub.d, remove the .txt extension, make it executable and run
Code:
grub-mkconfig
(no parameters, mind you!) to see what it outputs. (It's a hack of 10_linux that will place any generic vmlinuz-generic kernels first in order. It will also attempt to match a versioned initrd with a matching kernel version, which is nice to have when upgrading.)
I guess this answers my question here.
 
Old 12-10-2013, 03:42 PM   #20
Claudiu.Ionel
LQ Newbie
 
Registered: May 2013
Location: home
Distribution: Slackware
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
Greetings
Since even now that I have very modern hardware (on this box anyway) and I have never had to use an initrd, I can't help but wonder why anyone would want to add what seems to me unnecessary complexity. So would you at some point say what it is you hope to gain through this extra step(s)? I'm not trying to dissuade you from doing so, just wondering why anyone would.
You can use initrd to load everything you need for your hardware, at boot time, as a module.
In this way you use less memory and make your system leaner and faster at boot.
 
Old 12-10-2013, 05:24 PM   #21
enorbet
LQ Guru
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 5,090

Rep: Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741
Quote:
Originally Posted by Claudiu.Ionel View Post
You can use initrd to load everything you need for your hardware, at boot time, as a module.
In this way you use less memory and make your system leaner and faster at boot.
Thanks, Claudiu.Ionel, but I am very (and sometimes, painfully) aware of what initrd can do, with the exception that I was unaware that RAID actually requires it. I knew encryption does but I'm unconcerned with encrypting root. It is just that I am an ancient and constant Slackware user for a reason - Less Is More, Simply Elegant - you know, all the common descriptions and initrd in most cases seems not only overly complicated for what it has to do but in most cases, superfluous and redundant.

Presently I am at an Xfce desktop with Firefox open with some 23 tabs, have KPlayer playing a music DVD, have 2 consoles open as well as 2 instances of Dolphin and I'm using less than 10% of ram. So I don't care about some miniscule memory gain, and suspect most people today have in excess of 2Gigs of RAM and don't care either.

It is fairly unusual, even though this is a "play" desktop box, for me to have uptimes measured in less than days, so I really don't care if I can shave 2 seconds off a 10 second boot. It just isn't that much of a gain as rarely as I boot and as small a gain as a few seconds are.

To be more clear, I enjoy lean 'n mean speed as much as the next guy, but years of being an avid overclocker taught me that making a PC faster at the expense of simplicity and stability is much like building a 200 mph Fuel Dragster with sloppy suspension - at the very least it is nothing to be proud of and at worst, it's a suicide machine.

Sorry to be so long-winded about such a trivial matter but I try to keep up with the changes I must, and always decide for myself if the juice is worth the squeeze. Also since Slackware is the very last Linux to stay close to such principles, I feel compelled to chime in and resist unnecessary changes. There are already too many distros that try to be "free windows" or appeal to some sense of convenience or apparent speed, often, not based in fact.
 
Old 12-10-2013, 06:09 PM   #22
Noony
LQ Newbie
 
Registered: Feb 2009
Distribution: Slackware
Posts: 18

Rep: Reputation: 0
Quote:
Originally Posted by enorbet View Post
Greetings
Since even now that I have very modern hardware (on this box anyway) and I have never had to use an initrd, I can't help but wonder why anyone would want to add what seems to me unnecessary complexity. So would you at some point say what it is you hope to gain through this extra step(s)? I'm not trying to dissuade you from doing so, just wondering why anyone would.
In my case I can not use any version of Slackware newer than 13.0 unless I use initrd. Those dynamically changing partition names render the installed systems to be unbootable with lilo. The solution was to use labeled partitions. In order to use partition labels in lilo, one must use initrd.
 
Old 12-10-2013, 06:48 PM   #23
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
Originally Posted by enorbet View Post
Greetings
Since even now that I have very modern hardware (on this box anyway) and I have never had to use an initrd, I can't help but wonder why anyone would want to add what seems to me unnecessary complexity. So would you at some point say what it is you hope to gain through this extra step(s)? I'm not trying to dissuade you from doing so, just wondering why anyone would.
I guess you don't read the wonderful documentation.


From CHANGES_AND_HINTS.TXT:
Quote:
Use one of the provided generic kernels for daily use. Do not report
bugs until/unless you have reproduced them using one of the stock
generic kernels. You will need to create an initrd in order to boot
the generic kernels - see /boot/README.initrd for instructions.
The huge kernels are primarily intended as "installer" and "emergency"
kernels in case you forget to make an initrd.
And with the /usr/share/mkinitrd/mkinitrd_command_generator.sh script, it is pretty painless to create and use an initrd.

Last edited by Richard Cranium; 12-10-2013 at 06:50 PM.
 
Old 12-10-2013, 06:51 PM   #24
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
Originally Posted by aaditya View Post
I guess this answers my question here.
*cough* Yeah, I guess it does.
 
Old 12-10-2013, 11:25 PM   #25
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by enorbet View Post
... I have never had to use an initrd, I can't help but wonder why anyone would want to add what seems to me unnecessary complexity.So would you at some point say what it is you hope to gain through this extra step(s)? I'm not trying to dissuade you from doing so, just wondering why anyone would.
I have wondered about this myself. I always make an initrd and use the generic kernel to boot Slackware because this is what Pat always recommends in the Changes And Hints.txt with each new Slackware release.
It is worth noting here that the Salix developers do not bother with a generic kernel and just use the stock Slackware huge kernel.

For what it's worth, I have always booted Slackware from (L)ubuntu's grub, since I dual boot, and I have never had any problems booting Slackware's generic kernel with grub legacy or grub2.

Last edited by tommcd; 12-10-2013 at 11:31 PM.
 
Old 12-10-2013, 11:39 PM   #26
enorbet
LQ Guru
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 5,090

Rep: Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741
Quote:
Originally Posted by Richard Cranium View Post
I guess you don't read the wonderful documentation.


From CHANGES_AND_HINTS.TXT:

And with the /usr/share/mkinitrd/mkinitrd_command_generator.sh script, it is pretty painless to create and use an initrd.
Oh I read them. I just don't need the generic kernels. I just make my own kernel using "make oldconfig". This box is an Asrock 77 Extreme 4 w/ 2 Internal SATA's and 2 eSATAs and I'm presently running Slackware v14 but with my custom 3.12.0-smp low-latency, realtime kernel. No need for an initrd here no matter how painless some find it.

In fact part of the reason I posted here was that I was in the process of cursing Grub2 (on the 2nd Disk) in OpenSuSe since an automated kernel updated borked the Windows Bootloader portion of Grub. Almost went bald yanking out hair since it looked like it should've functioned. Finally just added it to Slackware's Lilo (on 1st Disk), as simple as

Code:
 other = /dev/sda3
label = Win7
and it worked just peachy

In a few days I discovered that OpenSuse was not consistent in drive/partition labeling when one changes Boot Order in Bios so changing the entry from (autodetected) " set root='hd0,msdos3' " to " set root='hd1,msdos3' " and totally disabling OS_Prober fixed it.

So the purpose of my post was to see if there really was any compelling reason for me to accept any increased complexity. Thankfully, there is none. I may have to accept that junk in my secondary systems, but kudos to the Slackware Team, NOT in Slackware.
 
Old 12-11-2013, 02:11 AM   #27
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by Richard Cranium View Post
*cough* Yeah, I guess it does.
Thanks for the script
 
Old 12-11-2013, 09:55 AM   #28
enorbet
LQ Guru
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 5,090

Rep: Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741Reputation: 4741
Quote:
Originally Posted by tommcd View Post
I have wondered about this myself. I always make an initrd and use the generic kernel to boot Slackware because this is what Pat always recommends in the Changes And Hints.txt with each new Slackware release.
It is worth noting here that the Salix developers do not bother with a generic kernel and just use the stock Slackware huge kernel.

For what it's worth, I have always booted Slackware from (L)ubuntu's grub, since I dual boot, and I have never had any problems booting Slackware's generic kernel with grub legacy or grub2.
Greetz
Although I would never suppose to speak for Patrick and I have no idea how he sets up his machine(s), but it seems to me he has done a great job of sticking to his earliest credos of not presupposing how admins and users will employ his system. I'm not so sure Patrick is "recommending" as much as merely "offering one solution". It seems he wishes to create a system that is so fundamental and malleable that one can build a tent or a skyscraper with the same "block". OTOH, the last I read from Eric on AlienBoB's blog irrc, he does not use an initrd.

Somewhere recently I read a humorous (but nonetheless truthful) observation, that within every two years, software becomes twice as bloated, therefore nullifying Moore's Law Some of this is fueled by the move to higher level languages but much of it is just our lust for "new and improved" but we say that phrase as if the words are joined at the hip, when very often "new" and even "improved" comes at considerable cost, and in some areas it is moot if there is any improvement at all.

For a long time when testing out new distros or versions I found myself trying to modify them to make them do things the way that was familiar to me. Basically, I tried to make them Slackware. This invariably broke them ...hopelessly broke them in many cases. So I learned to savor differences and not "pour Catsup on every foodstuff about to enter my mouth".

I really would still rather replace Grub2 with Lilo on OpenSuSe (and may do so just as an exercise on a spare box) but just because I still appreciate the lasting power of Vintage Cars doesn't mean I try to replace computerized ignition with points 'n plugs, or disable the airbags, but I am most assuredly NOT going to install them in a '57 Chevy (although I am rather fond of replacing the transmission with a 4-speed w/ Hurst Floor Shifter ).

Since Slackware is the last remaining distro to not blindly rush into supposedly "new and improved", I will do my level best to see it remain that way and not morph into an "also ran" at the very least, on any machine I build.

So at this stage I am very glad that initrd offers me no dividend for the investment. I'll keep it simple.
 
Old 12-11-2013, 07:56 PM   #29
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,860

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Quote:
In fact part of the reason I posted here was that I was in the process of cursing Grub2 (on the 2nd Disk) in OpenSuSe since an automated kernel updated borked the Windows Bootloader portion of Grub.
With grub, unlike lilo, you can interactively figure out how to make your boot work.
 
Old 12-11-2013, 08:27 PM   #30
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121
I find the Generic kernel + initrd.gz to be too bothersome at times to really work with, so I just stick to the Huge kernel.

There's nothing wrong with using Huge for daily work. if the initrd.gz boot is giving you a fit, just stick to Huge. It'll work anyway without the extra needed setup parameters.
 
  


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
kernel panic due to /initrd deleted linux_ecil Linux - Kernel 1 07-10-2006 08:30 AM
bootsplash causes kernel panic after modifying initrd bewareofthesnowman Linux - Software 2 02-28-2006 06:33 PM
cramfs, kernel-panic...initrd, bootsplash... Outabux Debian 3 10-26-2004 06:42 PM
initrd & kernel panic asjapulk Linux - General 2 01-13-2004 01:35 AM
initrd kernel panic gavares Linux - General 0 08-25-2003 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration