LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why compile a new Kernel? What's it all about? (https://www.linuxquestions.org/questions/linux-newbie-8/why-compile-a-new-kernel-what%27s-it-all-about-87192/)

glenn69 08-29-2003 10:21 PM

Why compile a new Kernel? What's it all about?
 
I would like to know exectly what is the Kernel and why does everyone talk about re compiling it? Is that advanced stuff, or should I be trying to compile mine?

Also, how do I access my Windows files through Linux. i have 2 hard drives 1 all windows, 1 all Linux.

Thanks

trickykid 08-29-2003 10:28 PM

Kernel: The central module of an operating system. It is the part of the operating system that loads first, and it remains in main memory. Because it stays in memory, it is important for the kernel to be as small as possible while still providing all the essential services required by other parts of the operating system and applications. Typically, the kernel is responsible for memory management, process and task management, and disk management.

Most recompile their kernel for optimization on their machine, to enable and disable services and such that they need and don't need.

To access your Windows files in Linux, you'll need to mount them.

man mount for more details. Also this is asked all the time, a quick search will find your answers. Note though, if your Windows is NTFS, you'll only be able to read from it, not write though.

Regards.

Azmeen 08-29-2003 10:30 PM

The kernel is the engine of the Linux OS. If it were a DOS system, it would be something like command.com, except this is also where hardware support, as well as resource management is handled as well.

Many will say that it's advanced stuff and newbies should stay clear of it, but I say that statement is misleading. In fact to squeeze every last drop of performance on your system, tweaking the kernel is a must. The only highly important thing that you must have is the knowledge of your hardware, eg. motherboard type, NIC type, the amount of RAM you have, your processor type, the USB support that you want (keyboard, mouse, storage devices), etc.

However, have no fear if you left out something, you can always recompile later.

Accessing your Windows partition:
Assuming your hard drive has only one partition, then your Windows drive would be /dev/hda1

You should be able to mount it if you have defined it in your /etc/fstab file... eg. mount /mnt/windows

If you could post the contents of your fstab, we would be able to assist you more.

glenn69 08-29-2003 10:34 PM

My fstab
 
Here's my FSTAB : (I haven't added anything to it Redhat 9 defaults only)

LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0

slackmagic 08-29-2003 11:33 PM

http://www.linuxquestions.org/questi...threadid=82837

check out that thread

it should help you out to access your windows partition(s) through linux and vice versa

hope this helps!

glenn69 08-30-2003 12:46 AM

Thanks i figured out how to access windows and extended partitions.

glenn69 08-30-2003 12:47 AM

Is the Kernel something that can be viewed like a text file, and you pick and choose parts of it....or is it like a binary or something?

Azmeen 08-30-2003 12:48 AM

add this line to your fstab:
Code:

/dev/hda1        /mnt/windows        vfat        noauto,user,ro  0  0
This is assuming that your windows partition is fat32. If it is ntfs then change the vfat bit to ntfs.

If you want to write onto that drive you should change the ro bit to rw, however this is highly dangerous if your win partition is ntfs.

If you want the partition to be automounted on boot then change the noauto part to auto

Also as root type this:
mkdir /mnt/windows && chmod 777 /mnt/windows

Now, try mounting your windows partition (as normal user):
mount /mnt/windows

To see what is there (after mounting):
ls /mnt/windows

Hope this helps!

glenn69 08-30-2003 12:55 AM

I did most of what you typed already. I found it on a search of forum, however I did not do the chmod 777 /mnt/windows part. What does that do?

Seems like it works without it.

Thanks for the help

Electro 08-30-2003 02:49 AM

Many people compile newer kernels because they want to be up to date or they have hardware that the newer kernels supports better than the older kernels. You can always compile your orginal kernel or older kernels.

The kernel is source code written in C programming language, so yes its a text file. Yes theres ways to pick what parts to leave in and what parts to leave out. Theres four ways of doing this. The manual way is using a text editor and going through the ".config" file. There is also a text gui and a graphical gui to pick what you want to include in the kernel. The fourth way is using your original config file by typing oldconfig in the kernel directory.

If anybody asks you what LINUX version are you running, say the kernel version instead of the distribution.

The chmod is like the attributes in DOS but with more features. Since UNIX/LINUX doesn't rely on the extension like in DOS/Windows, it uses file modes. Mode 777 makes the directory or files be read, write, execute for all groups, users, and others. Theres chown the changes the ownership of a directory or file. I suggest you look up chmod and chown for more information.

Compiling a kernel takes a long time. It can take around 1 hour or more depending on your processor, filesystem, and memory. You may want to do it when you are not planning to do any business/shool/pleasure work on your computer.

glenn69 08-30-2003 09:25 PM

Thanks for the responses everybody!

Azmeen 08-31-2003 12:19 AM

I never do the chmod part too, but some people have reported that the mount point won't be accessable to non-root without it... must be some obscure distro that they use... so I thought, ahh what the hell.

Anyway, congrats glenn.


All times are GMT -5. The time now is 01:48 AM.