[clue] revisiting boot partition and LVM + grub

mike havlicek mhavlicek1 at yahoo.com
Mon Mar 12 10:37:45 MDT 2012


 

________________________________
 From: Will <will.sterling at gmail.com>
To: CLUE's mailing list <clue at cluedenver.org> 
Sent: Tuesday, February 21, 2012 4:38 PM
Subject: Re: [clue] revisiting boot partition and LVM + grub
  

Fedora switched from Grub Legacy to Grub 2 in Fedora 16.  There should be nothing holding back a fresh install from not having /boot on the same logical volume as /.


As to the why..
Grub Legacy relied on loading a file system, /boot, to continue chain loading an OS and it only had support for a few file systems built in.  Grub 2 gets around this by loading the first block of a stage 1.5 image directly from a block address on disk.  That image then has the drivers to load LVM, MD RAID, etc. and continue up the chain.


On Tue, Feb 21, 2012 at 4:20 PM, Aaron D. Johnson <adj at fnord.greeley.co.us> wrote:

mike havlicek writes:
>> I always put /boot on a dedicated "traditional" partition but have
>> been thinking about LVM and seem to recall somewhere sometime ago it
>> being suggested that /boot could be on a logical volume. It seems
>> that it was more a grub issue...???
>>
>> Any pointers to why /boot can or can't be on a logical volume. IE
>> possibility/impossibility of building a system that can boot from a
>> single disk with only "8e" partition type?
>
>
>You don't mention what distro you're running, but there's an article
>with some promising information to be found at
>http://jim.studt.net/depository/index.php/debian-lenny-and-grub-with-boot-in-lvm
>
>I can't say if there are any distro installers that support it at this
>point.  I don't recall it being an option with Fedora 15, and it's
>definitely not something the Debian 6.0 installer can handle.
>
>[I had a big bunch of text in here describing my setup, but it's not
>really relevant (/boot is in an MD RAID1 mirror, not on a logical
>volume, and there are _no_ type 8e "partitions" (GPT, baby!).]
>
>Let us know how it goes.
>
>- Aaron
>
>===================================================================================================
>
>Thanks for the info on grub2... And its presence on fedora16. 
>So far have experimented with VMs (VMware ESX4i) with Fedora16 and CentOS 6.2. Did a USB stick with the Fedora16
>Live Security SPIN. Disk/Stick setup was pretty unpleasant ... probably since it was my first run.. 
>Otherwise Fedora16 was fairly straight forward as the installation media had grub2 as Will pointed out. I did put /boot
>on its own logical volume requiring typing in the mount point since /boot was not a menu item within the lvm setup in the 
>Graphical "manual" disk setup option. Don't really like doing things that way anyway. Trying to get the sizes the way I "think"
>I like them  is "easier" from a shell.....8^)
>
> 
>Eventually grub2+lvm-boot to work from a CentOS 6.2 minimal install starting point using some partitioning + backup/restore acrobatics.
>I chose to get the grub source from ftp.fsf.org as I didn't see it available in a "yum search" out of the box............ This was
>actually a fun exercise where I did a "grub-mkrescue" to get a grub iso => CD. I found it to be a nice way to get familiar with
>differences in "grub>" commands.  BTW "grub> insmod lvm" turned out to be a pretty good thing to do in my little experiment 8^).
>This leads me to a question of defeating my purpose (separate /boot disk area within lvm so as to be able to resize when an update involving the kernel is possibly going to go over available space and I am not yet sure what backup kernel(s) I am ready to remove) 
>.... Not really I think ... But I imagine that blindly running an update that includes the kernel and subsequent grub run will mess things up...... 
> How to fine tune the yum... 
> 
>Don't yet know what to say about Debian except  6.04 seems to uses grub2 during the install...(my resulting system has /boot on lvm)... .
> As a VM trying to install VMware tools got goofy surrounding gcc in particular ... 
>Took a rabbit hole down to open pandora's box ==>(I wonder if I should try a newer ESX)...........
> 
>I think the Ubuntu 8.04 LTS USB stick should work which is what I intend to modify, but I still kinda wonder about the update
>issues surrounding the kernel once the grub version is changed...... (Maybe its moot beyond LTS) If not again analog apt system 
>fine tuning I suppose ??
> 
>Oh, I have also found various fdisk representations e.g. starting block and DOS compatibility mode between versions available on
>installation media and my favorite systemrescueCD to be a bit confusing particularly when choosing the start so as to install the
>grub on a HDD. I think I remember choosing 3 rather than 1 or 2 for a starting block (or was it in a different unit to have those values :)
>the first go around on whichever VM install I was doing ... Pretty useful account.... I would have to check my notes to be accurate. But the point is that getting the starting position for the 1st LVM partition while reserving space for the grub install was an issue... I think
>it would be useful for me to know how much "space" is required for the bootstrapping tools and how to allocate that efficiently... 
> 
>Another rabbit hole ??
> 
> 
>-Mike  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20120312/a7a95ef7/attachment-0001.html 


More information about the clue mailing list