vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm just wondering if anyone can tell me where all the files are stored during compilation? I have an old laptop im putting slack on to use for e-mail and webbrowsing; and im trying to compile a slimmed down kernel for it to use. Being the newbie that i am I've sort of "lost track" of what step im on and would like to start over from scratch. Only prblem is that ive filled up my harddrive with files used during the compilation. Is it possible to clear out those files, or should I just start over? |
| |||
| David O wrote: > I'm just wondering if anyone can tell me where all the files are stored > during compilation? I have an old laptop im putting slack on to use for > e-mail and webbrowsing; and im trying to compile a slimmed down kernel > for it to use. Being the newbie that i am I've sort of "lost track" of > what step im on and would like to start over from scratch. Only prblem > is that ive filled up my harddrive with files used during the > compilation. Is it possible to clear out those files, or should I just > start over? make mrproper will clean up the source tree. -- Old Man |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 _.-In alt.os.linux.slackware, Old Man wrote the following -._ > make mrproper will clean up the source tree. And remove your .config. So if ye want to keep that move to someplace safe befor running make mrproper and then move it back. - -- .-')) http://asciipr0n.com/fp ('-. | It's a damn poor mind that ' ..- .:" ) ( ":. -.. ' | can only think of one way to ((,,_;'.;' UIN=66618055 ';. ';_,,)) | spell a word. ((_.YIM=Faux_Pseudo :._)) | - Andrew Jackson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBWA/DSJec2PH9pbURArmEAJwJ095n6H0FCNOVzcncjcduuCLPRgCeK sA2 SO9BTxlCw6lmQ/hg157jYmQ= =IJHi -----END PGP SIGNATURE----- |
| |||
| Faux_Pseudo <Faux_Pseudo@yahoo.comERCIAL> wrote: >_.-In alt.os.linux.slackware, Old Man wrote the following -._ >> make mrproper will clean up the source tree. > >And remove your .config. So if ye want to keep that move to someplace >safe befor running make mrproper and then move it back. Besides, what point is there in running mrproper to rid the disk of files that are going to be exactly recreated? Other than perhaps a few modules being added or deleted from the list of what gets made, it's virtually the same every time. Hence if there isn't enough room on the disk, cleaning out files in the kernel source tree is not going to provide extra space for doing kernel compiles. That space will have to come from somewhere else. Of course, when all is said and done, saving just the gzipped tar file and the config is all that is needed, so the rest can be deleted to provide space for something else. -- FloydL. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| |||
| I have the tar and config file already made. So if I understand you correctly; then I could essentially use make mrproper and then edit my lilo config file to allow me to boot into the new image? Im not really trying to get rid of my existing kernel I would just like to test out my custom kernels with a known good backup. Actually since i havent added anything to my existing cofiguration but only removed modules; is there a way to use the existing modules made during my initial install? floyd@barrow.com (Floyd L. Davidson) wrote: > Faux_Pseudo <Faux_Pseudo@yahoo.comERCIAL> wrote: > >>> _.-In alt.os.linux.slackware, Old Man wrote the following -._ >> >>>>> make mrproper will clean up the source tree. >> >>> >>> And remove your .config. So if ye want to keep that move to >>> someplace safe befor running make mrproper and then move it back. >>> > > > Besides, what point is there in running mrproper to rid the disk of > files that are going to be exactly recreated? Other than perhaps a > few modules being added or deleted from the list of what gets made, > it's virtually the same every time. Hence if there isn't enough room > on the disk, cleaning out files in the kernel source tree is not > going to provide extra space for doing kernel compiles. That space > will have to come from somewhere else. Of course, when all is said > and done, saving just the gzipped tar file and the config is all that > is needed, so the rest can be deleted to provide space for something > else. > > -- FloydL. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik > (Barrow, Alaska) floyd@barrow.com |
| |||
| Dave wrote: > I have the tar and config file already made. So if I understand you > correctly; then I could essentially use make mrproper and then edit my > lilo config file to allow me to boot into the new image? No, that's not what was said. You said you had "lost track" of where you were in the compile process and asked how to get rid of the files you had already created in the process. I said "make mrproper" would do that. Faux suggested you protect and keep your .config file. He assumed you had got that far in the process, which, apparently, you did. Floyd addressed disk space issues, because you said you had "filled up" your disk. If you have not completed the compile process, you do not have a new kernel installed. Doing make mrproper at this point will just wipe out everything you have done, including the .config file. > Im not really trying to get rid of my existing kernel I would just like > to test out my custom kernels with a known good backup. Actually since > i havent added anything to my existing cofiguration but only removed > modules; is there a way to use the existing modules made during my > initial install? First, you need to complete the kernel compile (assuming you do have sufficient disk space). If you finished the config step and are satisfied with what you did: 1) move the .config file to someplace outside the source tree; 2) make mrproper to clean up the source tree; 3) move the .config file back; 4) make oldconfig (this will configure the source tree using your .config file, so you don't have to repeat that step. Now, stop. Read the README file at the top of the source tree thoroughly, and read up on how to install and use a second kernel without losing your old one (link below). After you understand what you're doing, procede with compiling the new kernel, installing it, moving your old modules out of the way, editing /etc/lilo.conf, and running /sbin/lilo. By all means, save a copy of your current lilo.conf, and your current kernel image. http://www.tldp.org/LDP/lame/LAME/li...el-custom.html -- Old Man |
| |||
| Ok now I understand what you guys are saying. Now for future reference is there a log that maybe I could look at to see where I'm at and what files have been created. Ive searched through my /var/log and cant find any logs that keep track of these changes. Or is this something special that I'll have to set up? Old Man <bill@witch.lan> wrote: > Dave wrote: > >>> I have the tar and config file already made. So if I understand >>> you correctly; then I could essentially use make mrproper and >>> then edit my lilo config file to allow me to boot into the new >>> image? > > > No, that's not what was said. You said you had "lost track" of where > you were in the compile process and asked how to get rid of the files > you had already created in the process. I said "make mrproper" would > do that. > > Faux suggested you protect and keep your .config file. He assumed > you had got that far in the process, which, apparently, you did. > > Floyd addressed disk space issues, because you said you had "filled > up" your disk. > > If you have not completed the compile process, you do not have a new > kernel installed. Doing make mrproper at this point will just wipe > out everything you have done, including the .config file. > >>> Im not really trying to get rid of my existing kernel I would >>> just like to test out my custom kernels with a known good backup. >>> Actually since i havent added anything to my existing >>> cofiguration but only removed modules; is there a way to use the >>> existing modules made during my initial install? > > > First, you need to complete the kernel compile (assuming you do have > sufficient disk space). If you finished the config step and are > satisfied with what you did: 1) move the .config file to someplace > outside the source tree; 2) make mrproper to clean up the source > tree; 3) move the .config file back; 4) make oldconfig (this will > configure the source tree using your .config file, so you don't have > to repeat that step. Now, stop. Read the README file at the top of > the source tree thoroughly, and read up on how to install and use a > second kernel without losing your old one (link below). After you > understand what you're doing, procede with compiling the new kernel, > installing it, moving your old modules out of the way, editing > /etc/lilo.conf, and running /sbin/lilo. By all means, save a copy of > your current lilo.conf, and your current kernel image. > > http://www.tldp.org/LDP/lame/LAME/li...el-custom.html > > > -- Old Man |
| |||
| Dave <davido@snet111nospam111.net> wrote: > I have the tar and config file already made. Exactly. In fact, if you have a high speed Internet connection available, there is no real need to even keep the tar file of your kernel sources around either, since you can download a new one any time you want. And usually every time you start some new project like this there will be a more recent kernel anyway. And if you have gone to the trouble of learning how to configure and compile a new kernel, *do* get the latest release of whichever version you are using. You may or may not want to try switching from 2.4 to 2.6, though I would highly recommend it, but there is no point in recompiling an old release of either 2.4 or 2.6. Get the latest one for whatever you use. (That is *not* a generally true condition though! It just happens right now that the 2.4 kernel is very mature, and the latest release is almost guaranteed to be stable enough. With the 2.6 kernel, unlike what happened when 2.2 and 2.4 came out, it has been basically stable from the start and it's more a matter of whether any given release has the features implemented that you need. For a laptop, I doubt that anything is missing in the latest releases.) Also, I don't recall that you mentioned which kernel you are using, but the 2.6 kernels can be configured to put a config.gz pseudo file into /proc. Using that configuration certainly makes it easy to keep track of which config file is which! >So if I understand you >correctly; then I could essentially use make mrproper and then edit my >lilo config file to allow me to boot into the new image? There is essentially *never* any reason for most people to do a "make mrproper". It returns the kernel directory to the condition it was in the distribution archive. Unless you are a kernel developer, and have made changes to the source code which need to be archived, that is a worthless condition. If you change the kernel configuration and want to recompile, do a "make clean", which will delete all of the *.o files and whatever else is built using a specific configuration. Then you do something like "make bzlilo" or "make bzimage", followed by making and installing the modules. (But in regard to your original query, no space is likely to be saved in doing this. Virtually all of the files deleted are recreated one at a time, and at the end you have exactly what you started with.) >Im not really trying to get rid of my existing kernel I would just like >to test out my custom kernels with a known good backup. Actually since >i havent added anything to my existing cofiguration but only removed >modules; is there a way to use the existing modules made during my >initial install? Actually, if you didn't change the configuration other than to specify that some modules need not be built, you don't have to do *anything* with the kernel! Just go to /lib/modules and delete the particular modules. They won't be loaded. Or better yet, you can leave them there (we aren't talking any really significant amount of disk space), and comment out anything in the /etc/rc.d scripts that causes them to be loaded. And yes, as long as you are using the same kernel version the modules need not be recompiled unless there has been some update that you wish to install. Most distributions, and Slackware is no exception, come with as many modules as possible just so that a user who does not want to _ever_ compile a kernel can just load a module to get added kernel features. That is the whole point of having kernel features in loadable modules! -- FloydL. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| |||
| Dave <davido@snet111nospam111.net> wrote: > Ok now I understand what you guys are saying. Now for future reference >is there a log that maybe I could look at to see where I'm at and what >files have been created. Ive searched through my /var/log and cant >find any logs that keep track of these changes. Or is this something >special that I'll have to set up? Why bother? You've created *dozens* of files! Most of them are worthless the instant the final product is made. That is a new kernel file and the System.map that matches. Everything else is instantly useless (this does not address the modules, only the kernel) and will need to be rebuilt if you change any part of the configuration. Each kernel module represents just about the same situation on its own. The resulting module is of note, and none of the intermediate files are. So as far as just compiling, you want the kernel itself, the System.map, and nothing else. Where the kernel file is located depends on what you did to generate it. I use "make bzlilo", and it puts the kernel into a file /vmlinuz and generates a matching /System.map file. I move those to /boot, using various names. The modules of course are installed when you do "make modules_install". You don't need to keep track of them, other than perhaps poking around in the /lib/module directory tree to see what you do or don't have if you want to try something new. As far as installing and booting a kernel... that is a very different story. There is no set procedure, and everyone seems to do it slightly different. Some basic similarities exist though, that you might want to consider as guidelines for whatever you decide to do. Save copies of existing (functional) /etc/lilo.conf files. And do not *ever* delete an older working kernel until you have a /well/ tested new one, with a backup, in place. The system that I use involves a separate partition mounted on /boot. Once a new kernel is created, it is moved to /boot. Currently on this particular machine I have several kernels in /boot. These are the old ones: vmlinuz-2.6.6-1 vmlinuz-2.6.6-2 vmlinuz-2.6.6-3 vmlinuz-2.6.6-4 The currently in use kernel is, vmlinuz-2.6.7-1 My lilo.conf allows for booting only the last three of those, and the others are now so ancient that I could delete them without any risk. Installing a new kernel, for me, would amount to the following procedure: su cd /usr/src/linux-2.6.7 make xconfig # change kernel configuration make -j2 MAKE='make -j2' clean make -j2 MAKE='make -j2' bzlilo make -j2 MAKE='make -j2' modules make -j2 MAKE='make -j2' modules_install cd /boot mv /vmlinuz vmlinuz-2.6.7-2 mv System.map System.map-2.6.7-1 mv /System.map System.map cp /etc/lilo.conf /etc/lilo.conf.bak xemacs /etc/lilo.conf # rearrange kernel labels lilo shutdown -r now -- FloydL. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| ||||
| WOW!!!! Thanks for the post. Im gonna digest this, do some reading about the kernel and then post a followup. Thanks again!! floyd@barrow.com (Floyd L. Davidson) wrote: > Dave <davido@snet111nospam111.net> wrote: > >>> I have the tar and config file already made. > > > Exactly. In fact, if you have a high speed Internet connection > available, there is no real need to even keep the tar file of your > kernel sources around either, since you can download a new one any > time you want. And usually every time you start some new project > like this there will be a more recent kernel anyway. > > And if you have gone to the trouble of learning how to configure and > compile a new kernel, *do* get the latest release of whichever > version you are using. You may or may not want to try switching from > 2.4 to 2.6, though I would highly recommend it, but there is no point > in recompiling an old release of either 2.4 or 2.6. Get the latest > one for whatever you use. (That is *not* a generally true condition > though! It just happens right now that the 2.4 kernel is very > mature, and the latest release is almost guaranteed to be stable > enough. With the 2.6 kernel, unlike what happened when 2.2 and 2.4 > came out, it has been basically stable from the start and it's more a > matter of whether any given release has the features implemented > that you need. For a laptop, I doubt that anything is missing in the > latest releases.) > > Also, I don't recall that you mentioned which kernel you are using, > but the 2.6 kernels can be configured to put a config.gz pseudo file > into /proc. Using that configuration certainly makes it easy to keep > track of which config file is which! > >>> So if I understand you correctly; then I could essentially use >>> make mrproper and then edit my lilo config file to allow me to >>> boot into the new image? > > > There is essentially *never* any reason for most people to do a "make > mrproper". It returns the kernel directory to the condition it was > in the distribution archive. Unless you are a kernel developer, and > have made changes to the source code which need to be archived, that > is a worthless condition. > > If you change the kernel configuration and want to recompile, do a > "make clean", which will delete all of the *.o files and whatever > else is built using a specific configuration. Then you do something > like "make bzlilo" or "make bzimage", followed by making and > installing the modules. (But in regard to your original query, no > space is likely to be saved in doing this. Virtually all of the files > deleted are recreated one at a time, and at the end you have exactly > what you started with.) > >>> Im not really trying to get rid of my existing kernel I would >>> just like to test out my custom kernels with a known good backup. >>> Actually since i havent added anything to my existing >>> cofiguration but only removed modules; is there a way to use the >>> existing modules made during my initial install? > > > Actually, if you didn't change the configuration other than to > specify that some modules need not be built, you don't have to do > *anything* with the kernel! Just go to /lib/modules and delete the > particular modules. They won't be loaded. Or better yet, you can > leave them there (we aren't talking any really significant amount of > disk space), and comment out anything in the /etc/rc.d scripts that > causes them to be loaded. > > And yes, as long as you are using the same kernel version the modules > need not be recompiled unless there has been some update that you > wish to install. > > Most distributions, and Slackware is no exception, come with as many > modules as possible just so that a user who does not want to _ever_ > compile a kernel can just load a module to get added kernel features. > That is the whole point of having kernel features in loadable > modules! > > -- FloydL. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik > (Barrow, Alaska) floyd@barrow.com |