modifying the original Linux kernel, say 2.6.34, to make it running as OS
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 12 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What functional platform are you using right now? You're going to have to build the kernel. Do that first. Format the pendrive with a boot directory. Put the kernel in the pendrive boot directory. If you are already running a functional Linux OS, you should be able to install grub on the pen drive without building grub from sources. Use grub-install. Use the grub config file on your existing Linux host as a model for how to configure it on the pendrive.
Okay, we're going around in circles, here. Have you built a kernel, yet? Have you done even ONE THING I've suggested? If you have, please explain, showing error messages or other useful information how it failed. If you really want help, you have to start helping us. Phrases like 'tried to install it but failed' give no one enough information to be helpful. When someone asks you a question, it usually means the answer will lead to some helpful information. Please answer them.
okay you are 100% correct. That's mistake in the way I post.
I don't know how to get the name like /dev/sda or /dev/sda1 for my pendrive labeled "LOCALDISK".
so i tried as a root user
mount -t /media/LOCALDISK # just to be safe
should i try ?
# grub-install --root-directory=/boot /dev/sda
root@aarsh-desktop:/# grub-install --root-directory=/boot /dev/sda
[and the ouput of the above command was...]
Installation finished. No error reported.
This is the contents of the device map /boot/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
I put the Linux kernel (.tar.gz) into my pen drive. And choose extract here from right click menu.
and then deleted the compressed .tar.gz Linux.
So that's it I've done so far..
And it resulted into an instable system,
just showing me grub menu each time I boot, no matter the pen-drive is plugged or not.
so i wanna send you a snap shot of that, so how can i do that ?
Little or none of what you describe makes much sense. I will try to rephrase your objective, so I understand where you are and where you're going. You want to boot a new, possibly modified, kernel (without filesystem) from a pendrive, using a host that is presently running a Ubuntu distribution. If this is correct, you will have to do the following:
1. download a kernel source tarball, and unpack it somewhere in your host filesystem, where you (as a normal user) have write permissions. Some subdirectory below your $HOME would be ideal.
2. Configure & build the compressed kernel image.
3. Install grub on the pendrive.
4. Copy the kernel image to the pendrive boot directory
5. Modify the grub configuration to point to the kernel image.
6. Set up the host to boot from a USB device, and reboot.
Have you done steps 1 & 2, yet? What was the result of building the kernel?
If you have installed grub on /dev/sda, that is almost certainly not what you want. Except for a very unusual intallation, /dev/sda is your primary hard disk. The pendrive is likely to be /dev/sdb, /dev/sdc, or some higher device name, depending on what spinning media is already installed.
The Linux kernel tar.gz sounds more like it is the source tarball. This will do nothing for you in booting. You need to unpack it and build a kernel image from it. There are many online tutorials to explain this process, and they're easy to find. Don't try to build the kernel from the sources unpacked on a pen drive; it will take an eternity.
Frankly, from what you have described so far, I'm not certain you are pursuing any useful goal; you may be under some misunderstanding about what the elements of a Linux system are, and what they do. I think I tried to express that earlier in this thread.