openSUSE 12.2 with GRUB2 with entire root partition in LVM

October 29th, 2012

It took me a long evening to figure it out how to do it, but it is possible to install an openSUSE 12.2 with GRUB2 on a disk with GTP partition table and have the entire root partition within LVM (and in my case even have the LVM in a MD RAID). The current openSUSE installer (partitioning and bootloader) does not fully support this use case, but they will however install it correctly even though the warning messages shown might be misleading.

These are my partitions (adapt them to your use case):

  • sda (GPT partition table: gpt_sync_mbr)
    1. 7.84 MB primary, flags: bios_grub (do not format or mount)
    2. 8 GB primary, flags: raid (raid1, md0), swap
    3. ? GB primary, flags: raid (raid1, md1), LVM
  • sdb (same as sda)
    • Note: the first partition of both disks is not part of any raid. The sda1 partition has to be synced manually once after installation to its pendant on sdb.

The first partition has to be unformatted and unmounted and have the flag bios_grub set. This can be done with parted by running (for both disks):

(parted) toggle 1 bios_grub on
(parted) select /dev/sdb
(parted) toggle 1 bios_grub on

This will allow GRUB2 to find space to install its core.img to.

There is more than one way to do this kind of installation. But with YaST you can not (yet) create set the bios_grub flag during installation. Here are two ways which should work pretty nicely (I took the latter):

  1. Prepare the partition setup before booting the installation media. Make sure to have all partitions setup correctly (including the flags you need). There is no need to create the RAID and LVM beforehand – of course you could, but this is something where YaST has a pretty nice and intuitive graphical UI for. During the installation also make sure that YaST uses the existing partition setup. The default is to propose an own partition setup.
  2. Start the installation with the plain and empty disks. Do the partitioning via YaST (make sure to use a GTP partition table; see the export button within the YaST partitioner). Let the system do the installation and ignore the warnings that are shown. While the installation process is installing the packages do this:
    1. Press Ctrl+Alt+Shift+X to open an xterm
    2. In the xterm run parted and set the flags for the first partitions of each disk
    3. If you finish this before YaST installs the bootloader everything work smoothly
      If you do not manage to do this before the YaST installs the bootloader it will popup an error message with warnings that your setup is totally unsupported and will not be able to boot. Just ignore the warning, but to not yet press the OK button. Continue to toggle the flags in the xterm and close parted. When done, press the OK button of the warning message and YaST will try again to install the bootloader and now will succeed without any error message.

The bootloader will only be installed on /dev/sda by default. So after the first boot sync the content of the first partition of sda to the first one on sdb (e.g. using dd).

openSUSE 12.2 has been released

September 5th, 2012

openSUSE 12.2 brings deep innovations developed by different community projects to everyday GNU/Linux users. Check the 12.2 Release Highlights for further details.

openSUSE News: Green Means Go

download openSUSE 12.2

Got Engaged

January 19th, 2011

We got engaged.

2011 is about to become an interesting year for us.

Frustration-Free Packaging #2 – Yes we can

December 16th, 2010

I gave the Amazon Frustration-Free Packaging a 2nd try when I ordered a memory card. When it arrived I thought: yes, this is frustration-free packaging – ok the ratio between packaging and article resembles the last Amazon package, but this time the latter is minimized.

This is Frustration Free Packaging

This is Frustration Free Packaging

Amazon Frustration-Free-Free Packaging

December 1st, 2010

Two days ago I ordered two HDMI cables (2m) at Amazon. The explanation on frustration-free packaging sounded quite well. Today the package from Amazon arrived in my office and I wondered about what I may have done wrong as the package was so huge. The picture speaks for itself:

Amazon Frustration-Free-Free Packaging

Amazon Frustration-Free-Free Packaging

Most of the sending is waste – ok, at least its only paper and no plastic. But the overall packaging to send these two cables is big enough to carry one big or two small notebooks.