In order to use Linux version 2.6.x, I installed the
stuff that came with the "Red Hat Fedora(tm) Linux 2"
book. I even bought a new hard disk so that it wouldn't
break anything I have on my other disks.
It installed, but I needed to set up a module development
environment so I attempted to compile the kernel with
the provided files.
First I copied a .config file from /usr/src/linux-2.6.5-1.358/configs
that came with the other software. Then I did:
make oldconfig
make bzImage
make modules
make modules_install
This seemed to go alright. Then I entered:
make install
This had some warning about module versions, but it seemed to work.
Then I re-booted. Naturally nothing worked. This stuff is getting more
like W$ every day.
The following hand-copied error messages exist and the root-file
system fails to be found because all the modules fail to install.
aic7xxx: version magic '2.6.5-1.358 SMP 686 REGPARM 4KSTACKS gcc-3.3`
should be '2.6.5-1.358 SMP 686 REGPARM 4KSTACKS gcc-3.3`
All the modules that get installed by initrd have the same kind
of error message where "version magic" claims that it doesn't
compare with something that looks okay to the eye.
Also, the repair provisions don't have any capability of
copying back the contents of /lib/modules/ in any usable
way. I had to reinstall everything from scratch, just like
Windows. Nice work.
Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.2.15 on an i586 machine (330.14 BogoMips).
On Tue, 2004-10-05 at 20:17, Johnson, Richard wrote:
> In order to use Linux version 2.6.x, I installed the
> stuff that came with the "Red Hat Fedora(tm) Linux 2"
> book. I even bought a new hard disk so that it wouldn't
> break anything I have on my other disks.
>
> It installed, but I needed to set up a module development
.... which is already shipped in /lib
> environment so I attempted to compile the kernel with
> the provided files.
>
> First I copied a .config file from /usr/src/linux-2.6.5-1.358/configs
> that came with the other software. Then I did:
>
> make oldconfig
> make bzImage
> make modules
> make modules_install
well the Makefile has "custom" added to the version so that you don't
overwrite the working kernel version but install a second one. Did you
by chance manually edit the Makefile to remove the "custom" ?
On Tue, 5 Oct 2004, Johnson, Richard wrote:
>
>
> In order to use Linux version 2.6.x, I installed the
> stuff that came with the "Red Hat Fedora(tm) Linux 2"
> book. I even bought a new hard disk so that it wouldn't
> break anything I have on my other disks.
>
> It installed, but I needed to set up a module development
> environment so I attempted to compile the kernel with
> the provided files.
>
> First I copied a .config file from /usr/src/linux-2.6.5-1.358/configs
> that came with the other software. Then I did:
>
> make oldconfig
> make bzImage
> make modules
> make modules_install
>
$ make oldconfig
$ make
$ su
# make modules_install
is the normal way for 2.6 kernels. A plain "make" takes care of all the
magic of building the kernel proper and the modules.
> This seemed to go alright. Then I entered:
>
> make install
>
Only do that if you are sure your systems bootloader configuration is able
to deal with it. Maybe Fedora is configured so that "make install" can
work, I wouldn't know I'm a Slackware user myself.
Personally I prefer to manually
# cp System.map /boot/System.map-<kernel-version>
# cp arch/i386/boot/bzImage /boot/vmlinuz-<kernel-version>
# ln -sf /boot/System.map-<kernel-version> /boot/System.map
and then edit /etc/lilo.conf to add an entry for the new kernel, followed
by /sbin/lilo to reinstall the bootloader of course.
> This had some warning about module versions, but it seemed to work.
>
> Then I re-booted. Naturally nothing worked.
<flamebait snipped>
May I suggest reading /path/to/your/kernel/source/README it describes the
details of building and installing the kernel, maybe you can find a clue
to what you did wrong.
>
> The following hand-copied error messages exist and the root-file
> system fails to be found because all the modules fail to install.
>
>
> aic7xxx: version magic '2.6.5-1.358 SMP 686 REGPARM 4KSTACKS gcc-3.3`
> should be '2.6.5-1.358 SMP 686 REGPARM 4KSTACKS gcc-3.3`
>
>
> All the modules that get installed by initrd have the same kind
> of error message where "version magic" claims that it doesn't
> compare with something that looks okay to the eye.
>
Could it be you accidentally installed your new modules in the same
location as the old ones or that your initrd holds modules compiled for a
different kernel than the one you just build - did you remember to update
your initrd?
> Also, the repair provisions don't have any capability of
> copying back the contents of /lib/modules/ in any usable
> way. I had to reinstall everything from scratch, just like
> Windows. Nice work.
>
I assume you are here refering to "repair provisions" provided in the book
"Red Hat Fedora(tm) Linux 2" you mentioned above. What does that have to
do with the kernel? I'd suggest you take that up with RedHat and/or the
books author.
--
Jesper Juhl
On Tue, 2004-10-05 at 21:15, Jesper Juhl wrote:
> On Tue, 5 Oct 2004, Johnson, Richard wrote:
> Only do that if you are sure your systems bootloader configuration is able
> to deal with it. Maybe Fedora is configured so that "make install" can
> work, I wouldn't know I'm a Slackware user myself.
on Fedora, make install will do the bootloader thing automatically
> Could it be you accidentally installed your new modules in the same
> location as the old ones or that your initrd holds modules compiled for a
> different kernel than the one you just build - did you remember to update
> your initrd?
it can't be an accident; the kernel source that ship in Fedora have a
special "custom" added to the EXTRAVERSION to prevent accidents where
people who are learning and follow a kernel building howto overwrite the
"known good" kernel, but instead things get installed in a parallel dir
with a different EXTRAVERSION.
If Richard overwrote his modules anyway he must have hacked the Makefile
himself to deliberately cause this, at which point... well saw wind
harvest storm ;)
On Tue, 5 Oct 2004, Arjan van de Ven wrote:
> If Richard overwrote his modules anyway he must have hacked the Makefile
> himself to deliberately cause this, at which point... well saw wind
> harvest storm ;)
>
While I lack specific Fedora knowledge and thus can't provide exact
details for it I'd say it should still be pretty simple to recover. On
Slackware I'd simply boot a kernel from the install CD and tell it to
mount the installed system on my HD, then you'll have a running system and
can easily clean out the broken modules etc and install the original ones
from your CD and be right back where you started in 5 min. Surely
something similar is possible with Fedora, reinstalling from scratch (as
he said he did) seems like massive overkill to me.
--
Jesper Juhl
On Tue, Oct 05, 2004 at 09:46:18PM +0200, Jesper Juhl wrote:
> On Tue, 5 Oct 2004, Arjan van de Ven wrote:
>
> > If Richard overwrote his modules anyway he must have hacked the Makefile
> > himself to deliberately cause this, at which point... well saw wind
> > harvest storm ;)
> >
> While I lack specific Fedora knowledge and thus can't provide exact
> details for it I'd say it should still be pretty simple to recover. On
> Slackware I'd simply boot a kernel from the install CD and tell it to
> mount the installed system on my HD, then you'll have a running system and
> can easily clean out the broken modules etc and install the original ones
> from your CD and be right back where you started in 5 min. Surely
> something similar is possible with Fedora, reinstalling from scratch (as
> he said he did) seems like massive overkill to me.
yeah there is rescue mode for that reason on the first cd
Jesper Juhl wrote:
<snip>
> While I lack specific Fedora knowledge and thus can't provide exact
> details for it I'd say it should still be pretty simple to recover. On
> Slackware I'd simply boot a kernel from the install CD and tell it to
> mount the installed system on my HD, then you'll have a running system and
> can easily clean out the broken modules etc and install the original ones
> from your CD and be right back where you started in 5 min. Surely
> something similar is possible with Fedora, reinstalling from scratch (as
> he said he did) seems like massive overkill to me.
>
>
If all you're after is a resuce cd, you can use the fedora CD's for that
by typing:
linux rescue
at the boot prompt. Your root fs will be mounted under /mnt/sysimage,
and you can go in from a shell, and clean up anything you like.
Neil
> --
> Jesper Juhl
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*[email protected]
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
Arjan van de Ven wrote:
> On Tue, Oct 05, 2004 at 09:46:18PM +0200, Jesper Juhl wrote:
>
>>On Tue, 5 Oct 2004, Arjan van de Ven wrote:
>>
>>
>>>If Richard overwrote his modules anyway he must have hacked the Makefile
>>>himself to deliberately cause this, at which point... well saw wind
>>>harvest storm ;)
>>>
>>
>>While I lack specific Fedora knowledge and thus can't provide exact
>>details for it I'd say it should still be pretty simple to recover. On
>>Slackware I'd simply boot a kernel from the install CD and tell it to
>>mount the installed system on my HD, then you'll have a running system and
>>can easily clean out the broken modules etc and install the original ones
>>from your CD and be right back where you started in 5 min. Surely
>>something similar is possible with Fedora, reinstalling from scratch (as
>>he said he did) seems like massive overkill to me.
>
>
> yeah there is rescue mode for that reason on the first cd
Actually, FC2 has an CD called rescue CD. All he needed to do (if he
toasted his working kernel) was to boot from it, and reinstall the
kernel package from the first CD (rpm -Uhv --force
kernel-2.6.5-1.358.i686.rpm or i586, force is needed to push things a
bit since system thinks the same version of package is already installed).
I'd be quite interested to find out how he managed to toast his working
kernel. Not an easy task. Actaully it is, but requires some manual
work, it can't be done by just typing make this, make that. There were
some steps he "forgot" to mention ;-).
--
Aleksandar Milivojevic <[email protected]> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
On Tue, 5 Oct 2004, Arjan van de Ven wrote:
> On Tue, 2004-10-05 at 21:15, Jesper Juhl wrote:
> > On Tue, 5 Oct 2004, Johnson, Richard wrote:
>
> > Only do that if you are sure your systems bootloader configuration is able
>
> > to deal with it. Maybe Fedora is configured so that "make install" can
> > work, I wouldn't know I'm a Slackware user myself.
>
> on Fedora, make install will do the bootloader thing automatically
>
>
> > Could it be you accidentally installed your new modules in the same
> > location as the old ones or that your initrd holds modules compiled for a
> > different kernel than the one you just build - did you remember to update
> > your initrd?
>
> it can't be an accident; the kernel source that ship in Fedora have a
> special "custom" added to the EXTRAVERSION to prevent accidents where
> people who are learning and follow a kernel building howto overwrite the
> "known good" kernel, but instead things get installed in a parallel dir
> with a different EXTRAVERSION.
>
Well something is going on because the module libraries are different.
I just reinstalled everything on that system and just did a `make modules`
again. I did not dare do `make modules_install` yet. I will clone
the /lib/modules/2.6.5-1.358 directory first so I have something
to copy from the recovery disk.
> If Richard overwrote his modules anyway he must have hacked the Makefile
> himself to deliberately cause this, at which point... well saw wind
> harvest storm ;)
>
>
No. I did nothing but what I reported. I never even looked at
the makefile contents.
I think it's a `insmod` problem. It did some kind of compare
which looks okay to the eye, but barfs.
What is this??? VVVVVVVVVV
>
> begin 600 winmail.dat
> M>)\^(@L3`0:0"``$```````!``$``0>0!@`(````Y`0```````#H``$(@`<`
> M&````$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0F``0`A````-4,V-S,S
> M-C9&-D$P-$(T-S@R-C0U148Q-$1"0C9!.$8`.P<!((`#``X```#4!PH`!0`/
> M`"(`"0`"`"8!`06``P`.````U`<*``4`#P`=`!H``@`R`0$$@`$`(0```%)E
> M.B!,:6YU>"TR+C8N-2TQ+C,U."!A;F0@1F5D;W)A`#<)`0V`!``"`````@`"
> M``$#D`8`J`@``",````#`/T_Y`0``!X`4``!````$@```&%R:F%N=D!R961H
> M870N8V]M````'@#\/P$````!`````````!X`@8&&`P(``````,````````!&
> M`0```!(```!8`"T`30!A`&D`;`!E`'(```````$````B````6&EM:6%N($5V
> M;VQU=&EO;B`Q+C0N-B`H,2XT+C8M,BD@````0``Y``!O^I\1J\0!'@"=@88#
> M`@``````P````````$8!````+````%@`+0!/`'(`:0!G`&D`;@!A`&P`00!R
> M`'(`:0!V`&$`;`!4`&D`;0!E`````0```#T````P-2!/8W0@,C`P-"`Q.3HS
> M-#HP-RXP,C4S("A55$,I($9)3$5424U%/5LT-SE%,T,U,#HP,4,T04(Q,ET`
> M````'@`Q0`$````2````87)J86YV0')E9&AA="YC;VT````#`!I````!`!X`
> M,$`!````$@```&%R:F%N=D!R961H870N8V]M`````P`90````0`#`-X_KV\`
> M``(!"1`!````T@,``,X#``##!0``3%I&==,''04#``H`<F-P9S$R->(R`T-T
> M97@%00$#`??_"H`"I`/D!Q,"@`_S`%`$5C\(50>R$24.40,!`@!C:.$*P'-E
> M=#(&``;#$27V,P1&$[<P$BP1,PCO"?>V.Q@?#C`U$2(,8&,`4#,+"0%D,S86
> M4`NF($\E`Z!4"E`L(`'0,#0`+3$P+3`U(&%!!4`R,3HQ-1U02D4'D'`2@4IU
> M:`,@=]L#8`ZP.@JB"H`^'.<>`)Q/8QXQ'8$>H6]H`(#;`B`=4%(-X!/A9!][
> M'^B`;'D@9&\@=!/@<P5`!I`@>0A@'A`8("`><PAP)5`D\07`<WESO0ZP;00@
> M!N`?H!>P802!PB`%H&YF:6<(<!X@WFD"("2P!"`!H&PE4!_FWG0D4`$`!T`?
> M<&DD<"2P1'0N!=!A>6(E4$;["8`%L&$H$B=&"8`E8"15>B(`P&LE4`N`)C`'
> M0&RN(B<P`Y(?]7<%L&L=4())+@%U;&1N)P5`B&MN;P?@22=M'A"C!@`+8&-K
> M=R4R=100A07`;28@96QF+B,:_R?Q*I0=4"QZ*9$S021#)5#7)IDD<`N`9QX0
> M=2D@`,#W)]`M4"T0>2,:'^8(42[`CRGA)H`EHQX08V-I`0#?`C`UTBRV*[$E
> MPVX'T01ASRZP!Y$+@#/C<V$'@"B7]Q>P+5`GTV$$(#/R!O`BD/\"(`>1!;$D
> M<R7#"X`IL"*!GF@][email protected]%H&UP`Q!?*[$"$`7`*N`?YF0&D&;_!)`XH2\0
> M!)$P\"1B.N0]46TDXVHP<#?!=0,0(I`M^T$A.:,@&"`'@`;0-+(D4+AU<&0>
> M("B(/BD_(QJ_-[$M42[Q*F$#D3A6.S/CMT'5(>`(<&,E4"1S<S3P[G`ZPBJ5
> M$^!V2'$?Y![A\SAP*7$B8T-A`W`M,";P#P$`(I`I(3/R15A44@!!5D524TE/
> M3GTI$G`8($O@0:$X5@0@=^\T`!@@'^0>\&\+4"504("_)%`E,BAP"L`#`#42
> M;D`R?RT0+T$JX$'50Z,U`C[@=_4I(6]+X'(?@"FP2F)0Q=8B+R(#H&<FH&0M
> M,$'4_QU00Z`DH2S1*6!-T33R!"#^[email protected]@"K$Y8C.A_&ER'^0IHRK@
> M03A.:C$K_DDDT"(V5.0?H3[0*"$Z5MT`<'DP("0@-`%M0V)+P_\3X#``3<(T
> M`2HP+)`G<"APGQ_D-/`F8##Q*11L:43QWT61)!$M4#!Q--)S'5`>(?=0@")!
> M3U!O"X`J`&6`'W#[,/!)\6$'X`/P4L!B!0K`ETO@0W%-,7(OD#LI-A\$"GUI
> M(```'@!P``$````=````3&EN=7@M,BXV+C4M,2XS-3@@86YD($9E9&]R80``
> M```"`7$``0```!8````!Q*L20P8]@SL_S4)#S:E(XE-@5FLO```+`/(0`0``
> M``(!^3\!````=@````````#<IT#(P$(0&K2Y"``K+^&"`0`````````O3SU!
> M3D%,3T=)0R]/53U-141%6$-(+T-./4-/3D9)1U52051)3TXO0TX]0T].3D5#
> M5$E/3E,O0TX]24Y415).150@34%)3"!#3TY.14-43U(@*$1204-/*0```!X`
> M^#\!````'@```$EN=&5R;F5T($UA:6P@4V5R=FEC92`H1%)!0T\I````'@`X
> M0`$````@````24Y415).150@34%)3"!#3TY.14-43U(@*$1204-/*0`"`?L_
> M`0```$``````````@2L?I+ZC$!F=;@#=`0]4`@```0!!<FIA;B!V86X@9&4@
> M5F5N`%--5%``87)J86YV0')E9&AA="YC;VT`'@#Z/P$````1````07)J86X@
> M=F%N(&1E(%9E;@`````>`#E``0```!(```!A<FIA;G9`<F5D:&%T+F-O;0``
> M`$``!S`Y2P9#$JO$`4``"#!.)MU($JO$`1X`/0`!````!0```%)E.B``````
> M'@`=#@$````=````3&EN=7@M,BXV+C4M,2XS-3@@86YD($9E9&]R80`````>
> M`#40`0```"T````\,3`Y-S`P-#4V-2XY.3<U+C(U+F-A;65L0&QA<'1O<"YF
> M96YR=7,N8V]M/@`````#`#8```````L`*0``````"P`C```````#``808S5L
> M"@,`!Q!E`P```P`0$``````#`!$0`````!X`"!`!````90```$].5%5%+#(P
> M,#0M,3`M,#5!5#(Q.C$U+$I%4U!%4DI52$Q74D]413I/3E1512PU3T-4,C`P
> M-"Q*3TA.4T].+%))0TA!4D174D]413I/3DQ91$]42$%424993U5!4D5355)%
> M64\``````@%_``$````M````/#$P.3<P,#0U-C4N.3DW-2XR-2YC86UE;$!L
> 787!T;W`N9F5N<G5S+F-O;3X`````[$(=
> `
> end
>
There is another problem, discovered on another system. If
Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.2.15 on an i586 machine (330.14 BogoMips).
On Tue, 5 Oct 2004, Jesper Juhl wrote:
> On Tue, 5 Oct 2004, Arjan van de Ven wrote:
>
> > If Richard overwrote his modules anyway he must have hacked the Makefile
> > himself to deliberately cause this, at which point... well saw wind
> > harvest storm ;)
> >
> While I lack specific Fedora knowledge and thus can't provide exact
> details for it I'd say it should still be pretty simple to recover. On
> Slackware I'd simply boot a kernel from the install CD and tell it to
> mount the installed system on my HD, then you'll have a running system and
> can easily clean out the broken modules etc and install the original ones
> from your CD and be right back where you started in 5 min. Surely
> something similar is possible with Fedora, reinstalling from scratch (as
> he said he did) seems like massive overkill to me.
>
>
> --
> Jesper Juhl
>
Yeh? There is no place to get replacement modules from. They are
somewhere on some RPM on one of the CDs, with no way to know. It's
not like you could tar everything from the current root file-system.
They don't exist in the root file-system, which is a RAM disk.
Richard B. Johnson
Project Engineer
Analogic Corporation
Penguin : Linux version 2.2.15 on an i586 machine (330.14 BogoMips).
On Tue, 5 Oct 2004, Johnson, Richard wrote:
> On Tue, 5 Oct 2004, Jesper Juhl wrote:
>
> > On Tue, 5 Oct 2004, Arjan van de Ven wrote:
> >
> > > If Richard overwrote his modules anyway he must have hacked the Makefile
> > > himself to deliberately cause this, at which point... well saw wind
> > > harvest storm ;)
> > >
> > While I lack specific Fedora knowledge and thus can't provide exact
> > details for it I'd say it should still be pretty simple to recover. On
> > Slackware I'd simply boot a kernel from the install CD and tell it to
> > mount the installed system on my HD, then you'll have a running system and
> > can easily clean out the broken modules etc and install the original ones
> > from your CD and be right back where you started in 5 min. Surely
> > something similar is possible with Fedora, reinstalling from scratch (as
> > he said he did) seems like massive overkill to me.
> >
>
> Yeh? There is no place to get replacement modules from. They are
> somewhere on some RPM on one of the CDs,
That's not what I'd call "no place", that's "a place", and one you most
likely have available lying on your desk. Even if you don't have the CDs
any more you can always download the RPM you need from the net while
running in rescue mode.
> with no way to know. It's
> not like you could tar everything from the current root file-system.
>
Just like Slackware has a log of all packages and the files they contain
in /var/log/packages/ , so does RPM based distros like Fedora have their
rpm database. The 'rpm' tool can be used to search the database for
packages that contain a specific file, and once you know the RPM you need
you can easily find it on your CDs (even if you have no idea where to look
'find' should find it for you easily enough). Read through "man rpm" some
day, a package tool without a database of installed packages and the
files contained in those packages would be pretty useless.
--
Jesper Juhl
Johnson, Richard wrote:
> Yeh? There is no place to get replacement modules from. They are
> somewhere on some RPM on one of the CDs, with no way to know. It's
> not like you could tar everything from the current root file-system.
>
> They don't exist in the root file-system, which is a RAM disk.
RPM is called kernel (suprise), it's on the first CD (logical).
Boot from CD into rescue mode, and than:
# chroot /mnt/sysimage (if not done for you by rescue)
# rpm -q -f /lib/modules/2.6.5-1.358
kernel-2.6.5-1.358
# uname -c
i686
# rpm -Uhv --force /mnt/cdrom/Fedora/RPMS/kernel-2.6.5-1.358.i686.rpm
--
Aleksandar Milivojevic <[email protected]> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
Johnson, Richard wrote:
>
SNIP
>
> make oldconfig
> make bzImage
> make modules
> make modules_install
>
> This seemed to go alright. Then I entered:
>
> make install
>
> This had some warning about module versions, but it seemed to work.
Doesn't anyone do the following anymore:
make mrproper
make oldconfig
make bzImage
make modules
make modules_install
I've seen a lot of problems come from NOT running the mrproper.
Regards,
David
Jesper Juhl wrote (ao):
> Personally I prefer to manually
> # cp System.map /boot/System.map-<kernel-version>
> # cp arch/i386/boot/bzImage /boot/vmlinuz-<kernel-version>
> # ln -sf /boot/System.map-<kernel-version> /boot/System.map
I believe the symlink is not needed.