LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices

Reply
 
Search this Thread
Old 07-27-2007, 08:41 AM   #1
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Rep: Reputation: 15
how to make initrd?


After playing around with linux livecds and frugal installs for a bit I've decided to a 'real' linux install with slackware 12.
I have a working frugal installation (livecd booting off the iso image on harddrive) of PuppyLinux 2.16 on my harddrive using grub. The installation went fine but when I tried to reboot afterwoods using grub
the kernel panics with 'no init found. try passing init = option to the kernel'. I tried booting with noinitrd but this didnt work. Exploring /boot/ with puppy I couldnt find an init image but did find the man page link explaining how to make one to boot slackware, using a slackware utility. This seems a bit catch-22. Should I need an initrd? Is there other ways to make one? My grub menu entry is:

Code:
root (hd0,4)
kernel /boot/vmlinuz-huge-smp-2.6.21.5-smp
The machine is a dell inspiron 6400 laptop, core 2 duo and scsi hard drive (sda).

edit: No it appears to be working now. added 'root=/dev/sda5 ro noinitrd' to grub kernel entry. If this is about to screw me over real bad please tell.

Last edited by samwise17; 07-27-2007 at 08:54 AM.
 
Old 07-27-2007, 08:47 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
You don't need an initrd to use or install Slackware (beyond the fact that the installer is an initrd, obviously). I have been using Slackware for many years, and have never even looked at the initrd tools.

I am a bit confused by your situation though. Is there a particular reason you can't just put the Slackware CD in and install normally? Or have you already installed Slackware, and are just trying to get GRUB to boot it?
 
Old 07-27-2007, 06:01 PM   #3
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Original Poster
Rep: Reputation: 15
I had already installed slackware - the problem was to get grub to boot it.

Its now working when I add

Code:
root=/dev/sda5 ro noinitrd
to the kernel section of my grub entry.
 
Old 07-27-2007, 06:05 PM   #4
m.andrew.dennis
LQ Newbie
 
Registered: Jul 2007
Location: Dallas, TX
Distribution: Slackware
Posts: 11

Rep: Reputation: 0
RE: how to make initrd

Actually, if you installed one of the "generic" kernels instead of a huge one, you will need an initrd with slack-12
I don't use grub to boot, so I can't give any info on changing the menu.lst file, but here's how I made my initrd

You'll need to reboot your machine, using the slackware install dvd/cd and at the boot prompt type:

hugesmp.s root=/dev/hda1 rdinit= ro

(replace /dev/hda1 with wherever your root directory for slack is, and the space after rdinit= is there on purpose!!)

once it boots, change to the /boot directory
cd /boot

and type the following

mkinitrd -c -k 2.6.21.5-smp -m ext3

(leave off the smp if you installed the "other" generic kernel.
however, pat recommends even single processor boxes to use the smp kernels if possible)
if you formatted with reiserfs, or one of the other possibilities, just use -m whateverfilesystemyouchose
you'll need the cpio package installed, along with the corresponding kernel-modules package.
finally, edit grub's menu.lst file and add
initrd=/boot/initrd.gz just below the kernel specification for your slackware install.

Of course, you can always just use the huge.s or hugesmp.s kernels and forget it all!!

Good luck, let me know if it works!! (I'm mostly concerned about the grub part, I had to do a google search to find out where to add the initrd.gz line.
 
Old 07-28-2007, 08:19 AM   #5
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Original Poster
Rep: Reputation: 15
hmm... well its working with hugesmp so I think ill leave it for now and move on. Thanks guys.
 
Old 08-19-2007, 04:07 PM   #6
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Rep: Reputation: 50
Do you or don't you need initrd to normally boot hugesmp.s?

Quote:
Originally Posted by MS3FGX View Post
You don't need an initrd to use or install Slackware (beyond the fact that the installer is an initrd, obviously).
This is confusing what is obvious? Slackware Installers are initrd based? I use loadlin 16c
With the changing and increased size of kernels I am confused as to whether or not initrd is need to normally boot hugesmp.s... I have not had a working slackware box for years, only partially working, but I haven't quit. lolol
 
Old 08-19-2007, 04:32 PM   #7
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
The installer is an initrd, simply because there is nothing installed on the system yet. The install CD needs to boot the kernel to a self-contained initrd, since there is nothing else to boot. I thought that was a rather obvious conclusion, as you can't boot the kernel to a blank drive (or one with Windows on it, at least...). If there is already an installed Slackware system however, then the install CD can be pointed to that instead, and then becomes somewhat of a rescue CD in the event your installed kernel has become unbootable.

As for what is required for the stock kernels, I honestly don't know for Slackware 12. It was never required in earlier Slackware releases, but the 2.6 kernels have changed the game considerably.

I have never used the stock Slackware kernel on any machine I have ever run, on any Slackware release, so I am certainly an authority pertaining to them.

Last edited by MS3FGX; 08-19-2007 at 04:33 PM.
 
Old 08-19-2007, 07:41 PM   #8
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Rep: Reputation: 50
Ms3fgx

Thanks, no wonder I am all confused I am using Loadlin to boot, not install. I thought u need initrd + vmlinuz to boot because hugesmp.s kernel size. As in this linux.bat file:

@echo off

smartdrv /C
c:\loadlin\loadlin c:\loadlin\vmlinuz root=/dev/hdg2 ro vga=3
intrid=diskimage

You say initrd is used to install not for booting, right? So I can remove the intrid=diskimage line?
 
Old 08-20-2007, 09:21 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,197
Blog Entries: 3

Rep: Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425Reputation: 1425
Quote:
Originally Posted by MS3FGX View Post
As for what is required for the stock kernels, I honestly don't know for Slackware 12. It was never required in earlier Slackware releases, but the 2.6 kernels have changed the game considerably.

I have never used the stock Slackware kernel on any machine I have ever run, on any Slackware release, so I am certainly an authority pertaining to them.
Hi,

A good place to learn about the Slackware 12 changes is ; CHANGES_AND_HINTS.TXT, UPGRADE.TXT and RELEASE_NOTES!

You could look at the Slackware 12 section of 'Slackware-Links' for some good reference.
 
Old 09-03-2007, 05:03 AM   #10
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Original Poster
Rep: Reputation: 15
Thought seeing as I started this I would finalise it.
After using the huge kernel for several months now, I switched to the generic kernel.
I (successfully) made the initrd with
Quote:
mkinitrd -c -k 2.6.21.5-smp -r /dev/sda5 -f ext2 -m ext2:ata_generic
in /boot.
Added
Quote:
initrd=/boot/initrd.gz
to menu.lst in grub.
the ata_generic module is for the sata hard drive.
Boots and runs fine.
Next project is download and compile the latest kernel source.

Thanks to everyone who posted

Last edited by samwise17; 09-03-2007 at 05:06 AM.
 
Old 09-05-2007, 12:18 AM   #11
johnhamiltion
Member
 
Registered: Aug 2007
Posts: 92

Rep: Reputation: 15
Quote:
Originally Posted by samwise17 View Post
Next project is download and compile the latest kernel source.
Instructions for your next project can be found here:

"Compiling yourself a new Kernel (with Reiser4 support)."
http://linuxhelp.150m.com/installs/compile-kernel.htm
 
Old 09-05-2007, 03:17 AM   #12
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Original Poster
Rep: Reputation: 15
Ooh im a fan of reiserfs - was wondering how I could start using reiser4. Thanks for the pointer.
 
Old 09-16-2007, 08:04 AM   #13
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Rep: Reputation: 30
Here is how to unpack and pack a cpio initrd from

"Getting the Boot Splash Working."
http://linuxhelp.150m.com/boot/bootsplash.htm or

http://www.linuxquestions.org/questi...d.php?t=583359

Save old initrd and unpack it.

cd /boot; mv initrd-2.6.22 initrd-2.6.22.old
mkdir /boot/initrd.dir
cd /boot/initrd.dir
gunzip -c ../initrd-2.6.22.old > initrd
cpio -vid < initrd
rm initrd

Add you extra files for the initrd at this point.

In the article a bootsplash image was added

/usr/sbin/splash -s -f /path/to/config/bootsplash-1024x768.cfg > bootsplash

Pack it up again.

find | cpio -o -H newc | gzip -9 > ../initrd-2.6.22
cd /boot; rm -fr /boot/initrd.dir
 
  


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
How to make an initrd for dmraid Erik_FL Slackware 1 09-05-2006 07:47 AM
Is it necessary to make the initrd? jacobselvin Linux - Kernel 3 08-19-2006 08:03 AM
How do I make initrd.img? zahadumy Slackware 2 11-13-2005 09:05 AM
initrd how to make one? watashiwaotaku7 Linux - General 18 03-19-2004 11:53 PM
New Kernel 2.4.22 won't make initrd jon1591 Linux - Newbie 3 12-13-2003 02:09 PM


All times are GMT -5. The time now is 12:42 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