FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-14-2008, 10:51 PM
Mark Allums
 
Default manipulate initrd from Debian installer

Denny Schierz wrote:

hi,

i have to recompile a kernel (2.6.25.9) to get some hardware working,
for example network cards and 3ware SCSI SATA controller from the
installer (debian-testing-amd64-netinst.iso). But I'm unable to create a
valid kernel and/or initrd.

i did something like:

# mount loop .iso
# copy the contents into a directory
# compile kernel and copy them to cd/install.amd/vmlinuz
# unpack initrd.gz
# copy the modules to lib/modules
# recompress with cpio and gzip
(cd ramdisk/ ; find . -depth -print | cpio -oc > ../newinitrd ; cd .. ;
gzip newinitrd)
# copy the new initrd.gz to cd/install.amd/initrd.gz
# create mkisofs
# starting ...

But, however. I get

a) tried reiserfs,ext3,ext2,cramfs .... "Kernel panic - Unable to mount
...."

b) or if i do mkcramfs ramdisk/ new.cramfs and copy them to
cd/install.amd/initrd.gz, i get "Unable to mount root fs on
unknown-block(253,0)"

and he lists some partitions from ram0 till ram15. He said, i tried to
boot from <NULL> as root=

so, what i have to do. Most pages and Howtos are old. I want to change
only the kernel with his modules, nothing more.

cu denn




Where to start... well, I don't know your level of sophistication with
the kernel, but did you compile the kernel the "Debian way" or the
standard way? Did you use a Debian kernel (looks like not) or a vanilla
kernel? Did you use make oldconfig? If you did it the Debian way, did you,


$ cp /boot/config<your old version>
$ make gconfig <---- if using gnome, otherwise some variant
$ make-kpkhg clean
$ make-kpkg --initrd kernel_image modules_image
$ cd ..
$ dpkg -i linux-image*.deb


If you used a non-Debian kernel, did you,

$ make mrproper
$ make oldconfig
. . .

or maybe

$ make mrproper
$ cp /boot/config<your old version>

as a starting point? And then, possibly,

$ make gconfig
$ make
$ make modules
$ make modules_install
$ depmod -a
$ update-initramfs -c -k <yourversion>
$ make install

or some variation on the above? (Some of the steps above may be
redundant.)


Do you have all the build tools installed? For Debian way, you need
packages build-essential, init-ramfs-tools, kernel-package,
module-assistant, devscripts, and of course the kernel package, and the
dependencies. You might need git-core, or fakeroot, depending on you
setup. ncurses is needed for some of the config tools, and maybe other
things (you also need ncurses-dev).



Mark Allums


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 11:02 PM
Mark Allums
 
Default manipulate initrd from Debian installer

Mark Allums wrote:

Denny Schierz wrote:

hi,

i have to recompile a kernel (2.6.25.9) to get some hardware working,
for example network cards and 3ware SCSI SATA controller from the
installer (debian-testing-amd64-netinst.iso). But I'm unable to create a
valid kernel and/or initrd.

i did something like:

# mount loop .iso
# copy the contents into a directory
# compile kernel and copy them to cd/install.amd/vmlinuz
# unpack initrd.gz
# copy the modules to lib/modules
# recompress with cpio and gzip
(cd ramdisk/ ; find . -depth -print | cpio -oc > ../newinitrd ; cd .. ;
gzip newinitrd)
# copy the new initrd.gz to cd/install.amd/initrd.gz
# create mkisofs
# starting ...

But, however. I get

a) tried reiserfs,ext3,ext2,cramfs .... "Kernel panic - Unable to mount
...."

b) or if i do mkcramfs ramdisk/ new.cramfs and copy them to
cd/install.amd/initrd.gz, i get "Unable to mount root fs on
unknown-block(253,0)"

and he lists some partitions from ram0 till ram15. He said, i tried to
boot from <NULL> as root=

so, what i have to do. Most pages and Howtos are old. I want to change
only the kernel with his modules, nothing more.

cu denn




Where to start... well, I don't know your level of sophistication with
the kernel, but did you compile the kernel the "Debian way" or the
standard way? Did you use a Debian kernel (looks like not) or a vanilla
kernel? Did you use make oldconfig? If you did it the Debian way, did
you,


$ cp /boot/config<your old version>
$ make gconfig <---- if using gnome, otherwise some variant
$ make-kpkhg clean
$ make-kpkg --initrd kernel_image modules_image
$ cd ..
$ dpkg -i linux-image*.deb


If you used a non-Debian kernel, did you,

$ make mrproper
$ make oldconfig
. . .

or maybe

$ make mrproper
$ cp /boot/config<your old version>

as a starting point? And then, possibly,

$ make gconfig
$ make
$ make modules
$ make modules_install
$ depmod -a
$ update-initramfs -c -k <yourversion>
$ make install

or some variation on the above? (Some of the steps above may be
redundant.)


Do you have all the build tools installed? For Debian way, you need
packages build-essential, init-ramfs-tools, kernel-package,
module-assistant, devscripts, and of course the kernel package, and the
dependencies. You might need git-core, or fakeroot, depending on you
setup. ncurses is needed for some of the config tools, and maybe other
things (you also need ncurses-dev).



A typo up there, should be make-kpkg clean.

Also, this all assumes that you are working from the standard directory

/usr/src/linux-source-<yourversion>

These are just some hints or guidelines, you should read the kernel docs:

/usr/src/linux-source-<yourversion>/Documentation

And other stuff. Plenty of stuff on the web, with some diligence
searching. (In English, the kernel does not use the masculine pronoun.
It is usually referred to as an 'it', not a 'he'.)


Mark Allums




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 11:16 PM
Denny Schierz
 
Default manipulate initrd from Debian installer

hi Mark,

Mark Allums schrieb:

>> Where to start... well, I don't know your level of sophistication with
>> the kernel, but did you compile the kernel the "Debian way" or the

shame on me ;-) I used the Debian way via

make-kpkg --rootcmd fakeroot kernel_image --initrd
--append_to_version=.denny

It isn't complicated to get a running Kernel on my system, but it is, to
create a kernel for the Debian Installer.

cu denny

--
Stoppt den Überwachungswahn - Stoppt den Schäuble Katalog:
http://www.nopsis.de
 
Old 07-14-2008, 11:16 PM
Denny Schierz
 
Default manipulate initrd from Debian installer

hi Mark,

Mark Allums schrieb:

>> Where to start... well, I don't know your level of sophistication with
>> the kernel, but did you compile the kernel the "Debian way" or the

shame on me ;-) I used the Debian way via

make-kpkg --rootcmd fakeroot kernel_image --initrd
--append_to_version=.denny

It isn't complicated to get a running Kernel on my system, but it is, to
create a kernel for the Debian Installer.

cu denny

--
Stoppt den Überwachungswahn - Stoppt den Schäuble Katalog:
http://www.nopsis.de



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 11:32 PM
Mark Allums
 
Default manipulate initrd from Debian installer

Denny Schierz wrote:

hi Mark,

Mark Allums schrieb:


Where to start... well, I don't know your level of sophistication with
the kernel, but did you compile the kernel the "Debian way" or the


shame on me ;-) I used the Debian way via

make-kpkg --rootcmd fakeroot kernel_image --initrd
--append_to_version=.denny

It isn't complicated to get a running Kernel on my system, but it is, to
create a kernel for the Debian Installer.

cu denny




Ahh, I beg your pardon.

I don't see where you made the modules or installed them. (You said in
your earlier post that you copied them to a directory.) However, it
looks like your new kernel is looking for something and not finding it.
You seem to be trying to create a custom live CD. Do you use any gnu
or debian tools to automate the process?


If it is a CD, it may need support for the ISO 9660 CD standard. Did
you compile that into the kernel, or the initrd? Once the kernel takes
over from the boot loader, it doesn't know about filesystems unless they
have been compiled in.



Mark Allums


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-14-2008, 11:50 PM
Denny Schierz
 
Default manipulate initrd from Debian installer

hi,

Mark Allums schrieb:

> Ahh, I beg your pardon.

no problem at all ;-)

> I don't see where you made the modules or installed them. (You said in
> your earlier post that you copied them to a directory.) However, it

i copied them from /lib/modules to the unpacked initrd dir.

> looks like your new kernel is looking for something and not finding it.
> You seem to be trying to create a custom live CD. Do you use any gnu
> or debian tools to automate the process?

i use gzip/gunzip/cpio/cp/mkisofs nothing more.

> If it is a CD, it may need support for the ISO 9660 CD standard. Did

as i said, it is the netinstall.iso :-)

> you compile that into the kernel, or the initrd? Once the kernel takes
> over from the boot loader, it doesn't know about filesystems unless they
> have been compiled in.

filesystems are always compiled into the kernel and it don't need the
ISO filesystem, cause the initrd could be found in a ram disk

cu denny

--
Stoppt den Überwachungswahn - Stoppt den Schäuble Katalog:
http://www.nopsis.de
 
Old 07-15-2008, 01:27 AM
Mark Allums
 
Default manipulate initrd from Debian installer

Denny Schierz wrote:

hi,





looks like your new kernel is looking for something and not finding it.
You seem to be trying to create a custom live CD. Do you use any gnu
or debian tools to automate the process?


i use gzip/gunzip/cpio/cp/mkisofs nothing more.


There is the package live-helper, and it has a gnome gui, live-magic.




If it is a CD, it may need support for the ISO 9660 CD standard. Did


as i said, it is the netinstall.iso :-)


Ah, I forgot to take off my Clueless Hat today. <




you compile that into the kernel, or the initrd? Once the kernel takes
over from the boot loader, it doesn't know about filesystems unless they
have been compiled in.


filesystems are always compiled into the kernel and it don't need the
ISO filesystem, cause the initrd could be found in a ram disk


Well, yes and no. You get the filesystems that you choose when
configuring the kernel. It wasn't immediately apparent that it was the
initrd that was/wasn't being understood. I am going to ask the obvious:
Did you remember to compile initrd support into the kernel?


(I once forgot to compile in ReiserFS support, nor make it a module, nor
use an initrd (if I *had* done the modules) with most of the disk
formatted as Reiser. Wow, was I red in the face! Now, I sometime
use ReiserFS, but never for the boot partition!)


I am afraid I cannot offer much more advice, having never had that
problem, nor created a custom Debian install CD.


I hope that others on the list will be able to pick up the slack.


Mark Allums


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-17-2008, 06:49 PM
Michelle Konzack
 
Default manipulate initrd from Debian installer

Am 2008-07-14 17:51:38, schrieb Mark Allums:
> $ cp /boot/config<your old version>
> $ make gconfig <---- if using gnome, otherwise some variant
> $ make-kpkhg clean
> $ make-kpkg --initrd kernel_image modules_image

looks a litle bit weird...


make-kpkg --append-to-version=my_kernel --config gconfig configure
kernel_image

and of course, compile 3w9xxx and ext3 INTO the kernel and do not use
ANY initrd.img since more crap does not exist.

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
 
Old 07-17-2008, 06:54 PM
Michelle Konzack
 
Default manipulate initrd from Debian installer

Am 2008-07-15 00:14:44, schrieb Denny Schierz:
> hi,
>
> i have to recompile a kernel (2.6.25.9) to get some hardware working,
> for example network cards and 3ware SCSI SATA controller from the
> installer (debian-testing-amd64-netinst.iso). But I'm unable to create a
> valid kernel and/or initrd.

Question: Why are you using crapy INITRD at all?

If you compile your own Kernel, put all modules need to bootup the
system INTO the kernel. Put the Kernel onto an USB key and at the end
of the installation open a console <F2> and use "chroot" and "dpkg" to
install the New Debian Kernel on your target system.

After this you can run lilo and you are done.

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant


--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
 

Thread Tools




All times are GMT. The time now is 12:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org