- kernel source code location in linux
- 3 Answers 3
- Thread: Where is the Ubuntu Linux kernel located?
- Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Re: Where is the Ubuntu Linux kernel located?
- Bookmarks
- Posting Permissions
- Location of the kernel binary (when not in /boot)?
- 3 Answers 3
kernel source code location in linux
I am working in Windows and running fedora through VMware. By default, the kernel source tree should be in usr/src/ directory. Instead I could find only an empty directory called kernels. The actual source code is missing there. When browsing I thought it might be in other directories like /boot . But I couldn’t find source tree there as well. I need to modify system call tables for which I should be able to access those source codes.
3 Answers 3
Kernel source is not installed by default. You can follow e.g. the instructions here to install the source and build your kernel.
You probably need to install the kernel-devel package.
On Fedora, all of the software is managed through a system called the Red Hat Package Manager (RPM). Every file (other than user data and other transient files like logs and such) is «owned» by a package. The ls command is from coreutils , the kernel is probably from kernel and BZFlag (the greatest Linux game ever) is provided by the bzflag package.
In the good old days, you would try to install software by using the rpm command (type » man rpm » for more information) and giving it the path to an RPM file that you had downloaded. The rpm command would then dutifully respond by informing you that you first need to satisfy 33 prerequisites. Then you would go download those 33 prerequisites and try to install them, only to find that each of those had their own prerequisites. And so on.
These days, Fedora has a nice set of online repositories of packages (and you can add others for third party software), and a program called yum that can download databases of all the packages, and you tell yum «install package foo for me» (by typing something like » yum install kernel-devel «) and it goes and figures out that in order to install that package, you need a bunch of other prerequisite packages, and so on. It then automatically downloads and installs everything you need, and away you go. For more information on the various incantations that make yum go, see » man yum «).
Thread: Where is the Ubuntu Linux kernel located?
Quad Shot of Ubuntu
Join Date Jul 2007 Location Salt Lake City, Utah Beans 487 —> Beans 487 Distro Ubuntu 9.10 Karmic Koala
Where is the Ubuntu Linux kernel located?
I am curious because I wanted to play around with Kernel Check, but I ran out of room. I was in the middle of compiling a kernel and completely ran out of space on my /. How can I get rid of kernel that failed?
Also, how much room is required to compile the kernel?
Cake for coffee’s sake
Join Date Jul 2006 Location /usr/share/beer Beans 1,316 —> Beans 1,316 Distro Ubuntu 10.04 Lucid Lynx
Re: Where is the Ubuntu Linux kernel located?
Out of habit, I put the source in /usr/src/*
The running one is loaded from /boot/vmlinuz*
Registered Linux User #419773, Ubuntu User #8473 («It Is What It Is»)
If you type rm -Rf / as root at command line you will get herpes. then die. (okay, it’ll erase ALL your data)
Quad Shot of Ubuntu
Join Date Jul 2007 Location Salt Lake City, Utah Beans 487 —> Beans 487 Distro Ubuntu 9.10 Karmic Koala
Re: Where is the Ubuntu Linux kernel located?
What is usually in /usr/src? Mine currently has several folders totaling about five gigs. What is safe to remove in there?
Cake for coffee’s sake
Join Date Jul 2006 Location /usr/share/beer Beans 1,316 —> Beans 1,316 Distro Ubuntu 10.04 Lucid Lynx
Re: Where is the Ubuntu Linux kernel located?
They should all be labeled, mine currently holds only two directories: the actual kernel source directory and the kernel headers for my running kernel.
Registered Linux User #419773, Ubuntu User #8473 («It Is What It Is»)
If you type rm -Rf / as root at command line you will get herpes. then die. (okay, it’ll erase ALL your data)
Quad Shot of Ubuntu
Join Date Jul 2007 Location Salt Lake City, Utah Beans 487 —> Beans 487 Distro Ubuntu 9.10 Karmic Koala
Re: Where is the Ubuntu Linux kernel located?
total 24 drwxrwsr-x 6 root src 4096 2009-11-16 19:55 . drwxr-xr-x 11 root root 4096 2009-11-16 05:40 .. lrwxrwxrwx 1 root src 21 2009-11-16 05:56 linux -> /usr/src/linux-2.6.31 drwxr-xr-x 25 root root 4096 2009-11-16 19:08 linux-2.6.31 drwxr-xr-x 23 root root 4096 2009-10-27 18:16 linux-headers-2.6.31-14 drwxr-xr-x 7 root root 4096 2009-10-27 18:16 linux-headers-2.6.31-14-generic drwxr-sr-x 2 root src 4096 2009-11-16 05:37 oldpackages
I should be able to remove the following correct?
linux
linux-2.6.31
linux-headers-2.6.31-14
oldpackages
May the Ubuntu Be With You!
Re: Where is the Ubuntu Linux kernel located?
I’m just wondering why this stuff is in the Absolute Beginner Talk section?
advocating Free and Open Source Software, supporting the Open Web
fight for your right to party and get your free cloud storage now
Quad Shot of Ubuntu
Join Date Jul 2007 Location Salt Lake City, Utah Beans 487 —> Beans 487 Distro Ubuntu 9.10 Karmic Koala
Re: Where is the Ubuntu Linux kernel located?
Was there a better place to put it? I didn’t notice a kernel section
So I was being a little slow yesterday. I should have just looked at the time stamps in /usr/src. I did indeed delete the files and folder that I listed above and nothing went wrong.
Also, I find it a little weird that when there is no space left in the / partition. That Gnome says the Power Manager isn’t setup properly and to contact the Admin.
- Site Areas
- Settings
- Private Messages
- Subscriptions
- Who’s Online
- Search Forums
- Forums Home
- Forums
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- New to Ubuntu
- General Help
- Installation & Upgrades
- Hardware
- Desktop Environments
- Networking & Wireless
- Multimedia Software
- Ubuntu Specialised Support
- Ubuntu Development Version
- Security
- Virtualisation
- Ubuntu Servers, Cloud and Juju
- Server Platforms
- Ubuntu Cloud and Juju
- Gaming & Leisure
- Emulators
- Wine
- Development & Programming
- Packaging and Compiling Programs
- Development CD/DVD Image Testing
- Ubuntu Application Development
- Ubuntu Dev Link Forum
- Programming Talk
- Repositories & Backports
- Ubuntu Backports
- Bug Reports / Support
- Ubuntu Backports
- System76 Support
- Apple Hardware Users
- Ubuntu Community Discussions
- Ubuntu, Linux and OS Chat
- Recurring Discussions
- Full Circle Magazine
- The Cafe
- Cafe Games
- Market
- Mobile Technology Discussions (CLOSED)
- Announcements & News
- Weekly Newsletter
- Membership Applications
- The Fridge Discussions
- Forum Council Agenda
- Forum Feedback & Help
- Request a LoCo forum
- Resolution Centre
- Ubuntu, Linux and OS Chat
- Other Discussion and Support
- Other OS Support and Projects
- Other Operating Systems
- Ubuntu/Debian BASED
- Debian
- MINT
- Arch and derivatives
- Fedora/RedHat and derivatives
- Mandriva/Mageia
- Slackware and derivatives
- openSUSE and SUSE Linux Enterprise
- Mac OSX
- PCLinuxOS
- Gentoo and derivatives
- Windows
- BSD
- Any Other OS
- Other Operating Systems
- Assistive Technology & Accessibility
- Art & Design
- Education & Science
- Documentation and Community Wiki Discussions
- Tutorials
- Outdated Tutorials & Tips
- Ubuntu Women
- Ubuntu LoCo Team Forums
- Americas LoCo Teams
- Argentina Team
- Software
- Hardware
- Comunidad
- Arizona Team — US
- Arkansas Team — US
- Brazil Team
- California Team — US
- Canada Team
- Centroamerica Team
- Chile Team
- Comunidad
- Hardware
- Software
- Instalaci�n y Actualizaci�n
- Colombia Team — Colombia
- Georgia Team — US
- Illinois Team
- Indiana — US
- Kentucky Team — US
- Maine Team — US
- Minnesota Team — US
- Mississippi Team — US
- Nebraska Team — US
- New Mexico Team — US
- New York — US
- North Carolina Team — US
- Ohio Team — US
- Oklahoma Team — US
- Oregon Team — US
- Pennsylvania Team — US
- Peru Team
- Texas Team — US
- Uruguay Team
- Utah Team — US
- Virginia Team — US
- West Virginia Team — US
- Argentina Team
- Asia and Oceania LoCo Teams
- Australia Team
- Bangladesh Team
- Hong Kong Team
- Myanmar Team
- Philippine Team
- Singapore Team
- Europe, Middle East, and African (EMEA) LoCo Teams
- Albania Team
- Catalan Team
- Portugal Team
- Egypt Team
- Georgia Team
- Ireland Team — Ireland
- Kenyan Team — Kenya
- Kurdish Team — Kurdistan
- Lebanon Team
- Morocco Team
- Saudi Arabia Team
- Sudan Team
- Tunisia Team
- Other Forums & Teams
- LoCo Archive
- Afghanistan Team
- Alabama Team — US
- Alaska Team — US
- Algerian Team
- Andhra Pradesh Team — India
- Austria Team
- Bangalore Team
- Bolivia Team
- Cameroon Team
- Colorado Team — US
- Connecticut Team
- Costa Rica Team
- Delhi Team
- Ecuador Team
- El Salvador Team
- Florida Team — US
- Galician LoCo Team
- Greek team
- Hawaii Team — US
- Honduras Team
- Idaho Team — US
- Iowa Team — US
- Jordan Team
- Kansas Team — US
- Libya Team
- Louisiana Team — US
- Maryland Team — US
- Massachusetts Team
- Michigan Team — US
- Missouri Team — US
- Montana Team — US
- Namibia Team
- Nevada Team — US
- New Hampshire Team — US
- New Jersey Team — US
- Northeastern Team — US
- Panama Team
- Paraguay Team
- Qatar Team
- Quebec Team
- Rhode Island Team — US
- Senegal Team
- South Carolina Team — US
- South Dakota Team — US
- Switzerland Team
- Tamil Team — India
- Tennessee Team — US
- Trinidad & Tobago Team
- Uganda Team
- United Kingdom Team
- US LoCo Teams
- Venezuela Team
- Wales Team
- Washington DC Team — US
- Washington State Team — US
- Wisconsin Team
- Yemen Team
- Za Team — South Africa
- Zimbabwe Team
- Americas LoCo Teams
- Other OS Support and Projects
- Ubuntu Official Flavours Support
Bookmarks
Bookmarks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Location of the kernel binary (when not in /boot)?
However, this is an embedded device not a standard desktop. Is it possible that the kernel binary is located on a different storage location which isn’t mounted. Example: / is mounted on the SD card and the kernel is written on flash? If not, what are the options for locating the kernel binary?
Find out how the device boots, if possible. Conceivably it doesn’t have a local kernel at all and gets it from a tftp server.
3 Answers 3
/boot is the standard location for the kernel in desktop/server distributions, but embedded systems vary greatly. Where the kernel is stored entirely depends on your bootloader, and it may not be a file as embedded bootloaders are often not capable of reading Linux filesystems.
For example, with U-Boot (a popular embedded bootloader), you create an image with mkimage , which may then be written to a separate FAT partition or written in some other system-specific format. If the kernel image is on a FAT partition, that partition is often not mounted under Linux, since Linux never needs to access it (except during upgrades, but most embedded systems don’t upgrade their kernel separately from the bootloader).
The upshot is that you have to look for it. If you need help, you need to describe your system very precisely, and even then we may or may not be able to help depending on how popular your embedded system is. If you can’t find it on your own, consider asking for support from the providers of the embedded system.