LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 04-08-2007, 12:01 PM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Trouble using initrd : no cpio magic


I made an initrd following Patrick Volkerding's instructions:
http://mirrors.dotsrc.org/slackware/.../README.initrd

but when i boot, i have a kernel panic : no cpio magic.
Some ideas ? Need some info ?
 
Old 04-08-2007, 03:27 PM   #2
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
the error message is indeed right. mkinitrd does not create a cpio archive, but a gunzipped ext2 filesystem.
i don't ave any special idea. never saw that message.
we'll need some more info. custom kernel, root filesystem, etc.
 
Old 04-08-2007, 04:16 PM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Kernel 2.6.20.4.
Reiserfs.
Mobo chipsets and reiserfs built inside the kernel.
 
Old 04-08-2007, 04:41 PM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by erklaerbaer
we'll need some more info. custom kernel, root filesystem, etc.
Also, what version of Slackware? How up to date on the patches? Anything special installed that changed/replaced core libs?

Eric
 
Old 04-08-2007, 04:58 PM   #5
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
apropops, do you, eric, know why slackware doesn't use an cpio initramfs? seems to be the standard for 2.6 kernels. at least it's what everybody else is doing^^

Last edited by erklaerbaer; 04-08-2007 at 04:59 PM.
 
Old 04-08-2007, 05:03 PM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by erklaerbaer
apropops, do you, eric, know why slackware doesn't use an cpio initramfs? seems to be the standard for 2.6 kernels. at least it's what everybody else is doing^^
I guess the mkinitrd script in slackware-current will sometime be upgraded to use an initramfs before it hits stable. The initrd image that is used in the Slackware installer already is an initramfs.

Eric
 
Old 04-08-2007, 05:25 PM   #7
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Slackware-11, all patches applied and no core libs replaced.
 
Old 04-08-2007, 06:08 PM   #8
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
init/initramfs.c

Code:
/**
 * memcmp - Compare two areas of memory
 * @cs: One area of memory
 * @ct: Another area of memory
 * @count: The size of the area.
 */
Code:
static int __init do_header(void)
{
	if (memcmp(collected, "070701", 6)) {
		error("no cpio magic");
		return 1;
	}


Code:
static int __init do_collect(void)
{
	unsigned n = remains;
	if (count < n)
		n = count;
	memcpy(collect, victim, n);
	eat(n);
	collect += n;
	if ((remains -= n) != 0)
		return 1;
	state = next_state;
	return 0;
}



does it work with a stock kernel?

Code:
grep CONFIG_BLK_DEV_INITRD .config
greo CONFIG_BLK_DEV_RAM .config
?
 
Old 04-15-2007, 06:30 PM   #9
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
From the -current changelog :

a/cpio-2.5-i486-3.tgz: Recompiled. Newer versions break initramfs in the
2.6.18.x kernels, so we'll still have to wait on an upgrade...
Fixed broken manpages. Thanks for the reports from Tsomi and Lilong Li.
 
Old 04-15-2007, 10:42 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
That has nothing to do with it. The cpio in Slackware was never broken. An initramfs is already used on the install CD for instance.
Only newer versions of cpio are problematic.

Eric
 
Old 04-17-2007, 08:43 AM   #11
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Roger that.
I'll try at next kernel version, and i'll compile some stuff inside kernel instead of modules.
 
  


Reply



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 - not syncing: no cpio magic StanleyP Linux - Newbie 2 09-20-2006 05:35 PM
why bootsplash can't work with cpio-typed initrd kyven zhang Linux - Software 0 01-13-2005 07:47 AM
Redhat 9 Install - cpio bad magic yong_sa Linux - Newbie 11 10-12-2003 05:47 PM
cpio: bad magic when trying to install RH9 tenraek Linux - Software 2 06-07-2003 05:57 PM
CPIO:bad Magic anoop_chandran Linux - Software 1 11-24-2001 02:13 AM

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

All times are GMT -5. The time now is 10:56 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
Open Source Consulting | Domain Registration