LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-09-2012, 08:39 AM   #1
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Rep: Reputation: 2
why can't i eliminate the initrd.gz and boot


In order to make hibernation work, withoput LVM setup, i thought, before reading the slackware wiki documentation, that i need an initrd.gz file. So i have made one. Then i read the wiki doc and saw that actually it isn't necessary on a non-LVM system, only the swap resume-specification in lilo is necessary. So i eliminated it from the lilo.conf and expected everything to work fine. But then i couldn't boot anymore. Why is that?
 
Old 11-09-2012, 08:47 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,631

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
i think you boot into a generic kernel which requires an initrd to work
 
1 members found this post helpful.
Old 11-09-2012, 09:04 AM   #3
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
So, only the huge kernel dosn't need initrd, right? It's true that before i (was) used with the huge kernel that i suddenly forced two changes : initrd and generic. If i would've tried generic then only, i would've run into another problem, but looks like thinking in perspective helps you preventing errors

Thanks.

Last edited by mitusf; 11-09-2012 at 09:30 AM.
 
Old 11-09-2012, 12:46 PM   #4
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,490

Rep: Reputation: Disabled
You could also build your own kernel based on the -generic kernel but including whatever modules you need in your initrd.

Brian
 
1 members found this post helpful.
Old 11-09-2012, 01:04 PM   #5
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
Yes, but this requires to read some documentation first. This is a task i have never done before.
 
Old 11-09-2012, 01:11 PM   #6
Stephen Morgan
Member
 
Registered: Feb 2011
Location: England
Distribution: Slackware
Posts: 154

Rep: Reputation: 15
Building a custom kernel isn't as scary as it sounds, if you can make an initrd you can probably do it without too much trouble. The only change you need to make to the config for the generic kernel is to build your filesystem into the kernel itself, rather than as a module as it is in the default kernel. Well, probably, you system might be different, but that seems to be the most common setup.
 
Old 11-09-2012, 02:17 PM   #7
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
I think i'll try. The only scary part was that menu selection with lot's of unknown parts. If you have some well explained document i'll be glad to have it. Or probably i'll search into slackware wiki, which btw seems a very good initiative, imo.
 
Old 11-09-2012, 03:18 PM   #8
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,394

Rep: Reputation: 187Reputation: 187
When you first start compiling your own kernel it is a trial and error learning process. One thing I would suggest is in the general setup select
Quote:
Local version - append to kernel release
and put something there that will differentiate your kernel from the stock kernels. After you have compiled your new kernel copy it to /boot with your local version appended to the end of the kernel name to differenate it form the other kernels in /boot. Then create an entry for your new kernel in /etc/lilo.conf rerun lilo. That way if anything goes wrong your still have the default kernels to fall back on. If you are going to use the generic-config file the most you will have to change, besides what I have already suggested, will be a few drivers in the
Quote:
device drivers
section and the
Quote:
file system
section that are needed to boot the kernel without needing an initrd.gz.

Last edited by colorpurple21859; 11-09-2012 at 03:24 PM.
 
1 members found this post helpful.
Old 11-09-2012, 03:42 PM   #9
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
I understand. Thanks. I think i'll try one of this days, with the newest stable 3.6.6 version and with some help from this page http://alien.slackbook.org/dokuwiki/...kernelbuilding
 
Old 11-09-2012, 06:14 PM   #10
beder
Member
 
Registered: Apr 2011
Posts: 82

Rep: Reputation: 28
I just this days finally successfully built my own kernel WITHOUT an initrd (I always used one before), after 10+ years of lazily compiling using the easy path

Here is how I did it...
I've lately been using AlienBob's script to build the initrd (http://www.slackware.com/~alien/tool...d_generator.sh)
What it does is create the command to create the initrd needed for your machine, based on the current loaded modules
So all I had to do was look at the modules it was loading up, and select them on the kernel config (I found it easier to find them by going vim .config than through make xconfig) and make them be compiled in the kernel instead of as modules

For example, my initrd was generated as follows for kernel 3.6.2 (I'm now on 3.6.6):
mkinitrd -c -k 3.6.2-smp-362-felipe -f ext4 -r /dev/sda3 -m usbhid:ehci-hcd:uhci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd-custom-362-felipe.gz

So what are the modules I need? well, usbhid, ehci-hcd, uhci-hcd, mbcache, jbd2 and ext4!
So I went looking for them on my .config and found each one of them, and marked them as 'y' instead of as 'm', as follows:
from: CONFIG_USB_HID=m
to: CONFIG_USB_HID=y

Do it for each one of the modules, and voilá! It actually worked and I now boot without an initrd :-)
Oh yeah and I used the .config from /testing as a base

Now that's off course just the first step; after you manage to do that for yourself, you can start messing with disabling completely all the modules you don't need to save up on compile time for the kernel!

It's a fun ride I tell you

Last edited by beder; 11-09-2012 at 06:16 PM.
 
1 members found this post helpful.
Old 11-10-2012, 05:53 AM   #11
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
Thanks a lot beder. I have just one question: how did you use the .config from testing? specified it to make using -f flag i suppose? I assume also there is a testing directory in 3.6.6 kernel...
 
Old 11-10-2012, 08:09 AM   #12
mitusf
Member
 
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141

Original Poster
Rep: Reputation: 2
Aha, now i've found out what you meant. The .config from /testing under the Slackware repository.
 
Old 11-10-2012, 09:30 AM   #13
beder
Member
 
Registered: Apr 2011
Posts: 82

Rep: Reputation: 28
Yes exactly, from the /testing repository from Slackware

You can use it by doing make oldconfig, and then you can edit it as you wish

Good luck!

Last edited by beder; 11-10-2012 at 09:33 AM.
 
1 members found this post helpful.
  


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
[SOLVED] How to eliminate one OS from a triple boot drive ineuw Linux - Newbie 14 07-28-2012 01:43 PM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-02-2007 12:24 AM
Boot USB HD without initrd gbowden Linux - Hardware 6 11-18-2006 12:09 PM
Boot without initrd 3saul Linux - Software 3 11-08-2005 12:13 AM
SCSI boot without initrd spencerbray Linux - Newbie 1 01-15-2005 06:48 AM


All times are GMT -5. The time now is 12:27 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration