LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


View Poll Results: Your favourite distro is.......
Slackware 13.0 12 19.67%
openSUSE 11.2 9 14.75%
fedora 12 7 11.48%
red hat 1 1.64%
cenOS 1 1.64%
mandriva 5 8.20%
linux mint 8 (derived from ubuntu) 5 8.20%
sabayon 0 0%
debian 15 24.59%
ubuntu/kubuntu/edubuntu 20 32.79%
granular 0 0%
pupy linux 3 4.92%
damn small linux 1 1.64%
minix 0 0%
Yeah I want to modify current linux kernel with a drastical change and to roll out my own distro 5 8.20%
Multiple Choice Poll. Voters: 61. You may not vote on this poll

Reply
  Search this Thread
Old 07-02-2010, 07:13 PM   #16
aarsh
Member
 
Registered: Mar 2010
Location: USA
Distribution: Ubuntu MATE
Posts: 182

Original Poster
Rep: Reputation: 18

@ theNbomr :

I have downloaded the grub and the vanila linux kernel.
Now I should :

- run any Live (ubuntu 9.04) OS.
- install grub on it.(./configure)
- and then if i give it (to the grub) my kernel's path (residing in the pendrive : /dev/sda1)

then will it work ? may give some error ?
please guide me..
 
Old 07-03-2010, 10:24 AM   #17
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

man grub
man grub-install

--- rod.
 
Old 07-03-2010, 08:36 PM   #18
aarsh
Member
 
Registered: Mar 2010
Location: USA
Distribution: Ubuntu MATE
Posts: 182

Original Poster
Rep: Reputation: 18
I wanna install grub/grub2 on my empty hard disk drive.
For that I boot my machine from ubuntu 10.04 Live OS
and tried to install it but failed.

So what to do now ?

Also I think some toolset , if I want to boot the vanilla Linux kernel (please suggest me the link for that) ,

So after I've installed the grub and required tool-set , (the one suggested by you, if any) then, all that I've to do is to just extract the kernel and boot it from that device or more procedure ?
 
Old 07-03-2010, 09:05 PM   #19
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.
--- rod.
 
Old 07-04-2010, 10:51 PM   #20
aarsh
Member
 
Registered: Mar 2010
Location: USA
Distribution: Ubuntu MATE
Posts: 182

Original Poster
Rep: Reputation: 18
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
grub-setup /dev/sda
grub-install /dev/sda

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'.

(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdg

Additionally,
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 ?

Last edited by aarsh; 07-05-2010 at 12:10 AM.
 
Old 07-06-2010, 09:29 AM   #21
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
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.

--- rod.

Last edited by theNbomr; 07-06-2010 at 09:40 AM.
 
  


Reply



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
make a bootable iso cd of the currently running kernel (2.6.29) ceazar123 Red Hat 2 11-04-2009 12:37 AM
Cannot make a bootable DVD copy of original Linux DVD. aimee01 Linux - General 2 06-02-2008 02:19 PM
Modifying runlevel on an already installed and running linux server etortola Linux - General 2 04-20-2008 11:27 PM
Cannot install software and drivers on eeepc running original xandros bluchill Linux - Newbie 6 03-08-2008 07:20 AM
error recompiling redhat linux 9 kernel 2.4.20-31.9 using original .config whipermr5 Linux - Software 7 12-22-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration