Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm attempting to look for grub:

[root /]# find / -iname "*grub*"
/sbin/grubby
/usr/share/man/man8/grubby.8.gz
/usr/share/vim/vim70/syntax/grub.vim
/usr/share/vim/vim70/ftplugin/grub.vim
/usr/lib/pm-utils/sleep.d/01grub

Now I'm attempting to look for lilo:

[root /]# find / -iname "*lilo*"
/usr/share/doc/syslinux-3.11/keytab-lilo.doc
/usr/share/vim/vim70/syntax/lilo.vim
/usr/lib/syslinux/keytab-lilo.pl

I thought perhaps it was somehow being hidden with SELinux so I tried to turn that off (temporarily):

[root@ /]# setenforce 0
setenforce: SELinux is disabled

Hmm, look like it was already off. What about turning that on?

[root@ /]# setenforce 1
setenforce: SELinux is disabled

Ok, now I have no clue why I can't find any bootloader files. I re-run the find commands and get the same thing.

Next I had read the bootloader section in the Linux Administration Handbook and it didn't mention not being able to find bootloader configuration files.

This is an box on Amazon EC2: CentOS release 5.4 final selinux

Is this normal to not have these files? I also don't seem to have any /etc/sysconfig/selinux or /etc/selinux/config files.... Hmmm....

Update - Why am I asking?

This article (among others) mentions using boot flags to enable or disable selinux in the grub.conf file. Without a boot loader how do you specify boot flags?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Yes, it is. A boot loader is not necessary at all. The kernel can load itself, given that the flexibility that a boot manager like grub provides, is not necessary. The bzImage contains all the code needed to boot:

enter image description here

Source: Wikipedia

For the linux kernel from 3.3 onwards this also works for UEFI systems. This special boot loader is called efi stub. Fedora is one of the few distributions that ship a kernel configured with EFI_STUB=y.

I do neither know EC2, nor CentOS and cannot tell how they are set up. But if one does not need to boot several kernels or operating systems, there's no need to install a dedicated boot manager.

share|improve this answer
    
This article (among others) mentions using boot flags to enable or disable selinux in the grub.conf file. Without a boot loader how do you specify boot flags? –  cwd Aug 3 '12 at 15:06
    
It depends on how you load the kernel. There is some piece of software involved (BIOS, UEFI, boot manager, DOS executable, etc.) that loads the kernel and that needs to pass the flags. On my system the UEFI passes the flags. –  Marco Aug 3 '12 at 15:16
add comment

Amazon AMIs boot from an amazon kernel in their EC2 virtual machines, so they don't strictly need a bootloader. You can boot a paravirtualized kernel, as described in their documentation.

share|improve this answer
    
That is good to know. See my update regarding boot flags and let me know if you have any thoughts on that part. –  cwd Aug 3 '12 at 15:13
    
Yeah, with the amazon kernel in the non-paravirtualized bootloader, you don't have any choice as to what kernel command line parameters are added. Side note: unless you've got a good reason, don't disable selinux. Just set it to permissive in /etc/sysconfig/selinux, if you must. Even that's a bad idea. –  jsbillings Aug 3 '12 at 15:15
    
If you're missing an /etc/sysconfig/selinux, it's part of the selinux-policy package in RHEL5/CentOS5. –  jsbillings Aug 3 '12 at 15:41
    
just trying to disable it to debug, then re-enable. Any thoughts on disabling that the proper way? Seems like if I use setenforce then it creates that /etc/sysconfig/selinux file - maybe I should delete it when I'm finished? –  cwd Aug 3 '12 at 15:49
    
The /etc/sysconfig/selinux file should remain, it's part of the selinux policy. Setting selinux to permissive is actually a good thing to have if you are debugging, because while it allows everything, you've now got a good audit history of what selinux would have disallowed. –  jsbillings Aug 3 '12 at 15:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.