LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (http://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   how to make initrd? (http://www.linuxquestions.org/questions/slackware-installation-40/how-to-make-initrd-572725/)

samwise17 07-27-2007 08:41 AM

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.

MS3FGX 07-27-2007 08:47 AM

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?

samwise17 07-27-2007 06:01 PM

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.

m.andrew.dennis 07-27-2007 06:05 PM

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.

samwise17 07-28-2007 08:19 AM

hmm... well its working with hugesmp so I think ill leave it for now and move on. Thanks guys.

NightSky 08-19-2007 04:07 PM

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

Originally Posted by MS3FGX (Post 2838569)
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

MS3FGX 08-19-2007 04:32 PM

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.

NightSky 08-19-2007 07:41 PM

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?

onebuck 08-20-2007 09:21 AM

Quote:

Originally Posted by MS3FGX (Post 2864029)
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.

samwise17 09-03-2007 05:03 AM

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

johnhamiltion 09-05-2007 12:18 AM

Quote:

Originally Posted by samwise17 (Post 2879511)
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

samwise17 09-05-2007 03:17 AM

Ooh im a fan of reiserfs - was wondering how I could start using reiser4. Thanks for the pointer.

ComputerGreek 09-16-2007 08:04 AM

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


All times are GMT -5. The time now is 11:50 PM.