Loading ...
Sorry, an error occurred while loading the content.

Re: stupid n00b question on kernel compiles

Expand Messages
  • jamesots
    ... You MUST ALWAYS back up your old working kernel and make an extra entry in lilo (or your other bootmanager). And probably back up your old modules as well.
    Message 1 of 11 , Jul 2, 2002
    • 0 Attachment
      > Oh, and I strongly recommend backing up the old (working) kernel and
      > give it an extra entry in your bootmanager.

      You MUST ALWAYS back up your old working kernel and make an extra entry in
      lilo (or your other bootmanager). And probably back up your old modules as
      well. And make sure you run lilo after changing your kernel (if using lilo).

      Personally, I've given up on recompiling my kernel because my versions never
      seem to quite work, whereas SuSE's never have any problems. (It would be nice
      to have a P4 optimised kernel though).

      --
      Cheers
      James Ots
    • Angelika
      ... I ve had quite a few problems with recompiling the SuSE8.0 stock kernel (2.4.18). It only produced a blank screen, a blinking cursor in the top left and a
      Message 2 of 11 , Jul 2, 2002
      • 0 Attachment
        Am Die, 2002-07-02 um 09.05 schrieb jamesots:
        > Personally, I've given up on recompiling my kernel because my versions never
        > seem to quite work, whereas SuSE's never have any problems. (It would be nice
        > to have a P4 optimised kernel though).
        I've had quite a few problems with recompiling the SuSE8.0 stock kernel
        (2.4.18). It only produced a blank screen, a blinking cursor in the top
        left and a system that needed a forced power off (5s on the power
        button) to get somewhere. It seems the problem was that I didn't compile
        4GB RAM support into it which is standard with SuSE. It's still a
        mystery to me but now with the 4GB support back in it works (quite
        nicely)...

        Angelika.
      • Domsalla, Thorsten
        ... I miss the make bzLinux right after make clean . And, try make bzlilo instead of make install TJ
        Message 3 of 11 , Jul 2, 2002
        • 0 Attachment
          > make menuconfig(or config, or xconfig, whatever, and set the
          > configuration)
          > make dep
          > make clean
          > (if necessary) make modules
          > (if necessary) make modules_install
          > (if necessary) make install
          > reboot

          I miss the "make bzLinux" right after "make clean". And, try "make bzlilo"
          instead of "make install"

          TJ
        • emil kirschner
          what I do is: - make mrproper - make [menu/x]config - make dep - make bzImage - [make and install the modules if needed] - cp arch/i386/boot/bzImage
          Message 4 of 11 , Jul 2, 2002
          • 0 Attachment
            what I do is:

            - make mrproper
            - make [menu/x]config
            - make dep
            - make bzImage
            - [make and install the modules if needed]
            - cp arch/i386/boot/bzImage /a_new_file_in_root
            - add the new image to the lilo file (/etc/lilo.conf)
            (don't remove your working image)
            - lilo (will commit your lilo change)
            - reboot

            keeping your old image allows you to very quickly
            reboot a clean system if the new image goes wrong. You
            can always remove your old image later.

            the location of your lilo.conf file may vary with your
            distro (I'm on slackware).

            Cheers,
            e.

            --- coshea120 <da3dalus@...> wrote:
            > Hey everyone, I just wanna quick verification as to
            > whether this is
            > the correct way to compile a kernel. Please correct
            > it if it's wrong.
            >
            > make menuconfig(or config, or xconfig, whatever, and
            > set the
            > configuration)
            > make dep
            > make clean
            > (if necessary) make modules
            > (if necessary) make modules_install
            > (if necessary) make install
            > reboot
            >
            >


            =====
            take a poor man to the disco and he will dance for a night.
            teach him how to scratch, and he will dance for ever!
            ----------------------------
            from ali g's words of wisdom

            __________________________________________________
            Do You Yahoo!?
            Sign up for SBC Yahoo! Dial - First Month Free
            http://sbc.yahoo.com
          • david carlton
            ... Is there any more reason to do this when compiling the kernel than there is when compiling other pieces of software? (Other than the fact that the
            Message 5 of 11 , Jul 2, 2002
            • 0 Attachment
              On Tue, 02 Jul 2002 04:43:21 -0000, "coshea120" <da3dalus@...> said:

              > make clean

              Is there any more reason to do this when compiling the kernel than
              there is when compiling other pieces of software? (Other than the
              fact that the kernel's more important than most pieces of software, of
              course.)

              David Carlton | <http://math.stanford.edu/~carlton/>
              carlton@... | Go books: <http://www.gobooks.info/>

              Yow! I like my new DENTIST...
            • Yazz D. Atlas
              ... Well if you were on a Debian system I would recommend using the nice kernel-package tools. You can build kernel packages for the headers, source, docs, or
              Message 6 of 11 , Jul 2, 2002
              • 0 Attachment
                On Tue, 2002-07-02 at 00:43, coshea120 wrote:
                > Hey everyone, I just wanna quick verification as to whether this is
                > the correct way to compile a kernel. Please correct it if it's wrong.
                >
                > make menuconfig(or config, or xconfig, whatever, and set the
                > configuration)
                > make dep
                > make clean
                > (if necessary) make modules
                > (if necessary) make modules_install
                > (if necessary) make install
                > reboot
                >
                >

                Well if you were on a Debian system I would recommend using the nice
                kernel-package tools. You can build kernel packages for the headers,
                source, docs, or just the kernel image. You can even use it to patch the
                kernel if you need to.

                # tar xjvf kernel-source-2.4.18.tar.bz2
                # cd kernel-source-2.4.18
                # make-kpkg --config menu --initrd --append-to-version -blah-blah \
                --revision 1 kernel_image

                after its done building the package you can install the kernel just by
                doing

                # dpkg -i kernel-source-2.4.18-blah-blah_1_i386.deb

                I use grub so to make life even easier I have the following in
                /etc/kernel-img.conf. It updates my /boot/grub/menu.lst.

                # Do not create symbolic links in /
                # Turn off Lilo stuff
                do_symlinks = no
                do_bootloader = no

                # Initrds are OK for Grub
                do_initrd = yes

                # Run cool Grub stuff
                postinst_hook = /sbin/update-grub
                postrm_hook = /sbin/update-grub


                If you don't used initrd images just remove the flag in the make-kpkg
                line and the set do_initrd to no in the /etc/kernel-img.conf


                --
                --
                Yazz D. Atlas <yazz@...>
                http://www.230volts.net/
              • Chris Howells
                ... Hash: SHA1 Hi, ... I think it s just standard practice to ensure that there aren t any stale object files around that could cause weird breakages. - --
                Message 7 of 11 , Jul 2, 2002
                • 0 Attachment
                  -----BEGIN PGP SIGNED MESSAGE-----
                  Hash: SHA1

                  Hi,

                  On Tuesday 02 July 2002 7:30 pm, david carlton wrote:

                  > Is there any more reason to do this when compiling the kernel than
                  > there is when compiling other pieces of software? (Other than the
                  > fact that the kernel's more important than most pieces of software, of
                  > course.)

                  I think it's just standard practice to ensure that there aren't any stale
                  object files around that could cause weird breakages.

                  - --
                  Cheers, Chris Howells -- chris@..., howells@...
                  Web: http://chrishowells.co.uk, PGP key: http://chrishowells.co.uk/pgp.txt
                  KDE: http://www.koffice.org, http://edu.kde.org, http://usability.kde.org

                  -----BEGIN PGP SIGNATURE-----
                  Version: GnuPG v1.0.6 (GNU/Linux)
                  Comment: For info see http://www.gnupg.org

                  iD8DBQE9IgocF8Iu1zN5WiwRApfaAJ0Sap1XufTn0/NocVLUfKK5EYQTRgCfTmc6
                  KeEnq2Pbly/WRgCoYzDSu0Q=
                  =K36N
                  -----END PGP SIGNATURE-----
                • david carlton
                  ... Sure, but is there any more reason for that to happen when compiling the kernel than when compiling anything else? Because sometimes I go through several
                  Message 8 of 11 , Jul 3, 2002
                  • 0 Attachment
                    On Tue, 2 Jul 2002 21:16:28 +0100, Chris Howells <chrish@...> said:
                    > On Tuesday 02 July 2002 7:30 pm, david carlton wrote:

                    >> Is there any more reason to do this when compiling the kernel than
                    >> there is when compiling other pieces of software? (Other than the
                    >> fact that the kernel's more important than most pieces of software, of
                    >> course.)

                    > I think it's just standard practice to ensure that there aren't any
                    > stale object files around that could cause weird breakages.

                    Sure, but is there any more reason for that to happen when compiling
                    the kernel than when compiling anything else? Because sometimes I go
                    through several compiles in a row when tinkering with my .config; so
                    far I haven't been doing a "make clean", and I haven't noticed
                    anything bad happen, but I'd like to know if I should be more careful.

                    David Carlton | <http://math.stanford.edu/~carlton/>
                    carlton@... | Go books: <http://www.gobooks.info/>

                    All of life is a blur of Republicans and meat!
                  • Alan Clucas
                    ... There is one really good reason - if the kernel is badly compiled then it is much worse than if mpg123 is badly compiled. It is a much larger and more
                    Message 9 of 11 , Jul 4, 2002
                    • 0 Attachment
                      > On Tue, 2 Jul 2002 21:16:28 +0100, Chris Howells <chrish@...> said:
                      > > On Tuesday 02 July 2002 7:30 pm, david carlton wrote:
                      >
                      > >> Is there any more reason to do this when compiling the kernel than
                      > >> there is when compiling other pieces of software? (Other than the
                      > >> fact that the kernel's more important than most pieces of software, of
                      > >> course.)
                      >
                      > > I think it's just standard practice to ensure that there aren't any
                      > > stale object files around that could cause weird breakages.
                      >
                      > Sure, but is there any more reason for that to happen when compiling
                      > the kernel than when compiling anything else? Because sometimes I go
                      > through several compiles in a row when tinkering with my .config; so
                      > far I haven't been doing a "make clean", and I haven't noticed
                      > anything bad happen, but I'd like to know if I should be more careful.

                      There is one really good reason - if the kernel is badly compiled then it is
                      much worse than if mpg123 is badly compiled. It is a much larger and more
                      complex beast than most programs, and unlike many normal programs, you are
                      actually only going to compile in a very small subset of the whole thing. If
                      the dependancies in the hundreds of makefiles in the kernel are all correct
                      for all the millions of possible configurations (make menuconfig results)
                      then you're OK. But if not then you'll just get weird bugs. Back when I
                      hacked at the kernel I was just playing with the ide driver, and then just
                      with a single file, but it still caused funny results until I recompiled the
                      whole thing.

                      Alan
                    Your message has been successfully submitted and would be delivered to recipients shortly.