[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#516347: debian-installer: guided-with-lvm no longer allows multiple primary partition



> Yup, this is biting me too... Sorry for the long stream-of-conscious 
> report here, but I wrote as I worked through this issue and it shows. ;) 
> I don't know what someone may find important or not.
> 
> It's an odd bug though. When I create a small /boot partition as the 
> first item in the recipe, it rolls right along.
> [.....] 
> 
> part_start = 19535040
> part_end   = 117212774 <--- more sectors than the disk has
> 
> The formula used in parted_server.c for calculating the part_end value is:
> 
> 1824: part_start = range_start / PED_SECTOR_SIZE_DEFAULT;
> 1825: part_end = (range_start + length) / PED_SECTOR_SIZE_DEFAULT;
> 
> So if there is a bounds check just after this code to keep the part_end 
> value at less than the range_end it should work (see attached patch).
> 
> I'll dig some more in the partman-auto-lvm package and see if the 
> calculations are borked there. Based upon the other bug reports claiming 
> this is not an lvm specific issue, I bet the size/offset calculations 
> are being done in some shared resource.
> 
> Does anyone know how to force the debian installer to use an unsigned 
> udeb source? I have a local debian mirror for netboot installs, but 
> since deb started using signed installer packages I've found it 
> difficult to replace or override the default installer udebs.
> 
> Tony
> 
> [parted_server.c.diff (text/plain, inline)]
> 
> --- parted_server.c.orig        2009-06-17 17:08:04.000000000 +0000
> +++ parted_server.c     2009-06-17 16:34:12.000000000 +0000
> @@ -1823,6 +1823,10 @@
>          } else if (!strcasecmp(position, "beginning")) {
>                  part_start = range_start / PED_SECTOR_SIZE_DEFAULT;
>                  part_end = (range_start + length) / PED_SECTOR_SIZE_DEFAULT;
> +                // Truncate the partition end to fit the maximum disk size
> +                if ( part_end > ( range_end / PED_SECTOR_SIZE_DEFAULT ) ) {
> +                  part_end = ( range_end / PED_SECTOR_SIZE_DEFAULT );
> +                }
>          } else if (!strcasecmp(position, "end")) {
>                  part_start = (range_end - length) / PED_SECTOR_SIZE_DEFAULT;
>                  part_end = ((range_end - PED_SECTOR_SIZE_DEFAULT + 1)

Greetings all.

I've hit this bug also.

I've also tried the patch from Anthony to no avail.

I've been trying to make a recipe for a PowerPC based IBM Machine.
keeping "/" from entering the LVM, because Debian (and other distros
too) have major bugs when "/" it's inside it (in this architecture). So
there's no point on making only a "/boot" partition that stays out of it.

I've made it work at last making these changes in
lib/partman/lib/auto-lvm.sh: (partman-auto-lvm UDEB)

17c17
      echo "$scheme${NL}100 1000 -1 ext3 \$primary{ } method{ $method }"
---
      echo "$scheme${NL}100 1000 -1 ext3 method{ $method }"


As we know, device mapper doesn't care if it's physical volume it's on a
primary or a logical partition. He is there only to activate it(/them).

I've also included in this test installation (made a couple of them,
successfully) a partman-base modified UDEB with anthony's patch (but, as
stated earlier, it's not making difference)

Thanks to anthony for keeping alive this bug, and for the proposed
patch, else i couldn't have solved it.

The recipe im using is below.

d-i partman-auto/expert_recipe string                         \
      boot-root ::                                            \
              8 1 1 prep                                      \
                      $primary{ }                             \
                      $bootable{ }                            \
                      method{ prep }                          \
              .                                               \
              8192 10000 8192 ext3                            \
                      $primary{ }                             \
                      method{ format } format{ }              \
                      use_filesystem{ } filesystem{ ext3 }    \
                      mountpoint{ / }                         \
              .                                               \
              64 512 300% linux-swap                          \
                      $lvmok{ }                               \
                      method{ swap } format{ }                \
              .                                               \
              500 10000 -1 ext3                               \
                      $lvmok{ }                               \
                      $defaultignore{ }                       \
                      method{ format } format{ }              \
		      use_filesystem{ } filesystem{ ext3 }    \
                      mountpoint{ /srv }                      \
              .


Again. Thanks, and have a nice day.

-- 
--------------------------------
Julio C. Ortega
Equipo de Infraestructura
ONUVA | Integración de Sistemas

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: