Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible to load the kernel and the initramfs from an LVM partition? I am doing some tests and i have setup my CentOS full with LVMs, appart from the /boot partition. In other words
Is there any reason you're not using the normal /boot for kernels?
Regardless, should be able to load those kernels from where you want them. Just use the appropriate parameters (initrd, etc.). Make sure you have root set appropriately so that GRUB will know where to find the other filesystems.
Possibly yes, grub2 has a lvm module. But as far as I know grub itself needs an ext2/3 partition to store its own stuff, like before mentioned lvm.mod.
So you still need a small /boot partition.
The question is then, why go through a lot of trouble to put the kernel on the lvm when there is a useful partition already.
Possibly yes, grub2 has a lvm module. But as far as I know grub itself needs an ext2/3 partition to store its own stuff, like before mentioned lvm.mod.
I believe this used to be the case, but is no longer true.
BTW, the OP did not post what version of GRUB. If this is GRUB Legacy (a.k.a. GRUB 1, a.k.a. GRUB 0.9.x), then no GRUB can not load a kernel from an LVM volume. I unfortunately made the assumption as well that s/he did in fact mean GRUB 2.
If it is in fact GRUB 2, see below, it may give you a start.
Each distrubtion has different methods for modifying the GRUB configuration. The Fedora GRUB2 wiki (https://fedoraproject.org/wiki/GRUB_2) may give you help, I couldn't find anything specific to GRUB 2 and CentOS.
Is there any reason you're not using the normal /boot for kernels?
Regardless, should be able to load those kernels from where you want them. Just use the appropriate parameters (initrd, etc.). Make sure you have root set appropriately so that GRUB will know where to find the other filesystems.
I use normal boot for kernels but i am just learning about grub and how it operates. So there is this excerises that shows you have you can instruct grub to load initramfs and kernel from places other than root.
I did create another stabdard partition and completed the excerise but i was just curious how could you possibly load them from an lvm.
For instance, when i made the partition /dev/sdb2 i changed my brub config from
See my post above yours, I had posted at the same time. What version of GRUB are we talking about, 1 or 2? With GRUB 1 it is *not* possible to load a kernel image from LVM, with GRUB 2 it is.
See my post above yours, I had posted at the same time. What version of GRUB are we talking about, 1 or 2? With GRUB 1 it is *not* possible to load a kernel image from LVM, with GRUB 2 it is.
Hi Goumba
Yes i use Grub2 . Thnaks for the information.
I am not planning to use any lvm partiotionas as boot and my question was pure quriocity.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.