Wednesday, 25 December 2019

SLES 12 /boot on LVM

This post is a follow up to my previous post SLES 15 /boot on LVM. If you haven't read that post before go read before you continue. 

If you are trying the same trick in SLES 12, you will realize that you are not allowed to mount any logical volume into /boot


But this is just an installer limitation, we can still put /boot into LVM just that we have few more steps to do. For now, just put the boot logical volume into /newboot. Your logical volume should look like the following. 




Proceed with the installation and after the installation is completed, make sure you can boot into your SLES 12. 

Once you it boots up, move /boot into /newboot 

# mv /boot/* /newboot
# umount /newboot

Update your /etc/fstab to mount /dev/system/boot into /boot 



Now you can mount your LVM based /boot partition
# mount -a

Reinstall grub and update grub config

# grub2-install  /dev/sda
# grub2-mkconfig  -o  /boot/grub2/grub.cfg

Reboot the system and now you will have SLES 12 /boot on LVM 


Happy Holiday and as usual cheers!!!




Tuesday, 24 December 2019

SLES 15 LVM + XFS Without Separate /boot Partition

GRUB2 allow booting from LVM partition, however I haven't see any documentation on how to setup SLES 15 using LVM + XFS root partition without separate /boot partition. You can even put /boot as one of the logical volume.

When separate /boot partition is not created, we will need to create small partition with BIOS boot flag and once this BIOS boot partition is created, you can setup the remaining disk as LVM partition and setup your volume group and logical volumes as usual.   

During the installation, choose "Expert Partitioner" > "Start with Existing Partitions".


Select your disk and "Create New Partition Table" > "GPT"


Select "Partitions" tab and choose "Add Partition"


Choose "Custom Size" then enter "8 MiB" as the size. The Role of this partition should be "Raw Volume (unformatted)"

Select BIOS Boot as Partition ID


Create another partition as LVM partition and setup your LVM as usual. In this tutorial I am creating "system" VG with "boot", "root", and "swap" LV.


Proceed with the installation as usual. Once the installation complete, you should have SLES 15 with all mount points inside LVM + XFS. 



That's all for today notes. Have fun trying!!!

Cheers