[97977] in RedHat Linux List
Re: custom kernel problems
daemon@ATHENA.MIT.EDU (William Stearns)
Fri Nov 6 00:25:24 1998
Date: Fri, 6 Nov 1998 00:26:41 -0500 (EST)
From: William Stearns <wstearns@pobox.com>
To: redhat-list@redhat.com
cc: Jim Kannengieser <jimk@echonyc.com>
In-Reply-To: <199811060220.VAA20910@echonyc.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
On Thu, 5 Nov 1998, Jim Kannengieser wrote:
> Hi. I was wondering if I could enlist the help of this list. I tried
> to compile a custom kernel this evening and ran into three problems. I
> used the instructions in the Red Hat 5.1 users manual, which don't
> seem accurate enough. First, after issuing the 'make modules' command,
> I got these errors at the end of a seemingly success compilation.
>
> make[2]: Leaving directory /usr/src/linux-2.0.34/drivers/sound'
> make[1]: *** [modules] Error 2
> make[1]: Leaving directory /usr/src/linux-2.0.34/drivers'
> make: *** [modules] Error 2
>
>
> Next when running /sbin/mkinitrd, I got this message.
>
> mount: the kernel does not recognize /dev/loop0 as a block device
> (maybe nsmod driver'?)
> Can't get a loopback device
You need to run "insmod loop" once you have your modules back on
the system.
> Lastly, I followed the advice in the manual and removed my old kernel
> modules using the following commands.
>
> mv /lib/modules/2.0.34-0.6 /lib/modules/2.0.34-0.6-old
> rm -rf /lib/modules/2.0.34-0.6-old
Are you _sure_ they suggested this, and in this order? This is
the same as "rm -rf /lib/modules/2.0.34-0.6-old", which deletes _all_ of
the modules needed for your current kernel.
> When I rebooted with my old kernel, I couldn't do log onto the net,
> play audio, or do anything related to my old modules.Is there a way to
> preserve my old modules while creating new ones for a custom kernel? I
> don't want to have to reinstall my OS every time a kernel fails.
Yup, you just deleted your sound modules, your ppp module for an
Internet connection, etc.
Double check the instructions. I can believe the first one (move
the current modules to a backup directory).
Getting your modules back on is going to be a trick. I don't
suppose you copied all of the RPM's for your distribution to your hard
drive, did you? No, I was just hoping. You can't get them from the
Internet because you can't make a ppp link. Your cdrom is probably
likewise inaccessible.
I'd have to guess that the best way is to bring them over via an
ext2 floppy; both ext2 and floppy support are _probably_ built-in (not
modularized) in your kernel. If you can get to another Linux box that can
get an Internet connection or mount your original CD, try this:
1) Get the kernel-2.0.34-0.6.i386.rpm package.
2) Place a blank floppy in the floppy drive.
3) fdformat /dev/fd0H1440
4) mke2fs -c -v /dev/fd0
5) mkdir /mnt/floppy
6) mount -t ext2 /dev/fd0 /mnt/floppy
7) cp /path/to/kernel...rpm /mnt/floppy
8) sync
9) umount /mnt/floppy
10) Carry the floppy over to your machine
11) On your machine, mkdir /mnt/floppy
12) mount -t ext2 /dev/fd0 /mnt/floppy
13) rpm -Uvh /mnt/floppy/kernel...rpm --force
14) umount /mnt/floppy
15) lilo
Other options, in case this doesn't work, include booting off a
rescue disk, doing an "upgrade" on your system using the original cd and
floppy (but I don't think this will work; I suspect it'll see the kernel
rpm in the rpm database and refuse to "upgrade" it to itself), or
upgrading to a newer RedHat.
Let me know if this works!
Cheers,
- Bill
---------------------------------------------------------------------------
Unix _is_ user friendly. It's just very selective about who its friends
are. And sometimes even best friends have fights.
William Stearns (wstearns@pobox.com)
Mason, buildkernel, and named2hosts are at: http://www.pobox.com/~wstearns
---------------------------------------------------------------------------
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.