LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2003, 11:30 AM   #1
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
mkinitrd problem - kernel upgrade newbie


I'm working my way through this thread

LinuxQuestions.org Forums > Linux - General > Newbie Guide To Compiling A Kernel!

to upgrade my kernel from 2.4.18 to 2.4.23 for full USB support, but I'm having a problem at this point -

Next remove existing initrd.img file:
rm -rf /boot/initrd.x.x.x.img

..And create the new one:
/sbin/mkinitrd /boot/initrd-x.x.x.img x.x.x
(Note: )
The last set of x.x.x is the eqivalent to your new kernel version and it looks to /lib/modules for that version.


I keep getting a usage error for mkinitrd -

I'm using

/usr/sbin/mkinitrd /boot/initrd-2.4.23.img 2.4.23

what is wrong with this?
 
Old 12-22-2003, 12:30 PM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Check that the x.x.x.img x.x.x is identical to that in /lib/modules.
 
Old 12-22-2003, 12:35 PM   #3
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
debirvken:/lib/modules# ls
2.2.20-idepci 2.4.18 2.4.18-686 2.4.23

what does that tell me (or you )?
 
Old 12-22-2003, 12:51 PM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Quote:
Originally posted by irvken
debirvken:/lib/modules# ls
2.2.20-idepci 2.4.18 2.4.18-686 2.4.23

what does that tell me (or you )?
You have 3 kernel modules;
1. 2.2.20-idepci
2. 2.4.18 2.4.18
3. 2.4.23

The format suggests you are running Debian????

What you have seems correct (i.e. 2.4.23). Can you state specifically what the error is.
 
Old 12-22-2003, 01:00 PM   #5
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
It's a usage error, it says the command is the wrong format, although I can't see the problem

Yes, I'm running debian, i wish I weren't, nobody seems to have the problems I have, I lost hundreds of important files last month transferring to larger hard drive last month (invoices and client reports) and now I appear to have a non-bootable system so I can't turn the bloody thing off.

debirvken:/lib/modules/2.4.23# mkinitrd /boot/initrd-2.4.23.img 2.4.23

$Id: mkinitrd,v 1.69 2002/10/18 23:01:27 herbert Exp $

Usage: /usr/sbin/mkinitrd [OPTION]... <-o outfile> [moduledir]



BTW, I went to college in Soton, many years ago
 
Old 12-22-2003, 01:52 PM   #6
Dr. Ephemeron
Member
 
Registered: Oct 2003
Distribution: Mandrake 10.1 & Fedora Core 4
Posts: 84

Rep: Reputation: 15
Quote:
Originally posted by irvken
It's a usage error, it says the command is the wrong format, although I can't see the problem

Yes, I'm running debian, i wish I weren't, nobody seems to have the problems I have, I lost hundreds of important files last month transferring to larger hard drive last month (invoices and client reports) and now I appear to have a non-bootable system so I can't turn the bloody thing off.

debirvken:/lib/modules/2.4.23# mkinitrd /boot/initrd-2.4.23.img 2.4.23

$Id: mkinitrd,v 1.69 2002/10/18 23:01:27 herbert Exp $

Usage: /usr/sbin/mkinitrd [OPTION]... <-o outfile> [moduledir]



BTW, I went to college in Soton, many years ago
ummm I am just a noob, but is your mkinitrd in /lib/modules/2.4.23? If it isn't, you might need to use the path to mkinitrd or be in the same directory. (like the /usr/sbin/ directory like the instructions say)

Last edited by Dr. Ephemeron; 12-22-2003 at 01:55 PM.
 
Old 12-22-2003, 02:17 PM   #7
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
I am using the path, it's /usr/sbin/mkinitrd, I left it off for convenience, it's the same error usage message either way
 
Old 12-22-2003, 02:25 PM   #8
Dr. Ephemeron
Member
 
Registered: Oct 2003
Distribution: Mandrake 10.1 & Fedora Core 4
Posts: 84

Rep: Reputation: 15
Quote:
Originally posted by irvken
I am using the path, it's /usr/sbin/mkinitrd, I left it off for convenience, it's the same error usage message either way
Is your boot partition mounted?
 
Old 12-22-2003, 02:37 PM   #9
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
i think you've missed the point, I'm attempting to upgrade my kernel, everything worked fine before, I've just run into a little trouble following the instructions here

http://www.linuxquestions.org/questi...5&pagenumber=1

because the mkinitrd instruction doesn't work
 
Old 12-22-2003, 03:03 PM   #10
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
hmm, I ran this mkinitrd -o /boot/initrd-2.4.23.img 2.4.23 and something appeared to happen
 
Old 12-22-2003, 03:06 PM   #11
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try:
mkinitrd -o /boot/initrd-2.4.23.img 2.4.23
 
Old 12-22-2003, 03:30 PM   #12
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Have you generated the initrd? As regards having a non-bootable system that's not a problem because until you install the kernel it'll boot via the old kernel. If you want to wait until the debian version comes out then use the 2.4.22. The debian way is to download the kernel-2.4.22 source and then do the following;
apt-get install debhelper modutils kernel-package libncurses5-dev fakeroot
unpack the source in /usr/src
cd /usr/src/kernel-source-2.4.22
make menuconfig or xconfig (setup the kernel the way you want it)
make-kpkg clean
fakeroot make-kpkg --append_to_version -486 --initrd \ --revision=rev.01 kernel-image
cd /usr/src
ls (the kernel package should be listed)
dpkg -i kernel-image*.deb
That's it. really simple.
With regard to migrating hard drives and data loss I suggest investigating rsync. This will ensure the drives are identical before you abandon the old drive. if you still have the old drive available it is still possible to recover them via this method.

Last edited by TigerOC; 12-22-2003 at 04:20 PM.
 
Old 12-22-2003, 03:32 PM   #13
Dr. Ephemeron
Member
 
Registered: Oct 2003
Distribution: Mandrake 10.1 & Fedora Core 4
Posts: 84

Rep: Reputation: 15
Quote:
Originally posted by irvken
i think you've missed the point, I'm attempting to upgrade my kernel, everything worked fine before, I've just run into a little trouble following the instructions here

http://www.linuxquestions.org/questi...5&pagenumber=1

because the mkinitrd instruction doesn't work
Don't get snippy with me...
 
Old 12-22-2003, 04:19 PM   #14
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
Apologies Dr. Ephermeron, things go from bad to worse and I tend to start to fret a little.

[qioute]Have you generated the initrd?[/quote]

I thought I had, in /boot a file appeared - initrd-2.4.23.img, seemed like a likely candidate.

I went to the root dir / and removed the sym ln initrd.img and created a new one to this file

.. and then I rebooted

lots of modprobe:Can't open dependencies file /lib/modules 2.4.18-686... etc (No such file or directory)

and then a kernel panic

I really shouldn't be left in charge of a computer

I assume I need something to boot from? Would a knoppix disk do?

and then what do I do?
 
Old 12-22-2003, 04:24 PM   #15
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
You can use the woody or knoppix cd to boot. U using lilo or grub?
 
  


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
Can't mkinitrd for Kernel 2.6.11.6 (when compiling) LordOfer Linux - Newbie 3 04-02-2005 12:20 PM
Newbie Fedora kernel upgrade help kevinb583 Linux - Newbie 2 10-12-2004 01:43 AM
kernel 2.6.6 mkinitrd problem ziox Linux - Software 0 07-13-2004 08:48 PM
mkinitrd doesnt exist in slackware? Newbie kernel compile question! nmoog Slackware 3 01-08-2004 07:22 PM
Newbie Kernel upgrade ? & up2date rpm hell lsgko Linux - Newbie 2 08-06-2003 07:59 PM


All times are GMT -5. The time now is 04:31 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration