How does the kernel know where is /etc/ ?


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How does the kernel know where is /etc/ ?
# 1  
Old 07-16-2010
How does the kernel know where is /etc/ ?

If I create some hard disk partitions: /boot, /, /usr, /tmp ... , of cause the kernel is in the /boot partition, /etc/fstab is in the / partition not in /boot partition, when the system boot, how does the kernel know where is the / partition?

Or I create a separated partition: /etc, can the kernel find /etc/fstab in the booting time?

Thanks.
# 2  
Old 07-16-2010
/etc MUST reside on the root partition. If you move /etc/ to another partiton, assuming the OS lets you, you will have a non functional machine.

The basic quick and dirty of it is this:

Inside the Linux boot process

The bootloader then needs to know where your kernel and when the root filesystem is.

/boot does NOT have to be a filesystem. It can be a directory on the root partition. You should have a look at this:

http://www.pathname.com/fhs/
This User Gave Thanks to mark54g For This Post:
# 3  
Old 07-16-2010
Thank you!

But:

/boot does NOT have to be a filesystem. It can be a directory on the root partition.

I have done it before. In fact, many net-friends suggest let the /boot be in a separated partition(ext2/ext3...).
# 4  
Old 07-17-2010
Yes, you can do so. The kernel really doesn't care. As long as the bootloader can access the files it needs to bootstrap the kernel into memory, the system will boot. I've had situations where I accidentally made my kernel without ext2 support, causing an odd situation where the kernel could boot but couldn't mount /boot, preventing me from updating the kernel! Oops.

Any partition not necessary for very basic system services can be made a partition, notably things like /opt, /usr, and /home.

Last edited by Corona688; 07-17-2010 at 02:29 AM..
# 5  
Old 07-17-2010
Quote:
Originally Posted by haixiao_liu
many net-friends suggest let the /boot be in a separated partition
In the past, there had been a reason for this: the 1024-cylinder-limitation of the bootloader LILO (prior to version 21.x).
# 6  
Old 07-17-2010
OK, thank you every one, it is my English comprehension problem, I misunderstanded " /boot does NOT have to be a filesystem ", I am so sorry for wasting everybody's time.

Thread close.
# 7  
Old 07-17-2010
Quote:
Originally Posted by dr.house
In the past, there had been a reason for this: the 1024-cylinder-limitation of the bootloader LILO (prior to version 21.x).
There's other good reasons for it, too. Keeping it separate means you can keep it an old-fashioned ext2/3 filesystem, compatible with grub, while you can use whatever filesystem you want for root without confusing grub. It also makes it a lot harder to damage by accident.
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

2. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

3. Linux

Supermicro(dual core) server getting rebooted after "decompressing the kernel;booting the kernel" me

supermicro(dual core) server getting rebooted after "decompressing the kernel;booting the kernel" message comes. I tried giving acpi=off to the kernel command line but same problem.It shows everything ok and no problem with memory and processors and power supplies.Wt could be the reason? It has... (1 Reply)
Discussion started by: pankajd
1 Replies

4. AIX

How to convert a partition usin 64 bits kernel to 32 bits kernel?

Hello there: I know that exist a procedure to convert an OS using 32bits kernel to 64 bits kernel. But, exist a procedure to convert an OS using 64bits to 32 bits kernel? Please help me. Regards. (2 Replies)
Discussion started by: GEIER
2 Replies

5. UNIX for Advanced & Expert Users

kernel mapping...

> how the sendmsg and recvmsg calls will know which kernel module to use (SCTP, RTP etc.) internally(kernel mapping: how kernel handle socket call) (1 Reply)
Discussion started by: prangin
1 Replies

6. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

7. Programming

kernel-kernel call communication

hi all! i have developed a mechanism in system.c to count how many times each kernel call is called. The results are held in an array in system.c . What i want to do is to create a new kernel call which will print this array. I need help in passing the array from system.c to the new kernel call. ... (5 Replies)
Discussion started by: aureliano
5 Replies

8. Linux

Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU

ok so I just installed fedora core 6 on my dell inspiron 700m and I go to boot into linux and I get this error. Has anyone seen this before? I also had XP Pro and Vista installed on this pc prior to putting fedora core 6 on the machine. I'm trying to setup a triple boot system. Please Help... (2 Replies)
Discussion started by: dave043
2 Replies

9. Red Hat

kernel 2.6.18

Again same issue with new kernel 2.6.18.1 root@world # iptables -L modprobe: QM_MODULES: Function not implemented modprobe: QM_MODULES: Function not implemented modprobe: Can't locate module ip_tables iptables v1.2.8: can't initialize iptables table `filter': iptables who? (do you... (10 Replies)
Discussion started by: prashant_ohol
10 Replies
Login or Register to Ask a Question