All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dryden Personalis <list@xenhideout.nl>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Install to LVM PVs
Date: Mon, 09 May 2016 18:10:05 +0200	[thread overview]
Message-ID: <74e43e3a3555eec41667a2c3e326c8af@dds.nl> (raw)
In-Reply-To: <57302925.2000000@gmail.com>

Currently:

- still searches in first sector for label, and reports error if found 
there
- get_pvh split into regular and one with 2 extra parameters for 
first_sector detection
- some documentation
- VG is not required to install
- does not even check for VG, but function is retained
- is lvm returns true iff header is found
- currently still skips filesystem check for lvm.

- untested installing on partitions
- note: LVM does not support first sector PVs
- we could also skip checking the first sector (my beautiful code)
- in that case split get_pvh is (currently) not needed, but you would 
also not warn people about the bootsector. The header would just not be 
found.

So in principle the solution becomes really simple (not requiring VG).

You can however corrupt the thing by first installing a 
bootloaderareasize PV, then a regular one on top of that, and the code 
will mistakenly believe there is room.

But this is all I can do without diving into the mechanics currently.

This is the function I thought Andrei wanted:

int grub_util_has_lvm_vg (grub_disk_t disk)
{
   struct grub_diskfilter_pv *pv = NULL;
   struct grub_diskfilter_vg *vg = NULL;

   pv = grub_diskfilter_get_pv_from_disk(disk, &vg);
   return pv && vg && vg == vg->driver->detect(disk, &pv->id, 
&pv->start_sector)
     ? 1 : 0;
}

If you are okay, I will attach the patch, but I also did some cleanup in 
lvm.c particularly (removing extraneous \n for instance messing up info 
messages) but I need to separate that with Git.

If you still feel VG should be required, let me know.

But also whether filesystem check (without -s) should be required when 
none can ever be found (at least not in our case here).

I have reverted to that of the patch (or similar):

if (fs_probe)
   {
     if (!is_lvm && !fs && !ctx.dest_partmap)
       grub_util_error (_("unable to identify a filesystem in %s; safety 
check can't be performed"), dest_dev->disk->name);


  parent reply	other threads:[~2016-05-09 16:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08  4:53 [PATCH] Install to LVM PVs Dryden Personalis
2016-05-08  6:05 ` Andrei Borzenkov
2016-05-08  8:47   ` Andrei Borzenkov
2016-05-08 13:10     ` Dryden Personalis
2016-05-08 17:16     ` Dryden Personalis
2016-05-08 17:40       ` Dryden Personalis
2016-05-08 13:01   ` Dryden Personalis
2016-05-09  6:07     ` Andrei Borzenkov
2016-05-09  8:41       ` Dryden Personalis
2016-05-09 16:10       ` Dryden Personalis [this message]
2016-05-09 16:18         ` Dryden Personalis
2016-05-09 17:56           ` Dryden Personalis
2016-05-17 18:01       ` Dryden Personalis
2016-05-08  9:23 ` Andrei Borzenkov
2016-05-08 13:09   ` Dryden Personalis
2016-05-09  0:10   ` Xen
2016-05-09  0:10     ` Dryden Personalis
  -- strict thread matches above, loose matches on Subject: below --
2013-09-25 12:39 Gabriel de Perthuis
2013-09-26  8:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-27 10:39   ` Gabriel de Perthuis
2013-09-27 10:39     ` Gabriel de Perthuis
2013-09-27 12:48     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-27 13:56       ` Gabriel de Perthuis
2013-09-27 13:56         ` Gabriel de Perthuis
2013-09-27 14:27       ` Andrey Borzenkov
2015-02-15 10:47       ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74e43e3a3555eec41667a2c3e326c8af@dds.nl \
    --to=list@xenhideout.nl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.