LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-12-2013, 07:22 PM   #1
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Rep: Reputation: 50
Kernel Recompile - for 13.37 - cp: target '.config' is not a directory


So far this is what I did - hopefully nothing, wrong.
Code:
root@machine:/usr/src/linux# make mrproper
root@machine:/usr/src/linux# cp /boot/config-generic-smp-2.6.37.6-smp-$(uname -r) /usr/src/linux/.config
cp: target '/usr/src/linux/.config' is not a directory
Is it a syntax error? Should the cp to, be: /usr/src/linux/ ?
I don't want to do anything i can't back out off.

I'm running 13.37 32bit Xfce on Leveno T500 laptop with the Huge.smp I want to rebuild or recompile 2.6.37 using the source that was in /usr/src/linux & config-gerneric-smp-2.6.37.6-smp in /boot. Following
Slackware Linux in 10 easy steps:
http://blog.tpa.me.uk/slackware-kern...guide/#respond It seems so simple. I did this once before but forgot about it.

While referring to AlienBob's wiki:
http://alien.slackbook.org/dokuwiki/...kernelbuilding
As well as, Post on this forum: Kernel Compile Guide for 2.6.0
Thank you for your time & effort it is appreciated.

Last edited by NightSky; 11-12-2013 at 08:08 PM. Reason: Tired typo
 
Old 11-12-2013, 07:27 PM   #2
ljb643
Member
 
Registered: Nov 2003
Posts: 264

Rep: Reputation: Disabled
Not to be too obvious, but the error message says "/ussr/...", although the command has the correct "/usr". Which was it? Because mistyping the directory would result in "is not a directory", I think.
 
Old 11-12-2013, 08:14 PM   #3
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
lol ... just my transcription. I'm in terminal mode on the laptop as root. The commands were correct. I'm tired by now. Is it too late to bail out for now after:
Code:
 root@machine:/usr/src/linux# make mrproper
Thank you
 
Old 11-12-2013, 08:58 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
Code:
make mrproper
does nothing else than cleaning up the directory from cruft, it is save to stop here and continue after you got some sleep.
Regarding the command that leads to the error, I would just don't use the uname command, but use Tab-completion instead and look if you still have the problem.
 
Old 11-12-2013, 09:46 PM   #5
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
@TobiSGD What is Tab-completion? And Supper Thanks
 
Old 11-12-2013, 10:03 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
Quote:
Originally Posted by NightSky View Post
@TobiSGD What is Tab-completion? And Supper Thanks
If you press the Tab-key while typing a command or a path in the command-line the shell will try to auto-complete what you type.
For example, in your case you can type
Code:
cp /bo
and then press the Tab-key, the shell will complete that to
Code:
cp /boot/
If you now continue typing
Code:
cp /boot/con
and press Tab again the shell will again try to auto-complete, but in this case it will (on a standard Slackware install) find more than one possible completion. If you repeatedly press Tab the shell will cycle through all possible completions, just do that until you found the correct file and continue typing your command.
For more info look here: https://en.wikipedia.org/wiki/Command_line_completion

Tab completion is one of the reasons why I use Zsh instead of Bash, since Zsh's completion is far superior to Bash's completion.
 
Old 11-14-2013, 02:21 PM   #7
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Thanks, tobiSGD for explaining & link. Currently reading the following: http://en.linuxreviews.org/Kernel_Rebuild_Guide
Seems that if there was an existing /usr/src/linux/.config file i wiped it out by issuing the: #:make mrproper -command
If such a file did not exist already then the command:
Code:
 cp /boot/config-generic-smp-$(uname -r) /usr/src/linux/.config
Is not exactly a usable command but maybe example of what I need to do, which is copy generic-smp.config from /boot to /usr/src/linux.
Fine, I know what $(name -r) does but why insert it before the to path /usr/src/linux? We know the kernel name & version.

Tab Completion is cool, thanks; But its not that kind of syntax puzzle this command line presents.

Read there will be no .config in /usr/src/linux unless something already has been config and saved. Maybe instead of the $(uname -r) option I need to actually plugin the kernel version.

Last edited by NightSky; 11-16-2013 at 11:06 AM.
 
Old 11-16-2013, 02:10 PM   #8
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Swaped the above command to:
[/CODE]
#cp /boot/config-generic-smp-2.6.37.6-smp /usr/src/linux/.config
[/CODE] this command copied config-generic-smp over to /usr/src/linux/space .config (Directory)? Or /.config no space (a file)? Can't see the difference even when I look at Alien's tut. Thanks

Last edited by NightSky; 11-16-2013 at 02:12 PM.
 
Old 11-16-2013, 02:39 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
.config has to be a file (and it will be, since the source is a file the copy is also a file) in your kernel-source directory. So, no space.
 
1 members found this post helpful.
Old 11-16-2013, 04:25 PM   #10
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
@TobiSGD got it But it won't copy over to /usr/src/linux/.config
Only will copy over if I leave out .config at the end of 'To Path'? This seems right to you?

*Another thing is puzzling me: According to both sysadmin & docuwiki commands are being issued from the /usr/src/linux directory or folder but its actually a symlink to
/usr/src/linux.2.6.37.6 where the source code resides? So commands from the symlink folder uses what is in linux-2.6.37.6 without changing it? This the way it works?

nconfig is the netconfig command and I'm wondering whether to use it or not since the laptop is setup for wireless?

Last edited by NightSky; 11-16-2013 at 04:30 PM. Reason: ncofig use with wirleless setup?
 
Old 11-16-2013, 04:41 PM   #11
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 181
Blog Entries: 1

Rep: Reputation: 38
Once you download the new kernel source code .xz package.
mv/cp to /usr/src/ and unzip/package it there(/usr/src), you will have your new kernel source directory.
and then remove the symbolic link of older (linux-version-number), re-links to the new kernel (linux-newer-version#) to linux.

rebuild your new kernel in your new kernel directory not the old, computer is smart, but it can only do what you tell them to do, it can't guess what you might likely to do.

inside of new kenrel directory: make distclean

get official slackware kernel configuration file ( example to build generic-3.10.17 for slackware64 )
Code:
(ftp.slackware.com/pub/slackware/slackware64-current/source/k/config-x86_64/config-generic-3.10.17.x64)
copy this file into new kernel(3.10.17)directory as .config file
make ; make modules_install
get ftp.slackware.com/pub/slackware/slackware64-current/source/k/packaging-x86_64
inside it contains 3 directories, using inside kernel-generic slackbuild scripts to build a slackpkag for installation.
don't forget using kernel-modules's slackbuild script to build kernel-modules of same version.
you need huge package too be on safe side, it for trouble shooting.

DO NOT use upgradepkg to upgrade kernel. Use installpkg
edit your /etc/lilo.conf add your new kernel. keep your old kernel intact, just be safe, testing your new kernel first.
go to /boot; check and make sure links are good.
mkinitrd with your new kernel, add necessary modules into your initrd ram disk.

13.37 version of lilo and mkinitrd don't work with 3.10.17, you need current version source and reompile them with glibc libraries of 13.37
If you using LVM, you might need new version of lvm2 and udev as well

run lilo before your reboot.

good luck

Last edited by number22; 11-16-2013 at 05:27 PM.
 
Old 11-16-2013, 05:36 PM   #12
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
Thank you number22. I don't want to build new kernel just learning with original installed version. Much later I'll try new one I'm not so smart.
 
Old 11-16-2013, 08:39 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
Quote:
Originally Posted by NightSky View Post
@TobiSGD got it But it won't copy over to /usr/src/linux/.config
Only will copy over if I leave out .config at the end of 'To Path'? This seems right to you?
No. It does copy the file (you will see that if you use the -v option for cp), but since the filename (.config) begins with a dot it is a hidden file. You can see it with the -a option for ls.
Quote:
*Another thing is puzzling me: According to both sysadmin & docuwiki commands are being issued from the /usr/src/linux directory or folder but its actually a symlink to
/usr/src/linux.2.6.37.6 where the source code resides? So commands from the symlink folder uses what is in linux-2.6.37.6 without changing it? This the way it works?
/usr/src/linux is usually a link to the source of the currently installed kernel. If you use the cd command to switch to /usr/src/linux the shell will actually change to the real source path, So any changes you make will be present in the actual directory (here /usr/source/linux-2.6.37).
Quote:
nconfig is the netconfig command and I'm wondering whether to use it or not since the laptop is setup for wireless?
Where did you get that nconfig from? I can't find it in the tutorial you linked to.
 
1 members found this post helpful.
Old 11-16-2013, 10:18 PM   #14
NightSky
Member
 
Registered: Sep 2001
Location: Texas :(
Distribution: Slackware64-13.37
Posts: 776

Original Poster
Rep: Reputation: 50
@TobiSGD .. thank you so much for explaining all this into one coherent process. We're making progress here
Finally : ls -a shows the .config

nconfig came from man command & research found it in following thread: http://www.linuxquestions.org/questi...estion-911579/ Post #3

Different thread suggests I backup /lib/firmware like this
Code:
mv /lib/firmware /lib/firmware-2.6.36
to make sure I don't lose it. I can do this just from the root command line, don't need to be any special directory? Before I make modules_install.
 
Old 11-16-2013, 10:31 PM   #15
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,407
Blog Entries: 2

Rep: Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994Reputation: 3994
Quote:
Originally Posted by NightSky View Post
nconfig came from man command & research found it in following thread: http://www.linuxquestions.org/questi...estion-911579/ Post #3
nconfig is in this case not a command, but tells the make command which target in the makefile to run. The nconfig target starts a dialog for changing kernel options in a Norton Commander style, you could also use the menuconfig or xconfig targets. There is indeed one option you should change at least, you should add a custom suffix to the kernel version, so that the original modules will not be overwritten when the new ones are installed. You will find that option in the menu under General setup -> Local version - append to kernel release. For example, I use "-sl" for my kernels, but you can use anything you want.

Quote:
Different thread suggests I backup /lib/firmware like this
Code:
mv /lib/firmware /lib/firmware-2.6.36
to make sure I don't lose it. I can do this just from the root command line, don't need to be any special directory? Before I make modules_install.
I never had problems with missing firmware, but of course you can do that, just type it in as is from the command line as root.
 
1 members found this post helpful.
  


Reply

Tags
cpu, file system, kernel 2.6.37.6, menuconfig, rebuild


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
Kernel config change recompile? Sherpa Gentoo 3 12-31-2009 12:03 PM
What might i also need to recompile from changing major options in the kernel config sanitynotvanity Linux - General 8 08-26-2009 10:11 AM
Source Directory for Target Kernel halfpower Debian 1 05-22-2006 10:48 AM
When recompile one kernel, it's necessary rename config for oldconfig??? xcore_on Linux - Newbie 1 05-20-2006 04:10 AM
Trying to recompile kernel but config's not working. SonicGT Linux - Newbie 11 08-25-2005 08:01 PM


All times are GMT -5. The time now is 03:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration