LinuxQuestions.org
Visit the LQ Articles and Editorials section
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

Poll: Your favourite distro is.......
Be advised that this is a public poll: other users can see the choice(s) you selected.
Poll Options
Your favourite distro is.......

You must log in and have one post to vote in this poll. If you don't have an account, you can register here.
Results will be available after the polls close.

The nominees are:

Slackware 13.0
openSUSE 11.2
fedora 12
red hat
cenOS
mandriva
linux mint 8 (derived from ubuntu)
sabayon
debian
ubuntu/kubuntu/edubuntu
granular
pupy linux
damn small linux
minix
Yeah I want to modify current linux kernel with a drastical change and to roll out my own distro

Reply
 
Search this Thread
Old 06-02-2010, 12:43 AM   #1
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Rep: Reputation: 18
Lightbulb modifying the original Linux kernel, say 2.6.34, to make it running as OS


How can I modify the original Linux kernel, say 2.6.34, to make it running as my OS ? (ACTUALLY IN VIRTUAL BOX


please note that :
------------------

1. I AM NOT ASKING YOU HOW TO USE VITUAL BOX. I KNOW IT. BUT I'VE WRITTEN IN THE QUESTION, JUST TO BE CLEAR.

2. I AM NOT ASKING TO SIMPLY UPGRADE MY KERNEL. RATHER, I WANT THE LINUX KERNEL TO WORK AS MY OS.

3. I DON'T BOTHER ABOUT COMMAND LINE OR GUI. ALL THAT I WANT IS TO JUST MAKE THE KERNEL RUNNING.
 
Old 06-02-2010, 05:49 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
You can't. Hence the whole GNU/Linux thing - Linus created the kernel and needed a toolset to turn it into an OS. GNU had a toolset and needed a kernel. Have a look at the LFS Book, there are a set of very basic tools you need to make the kernel boot - once it has booted you will have an extremely minimal system.
 
Old 06-03-2010, 10:28 AM   #3
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
thank you brother for your kind help.

but a doubt is there..
what was there in the first original linux then?
was it not an independent OS ?

Last edited by aarsh; 06-03-2010 at 10:32 AM.
 
Old 06-03-2010, 10:34 AM   #4
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
Question

Quote:
Originally Posted by XavierP View Post
You can't. Hence the whole GNU/Linux thing - Linus created the kernel and needed a toolset to turn it into an OS. GNU had a toolset and needed a kernel. Have a look at the LFS Book, there are a set of very basic tools you need to make the kernel boot - once it has booted you will have an extremely minimal system.
okay .. so what is that toolset ?? can you please explain a little bit ??
 
Old 06-03-2010, 10:52 AM   #5
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
In my sig, there is a link to a chart showing all the Linux distros and where they came from. Get it here: http://futurist.se/gldt/wp-content/uploads/gldt1005.png

The toolset is everything that is not the kernel. Read up on the history here: http://en.wikipedia.org/wiki/History_of_Linux and here: https://netfiles.uiuc.edu/rhasan/linux/
 
Old 06-03-2010, 10:53 AM   #6
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
http://en.wikipedia.org/wiki/GNU/Linux
Read the history bit.
http://en.wikipedia.org/wiki/History_of_Linux
 
Old 06-03-2010, 02:24 PM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by aarsh View Post
How can I modify the original Linux kernel, say 2.6.34, to make it running as my OS ?

2. I AM NOT ASKING TO SIMPLY UPGRADE MY KERNEL. RATHER, I WANT THE LINUX KERNEL TO WORK AS MY OS.
This is sounding like a question of semantics. Perhaps you could tell us what you mean by 'OS'? The strict definition that most pedants would use is that the kernel IS the OS.
Given that, the method of getting the kernel 'working' is to launch it with a bootloader such as LILO, Grub, or PXE. But I don't think this is really what you are asking. Or is it?

--- rod.
 
Old 06-03-2010, 04:09 PM   #8
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
I read it as he wants to run only the kernel - no other programs. AFAIK, that won't work, you need a minimal set of programs to do this.
 
Old 06-03-2010, 06:11 PM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
That seems like a reasonable interpretation. The last selection in the poll makes me think he is confused about what a kernel is. Making a new kernel does not produce a drastically different distro.
--- rod.
 
Old 06-07-2010, 07:16 AM   #10
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
@ theNbomr:

thanks for your kind help. I know that only kernel is not sufficient to make any os to run but i am talking about the custom as well as minimized os (having grub boot loader and all other 'MUST' components ).. which just loads the core component of the linux kernel. and i wanted to ask the same in the polls to find people like me.
 
Old 06-07-2010, 12:52 PM   #11
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
I don't know of what value your extreme minimalist configuration would be, but as I see it, you could easily set up a bootloader to launch an arbitrary kernel, and pass as the init process, only a simple do-nothing program. To test how this might go, simply boot almost any system that uses grub, and at the boot prompt, enter edit mode. Edit the command line, replacing the 'init=' argument with 'init=/bin/bash'. When it boots, you will have an almost-minimal OS with only a running kernel and a shell. This is basically single-user mode.
There are toolkits available that provide a means to produce a minimal, or however complex distro you require. One that I have tried is buildroot, which perhaps would be useful to you.

--- rod.
 
Old 06-07-2010, 11:52 PM   #12
aarsh
Member
 
Registered: Mar 2010
Location: ATL, GA
Distribution: openSUSE 11.2 , salckware ,ubuntu
Posts: 169

Original Poster
Rep: Reputation: 18
can you tell me specifically that what to do to attach grub code to Linux kernel ?
I am a rally newbie and don't know what to do after downloading the source code of GRUB and Linux kernel :-(

Last edited by aarsh; 06-10-2010 at 05:17 AM.
 
Old 06-15-2010, 05:13 PM   #13
hda7
Member
 
Registered: May 2009
Distribution: Debian wheezy
Posts: 249

Rep: Reputation: 31
Quote:
Originally Posted by aarsh View Post
can you tell me specifically that what to do to attach grub code to Linux kernel ?
I am a rally newbie and don't know what to do after downloading the source code of GRUB and Linux kernel :-(
Well, after you build the kernel and grub, you'll want to install grub to a device (say a hard drive). I usually install grub like this (use your device instead of hda1):
Code:
mount /dev/hda1 /mnt/hda1
grub-install --root-directory=/mnt/hda1 /dev/hda1
After the install, look for a folder on your device (usually boot/grub/) that contains the grub files. A file menu.lst should contain something like this:
Code:
title Your Linux Distro Name
rootnoverify (hd0,0) # (hd0,0) is the grub name for hda1. (hd1,2) would be hdb3, etc.
kernel /path/to/kernel/on/device
initrd /path/to/initrd # If necessary.
If you can find the grub manual you can probably find more information.
Then just make sure your device has the boot flag set (see man fdisk), check, check, and check again, and then reboot.
 
Old 06-15-2010, 06:41 PM   #14
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
You are presently running some distribution. Look in grub.conf (may be called menu.lst), probably located in /boot and see how it is done there. Of course, in your minimalist setup, you won't want to run init, but something much smaller.

--- rod.
 
Old 06-25-2010, 06:55 PM   #15
esm_menc
Member
 
Registered: Apr 2006
Location: washington
Distribution: boat loads in my library:LFS3.1/dsl/puppy/tinycore
Posts: 31

Rep: Reputation: 16
Voted for kUbuntu but..

Although I use kUbuntu, Most of my other PC's are using "slitaz (installed)".
 
  


Reply


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


All times are GMT -5. The time now is 08:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration