Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Dryden Personalis
Attached my current working patch. Also attached some housekeeping. Not sure if it applies to current git version. Take from it what you like.diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c index 22c7b64..37e715a 100644 --- a/grub-core/disk/lvm.c +++ b/grub-core/disk/lvm.c @@ -95,6

Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Dryden Personalis
Dryden Personalis schreef op 09-05-2016 18:10: 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); In

Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Dryden Personalis
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

Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Xen
Andrei Borzenkov schreef op 08-05-2016 11:23: PV label may be in the first sector. In this case label will be overwritten later by boot image. This needs additional check. Pardon my last mail. ON OLD PV SIGNATURES If you have an old PV that had a boatloaderarea, then

Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Dryden Personalis
Andrei Borzenkov schreef op 09-05-2016 8:07: No, I do not want to change it at all. It should remain as is and always probe for FS so that test below actually works But its output makes no sense, there cannot be a filesystem in a PV. It could check for existence of VG AND LV AND filesystem

Re: [PATCH] Install to LVM PVs

2016-05-09 Thread Andrei Borzenkov
08.05.2016 16:01, Dryden Personalis пишет: > >>> -if (fs_probe) >>> +if (!is_lvm && fs_probe) >> >> No, we want to probe for FS here to eliminate corner case of both PV and >> FS metadata. > > You mean you want to change it to: > No, I do not want to change it at all. It should remain

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Andrei Borzenkov schreef op 08-05-2016 11:23: PV label may be in the first sector. In this case label will be overwritten later by boot image. This needs additional check. Pardon my last mail. ON OLD PV SIGNATURES If you have an old PV that had a boatloaderarea, then

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Dryden Personalis schreef op 08-05-2016 19:16: I just wasted 2 hours trying to get GRUB_UTIL to work and failing. I am just not always that brilliant. Why on earth is that flag in there? If you enable it, stuff won't compile anymore. And I merely needed to turn on verbose output for

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Andrei Borzenkov schreef op 08-05-2016 10:47: 08.05.2016 09:05, Andrei Borzenkov пишет: +#ifdef GRUB_UTIL +int +grub_util_is_lvm(grub_disk_t disk) +{ + struct grub_diskfilter_pv_id id; + struct grub_diskfilter_vg *vg; + grub_disk_addr_t start_sector; + vg = grub_lvm_detect(disk, ,

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Andrei Borzenkov schreef op 08-05-2016 10:47: 08.05.2016 09:05, Andrei Borzenkov пишет: +#ifdef GRUB_UTIL +int +grub_util_is_lvm(grub_disk_t disk) +{ + struct grub_diskfilter_pv_id id; + struct grub_diskfilter_vg *vg; + grub_disk_addr_t start_sector; + vg = grub_lvm_detect(disk, ,

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Andrei Borzenkov schreef op 08-05-2016 11:23: 08.05.2016 07:53, Dryden Personalis пишет: +if (is_lvm) + err = grub_util_lvm_embed (dest_dev->disk, , maxsec, +GRUB_EMBED_PCBIOS, ); PV label may be in the first sector. In this case label will be

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Dryden Personalis
Andrei Borzenkov schreef op 08-05-2016 8:05: Did you actually test it by installing GRUB on PV? Does it boot? Did you test it both with unpartitioned disk and PV in partition? Hi Andrei, I must say I have for the most part just copied the patch as it was, and just tried to fix it so that

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Andrei Borzenkov
08.05.2016 07:53, Dryden Personalis пишет: > +if (is_lvm) > + err = grub_util_lvm_embed (dest_dev->disk, , maxsec, > +GRUB_EMBED_PCBIOS, ); PV label may be in the first sector. In this case label will be overwritten later by boot image. This needs

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Andrei Borzenkov
08.05.2016 09:05, Andrei Borzenkov пишет: >> >> +#ifdef GRUB_UTIL >> +int >> +grub_util_is_lvm(grub_disk_t disk) >> +{ >> + struct grub_diskfilter_pv_id id; >> + struct grub_diskfilter_vg *vg; >> + grub_disk_addr_t start_sector; >> + vg = grub_lvm_detect(disk, , _sector); >> + if (! vg) >>

Re: [PATCH] Install to LVM PVs

2016-05-08 Thread Andrei Borzenkov
08.05.2016 07:53, Dryden Personalis пишет: > I updated this guy's patch to work with 2.02 beta 2, at least. > > I've just worked on the version that gets downloaded and unpacked on > Kubuntu / Ubuntu 16.04. > > One part of the patch didn't apply because apparently some tabs have > entered a

[PATCH] Install to LVM PVs

2016-05-07 Thread Dryden Personalis
I updated this guy's patch to work with 2.02 beta 2, at least. I've just worked on the version that gets downloaded and unpacked on Kubuntu / Ubuntu 16.04. One part of the patch didn't apply because apparently some tabs have entered a file, namely grub-core/disk/lvm.c. Another part didn't

Re: [PATCH] Install to LVM PVs

2015-02-15 Thread Andrei Borzenkov
В Fri, 27 Sep 2013 14:48:33 +0200 Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com пишет: On 27.09.2013 12:39, Gabriel de Perthuis wrote: Le 26/09/2013 10:53, Vladimir 'φ-coder/phcoder' Serbinenko a écrit: On 25.09.2013 14:39, Gabriel de Perthuis wrote: Hello, This patch lets grub

Re: [PATCH] Install to LVM PVs

2013-09-27 Thread Gabriel de Perthuis
Le 26/09/2013 10:53, Vladimir 'φ-coder/phcoder' Serbinenko a écrit: On 25.09.2013 14:39, Gabriel de Perthuis wrote: Hello, This patch lets grub install to a reserved area in LVM physical volumes. These bootloader areas can be created with LVM 2.02.99 and the --bootloaderareasize argument to

Re: [PATCH] Install to LVM PVs

2013-09-27 Thread Gabriel de Perthuis
Le 27/09/2013 14:48, Vladimir 'φ-coder/phcoder' Serbinenko a écrit : On 27.09.2013 12:39, Gabriel de Perthuis wrote: Le 26/09/2013 10:53, Vladimir 'φ-coder/phcoder' Serbinenko a écrit: On 25.09.2013 14:39, Gabriel de Perthuis wrote: Hello, This patch lets grub install to a reserved area in

Re: [PATCH] Install to LVM PVs

2013-09-27 Thread Andrey Borzenkov
В Fri, 27 Sep 2013 14:48:33 +0200 Vladimir 'φ-coder/phcoder' Serbinenko phco...@gmail.com пишет: On 27.09.2013 12:39, Gabriel de Perthuis wrote: Le 26/09/2013 10:53, Vladimir 'φ-coder/phcoder' Serbinenko a écrit: On 25.09.2013 14:39, Gabriel de Perthuis wrote: Hello, This patch lets grub

Re: [PATCH] Install to LVM PVs

2013-09-26 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 25.09.2013 14:39, Gabriel de Perthuis wrote: Hello, This patch lets grub install to a reserved area in LVM physical volumes. These bootloader areas can be created with LVM 2.02.99 and the --bootloaderareasize argument to pvcreate and vgconvert. I tested it in QEMU, installing to and

[PATCH] Install to LVM PVs

2013-09-25 Thread Gabriel de Perthuis
Hello, This patch lets grub install to a reserved area in LVM physical volumes. These bootloader areas can be created with LVM 2.02.99 and the --bootloaderareasize argument to pvcreate and vgconvert. I tested it in QEMU, installing to and booting a disk that contains a PV and no partition table.