Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 41

Thread: Failure installing OS 12.2 when grub2 is installed

  1. #31
    Join Date
    Sep 2012
    Posts
    5,279

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by arvidjaar View Post
    I try to whip up some tool to walk through this chain.
    Could you test this crude script with your partitions? Here is what I get:
    Code:
    bor@opensuse:~> sudo walkparts.sh /dev/sda
    Extended partition 2, type 0x05, start at 1044225, size 487347840
    Logical partition 5 (grub 5), type 0x82, start at 1044288, size 8385867
    Glue partition (grub 6), type 0x05, start at 9430155, size 62910540
    Logical partition 6 (grub 7), type 0x83, start at 9430218, size 62910477
    Glue partition (grub 8), type 0x05, start at 72340695, size 125837145
    Logical partition 7 (grub 9), type 0x83, start at 72340758, size 125837082
    Glue partition (grub 10), type 0x05, start at 198177840, size 290214225
    Logical partition 8 (grub 11), type 0x8e, start at 198177903, size 290214162
    
    and corresponding fdisk output:
    bor@opensuse:~> sudo /sbin/fdisk -l /dev/sda
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, всего 488397168 секторов
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x70000000
    
    Устр-во Загр     Начало       Конец       Блоки   Id  Система
    /dev/sda1   *          63     1044224      522081   83  Linux
    /dev/sda2         1044225   488392064   243673920    5  Расширенный
    /dev/sda5         1044288     9430154     4192933+  82  Linux своп / Solaris
    /dev/sda6         9430218    72340694    31455238+  83  Linux
    /dev/sda7        72340758   198177839    62918541   83  Linux
    /dev/sda8       198177903   488392064   145107081   8e  Linux LVM
    And script itself (why it is not possible to attach anything?)
    Code:
    #!/bin/sh
    
    dev="$1"
    epstart=0
    pstart=0
    psize=0
    lin_partnum=5
    grub_partnum=5
    grub_glue_partnum=6
    
    
    function fail() {
        printf "%s\n" "$@" 1>&2
        exit 1
    }
    
    function walk_extended_partitions() {
        while true; do
            lptype=$(hexdump -v -s $[512*pstart+450] -n 1 -e '"%02x"' "$dev")
            lpstart=$(hexdump -v -s $[512*pstart+454] -n 4 -e '"%u"' "$dev")
            lpsize=$(hexdump -v -s $[512*pstart+458] -n 4 -e '"%u"' "$dev")
            gptype=$(hexdump -v -s $[512*pstart+450+16] -n 1 -e '"%02x"' "$dev")
            gpstart=$(hexdump -v -s $[512*pstart+454+16] -n 4 -e '"%u"' "$dev")
            gpsize=$(hexdump -v -s $[512*pstart+458+16] -n 4 -e '"%u"' "$dev")
            printf "Logical partition %u (grub %u), type 0x%s, start at %u, size %u\n" \
                $lin_partnum \
                $grub_partnum \
                $lptype \
                $[pstart+lpstart] \
                $lpsize
    
            if [ "$gpsize" -gt 0 ]; then
                printf "Glue partition (grub %u), type 0x%s, start at %u, size %u\n" \
                    $grub_glue_partnum \
                    $gptype \
                    $[epstart+gpstart] \
                    $gpsize
                : $[pstart=epstart+gpstart]
                : $[lin_partnum++]
                : $[grub_partnum+=2]
                : $[grub_glue_partnum+=2]
            else
                exit 0
            fi
        done
    }
    
    [ -b "$dev" ] || fail "Not a block device"
    
    magic=$(hexdump -v -s 510 -n 2 -e '"%04x"' "$dev")
    [ "$magic" == aa55 ] || fail "Not a valid MBR: $magic"
    
    for i in 0 1 2 3; do
        ptype=$(hexdump -v -s $[450+i*16] -n 1 -e '"%02x"' "$dev")
        pstart=$(hexdump -v -s $[454+i*16] -n 4 -e '"%u"' "$dev")
        psize=$(hexdump -v -s $[458+i*16] -n 4 -e '"%u"' "$dev")
        if [ \( "$ptype" = 05 -o "$ptype" = 0f \) -a \
             -n "$pstart" -a -n "$psize" ]; then
            printf "Extended partition %s, type 0x%s, start at %u, size %u\n" $[i+1] $ptype \
            $pstart $psize
            epstart=$pstart
            walk_extended_partitions
        fi
    done
    
    printf "%s\n" "No extended partitions found"

  2. #32
    Join Date
    Sep 2012
    Posts
    5,279

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by please_try_again View Post
    Code:
    # grub2-probe --target=device /boot      
    /dev/sda9
    
    # grub2-probe --target=drive /boot
    (hd0,msdos13)
    Already fixed upstream

    Code:
           /* If this partition is a normal one, call the hook.  */
    -      if (! grub_msdos_partition_is_empty (e->type))
    +      if (! grub_msdos_partition_is_empty (e->type)
    +          && ! grub_msdos_partition_is_extended (e->type))
    I will submit openSUSE bug report.

  3. #33

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Code:
    # walkpart.sh  /dev/sda
    Extended partition 4, type 0x0f, start at 462061591, size 514706474
    Logical partition 5 (grub 5), type 0x82, start at 462061593, size 4192902
    Glue partition (grub 6), type 0x05, start at 466254495, size 52707280
    Logical partition 6 (grub 7), type 0x83, start at 466254558, size 52707217
    Glue partition (grub 8), type 0x05, start at 518963760, size 16782800
    Logical partition 7 (grub 9), type 0x83, start at 518963823, size 16782737
    Glue partition (grub 10), type 0x05, start at 535746560, size 33556480
    Logical partition 8 (grub 11), type 0x83, start at 535748608, size 33554432
    Glue partition (grub 12), type 0x05, start at 569303040, size 64489472
    Logical partition 9 (grub 13), type 0x83, start at 569305088, size 64487424
    Glue partition (grub 14), type 0x05, start at 633792512, size 16779264
    Logical partition 10 (grub 15), type 0x83, start at 633794560, size 16777216
    Glue partition (grub 16), type 0x05, start at 650571776, size 45361152
    Logical partition 11 (grub 17), type 0x83, start at 650573824, size 45359104
    Glue partition (grub 18), type 0x05, start at 695932928, size 8402944
    Logical partition 12 (grub 19), type 0x83, start at 695934976, size 8400896
    Glue partition (grub 20), type 0x05, start at 704337795, size 64487549
    Logical partition 13 (grub 21), type 0x83, start at 704337858, size 64487486
    Glue partition (grub 22), type 0x05, start at 768825344, size 14712832
    Logical partition 14 (grub 23), type 0x83, start at 768827392, size 14710784
    Glue partition (grub 24), type 0x05, start at 783538245, size 8659035
    Logical partition 15 (grub 25), type 0x83, start at 783538308, size 8658972
    Glue partition (grub 26), type 0x05, start at 792197280, size 184570785
    Logical partition 16 (grub 27), type 0x83, start at 792197343, size 184570722
    Code:
    lspart -P sda9
    DEVNAME                                             : /dev/sda9
    DEVPATH                                             : /devices/pci0000:00/0000:00:0e.0/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda9
    DEVTYPE                                             : partition
    ID_ATA                                              : 1
    ID_ATA_DOWNLOAD_MICROCODE                           : 1
    ID_ATA_FEATURE_SET_AAM                              : 1
    ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE                : 254
    ID_ATA_FEATURE_SET_AAM_ENABLED                      : 0
    ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE     : 128
    ID_ATA_FEATURE_SET_HPA                              : 1
    ID_ATA_FEATURE_SET_HPA_ENABLED                      : 1
    ID_ATA_FEATURE_SET_PM                               : 1
    ID_ATA_FEATURE_SET_PM_ENABLED                       : 1
    ID_ATA_FEATURE_SET_PUIS                             : 1
    ID_ATA_FEATURE_SET_PUIS_ENABLED                     : 0
    ID_ATA_FEATURE_SET_SECURITY                         : 1
    ID_ATA_FEATURE_SET_SECURITY_ENABLED                 : 0
    ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN : 88
    ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN          : 88
    ID_ATA_FEATURE_SET_SMART                            : 1
    ID_ATA_FEATURE_SET_SMART_ENABLED                    : 0
    ID_ATA_SATA                                         : 1
    ID_ATA_SATA_SIGNAL_RATE_GEN1                        : 1
    ID_ATA_SATA_SIGNAL_RATE_GEN2                        : 1
    ID_ATA_WRITE_CACHE                                  : 1
    ID_ATA_WRITE_CACHE_ENABLED                          : 1
    ID_BUS                                              : ata
    ID_FS_LABEL                                         : SUS_ROOT
    ID_FS_LABEL_ENC                                     : SUS_ROOT
    ID_FS_TYPE                                          : ext4
    ID_FS_USAGE                                         : filesystem
    ID_FS_UUID                                          : aa192116-690d-4420-af5f-544d1e58b46c
    ID_FS_UUID_ENC                                      : aa192116-690d-4420-af5f-544d1e58b46c
    ID_FS_VERSION                                       : 1.0
    ID_MODEL                                            : WDC_WD5000AAKS-00A7B0
    ID_MODEL_ENC                                        : WDC\x20WD5000AAKS-00A7B0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
    ID_PART_ENTRY_DISK                                  : 8:0
    ID_PART_ENTRY_NUMBER                                : 9
    ID_PART_ENTRY_OFFSET                                : 569305088
    ID_PART_ENTRY_SCHEME                                : dos
    ID_PART_ENTRY_SIZE                                  : 64487424
    ID_PART_ENTRY_TYPE                                  : 0x83
    ID_PART_TABLE_TYPE                                  : dos
    ID_PATH                                             : pci-0000:00:0e.0-scsi-0:0:0:0
    ID_PATH_TAG                                         : pci-0000_00_0e_0-scsi-0_0_0_0
    ID_REVISION                                         : 01.03B01
    ID_SCSI_COMPAT                                      : SATA_WDC_WD5000AAKS-_WD-WCASZ0099856
    ID_SERIAL                                           : WDC_WD5000AAKS-00A7B0_WD-WCASZ0099856
    ID_SERIAL_SHORT                                     : WD-WCASZ0099856
    ID_TYPE                                             : disk
    ID_WWN                                              : 0x50014ee20271b6bd
    ID_WWN_WITH_EXTENSION                               : 0x50014ee20271b6bd
    MAJOR                                               : 8
    MINOR                                               : 9
    SUBSYSTEM                                           : block
    TAGS                                                : :systemd:
    UDISKS_PARTITION                                    : 1
    UDISKS_PARTITION_ALIGNMENT_OFFSET                   : 0
    UDISKS_PARTITION_NUMBER                             : 9
    UDISKS_PARTITION_OFFSET                             : 291484205056
    UDISKS_PARTITION_SCHEME                             : mbr
    UDISKS_PARTITION_SIZE                               : 33017561088
    UDISKS_PARTITION_SLAVE                              : /sys/devices/pci0000:00/0000:00:0e.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
    UDISKS_PARTITION_TYPE                               : 0x83
    UDISKS_PRESENTATION_NOPOLICY                        : 0
    USEC_INITIALIZED                                    : 5384989
    Symlinks                                            : /dev/disk/by-id/ata-WDC_WD5000AAKS-00A7B0_WD-WCASZ0099856-part9
                                                        : /dev/disk/by-id/scsi-SATA_WDC_WD5000AAKS-_WD-WCASZ0099856-part9
                                                        : /dev/disk/by-id/wwn-0x50014ee20271b6bd-part9
                                                        : /dev/disk/by-label/SUS_ROOT
                                                        : /dev/disk/by-path/pci-0000:00:0e.0-scsi-0:0:0:0-part9
                                                        : /dev/disk/by-uuid/aa192116-690d-4420-af5f-544d1e58b46c
                                                        : /dev/root
    Code:
    # lspart -Un
    Dev  Boot Maj Min  Bsize/Start         Size    Fs    ID    Ver                                  Uuid   Model/Mount
    
    sda         8   0        512 B       465.76 GiB     mbr    ata                                     -   WDC_WD5000AAKS-00A7B0
    sda1        8   1           63       514017  vfat    06  FAT16                             46EB-E757 
    sda2        8   2     73947195    285282270  ufs1    a5      1                      4c1ebb2e8fdfd1e4 
    sda3        8   3    361398240    100663290  ufs1    a5      1                      4a849d06e775e28d 
    sda4    *   8   4    462061591    514706474     -    0f      -                                     - 
    sda5        8   5    462061593      4192902  swap    82      2  89874e59-5191-41fb-b010-970e14f0d8a2 
    sda6        8   6    466254558     52707217  ext4    83    1.0  821e7c2b-aeac-4a48-a131-6e141911b52d 
    sda7        8   7    518963823     16782737  ext4    83    1.0  978a9075-f97b-45f9-9d6d-107a21b712b1 
    sda8        8   8    535748608     33554432  ext3    83    1.0  c908a06a-b97c-4aa6-b829-a4f6823be367   /home
    sda9        8   9    569305088     64487424  ext4    83    1.0  aa192116-690d-4420-af5f-544d1e58b46c   /
    sda10       8  10    633794560     16777216  ext4    83    1.0  4e58426d-244a-497d-b523-b22d91b643d2   /usr/local
    sda11       8  11    650573824     45359104  ext4    83    1.0  d695818b-a79b-4c53-a539-81290bc68a67 
    sda12       8  12    695934976      8400896  ext4    83    1.0  98e31d64-63f3-4ae8-817b-1e7589d62908   /tmp
    sda13       8  13    704337858     64487486  ext4    83    1.0  01a7cb76-434b-4eeb-9fac-c8b5c8229835 
    sda14       8  14    768827392     14710784  ext4    83    1.0  a177d95f-9d7b-4a8d-89a0-27202cbc8c60 
    sda15       8  15    783538308      8658972  ext3    83    1.0  7d7cfb4b-ae82-4f6c-b9f1-ff531c912877 
    sda16     259   0    792197343    184570722  ext4    83    1.0  9b498d58-08dc-48ef-a349-b30c8b7715b5   /srv
    sda17     259   1     82335803    285282270     -    a5      -                                     - 
    sda18     259   2    149444667    134284651  ufs1    a5      1                      4acc090324ac775c 
    sda19     259   3    283729318     16777216  ufs1    a5      1                      4c1ebb302e0bac5d 
    sda20     259   4    300506534     16777216  ufs1    a5      1                      4acc091650732a9c 
    sda21     259   5     73947195      8388608  ufs1    a5      1                      4c1ebb2e8fdfd1e4 
    sda22     259   6    325672358     33557107  ufs1    a5      1                      4c1ebb36c4324af1 
    sda23     259   7    317283750      8388608  ufs1    a5      1                      4c1ebb3b41d65297 
    sda24     259   8    361398240            ?  ufs1    a5      1                      4a849d06e775e28d 
    sda25     259   9    369786848            ?  ufs1    a5      1                      4a849d138a6e0c07 
    sda26     259  10    378175456            ?  ufs1    a5      1                      4a849d0e56389218 
    sda27     259  11    411729885            ?  ufs1    a5      1                      4af57ab11bc8e970 
    sda28     259  12    420118493            ?  ufs1    a5      1                      4af57ab32eb44a7a 
    sda29     259  13    453672925            ?  ufs1    a5      1                      4af57ab83c92c74a 
    
    sdb         8  16        512 B       465.76 GiB     mbr    ata                                     -   WDC_WD5000AAKS-00TMA0
    sdb1        8  17           63       514017  vfat    06  FAT16                             476A-FA21 
    sdb2        8  18     18539010    534016665  ufs1    a5      1                      4773dd451d97f645 
    sdb3        8  19    554724450     79698465  ufs2    a5      2                      4cf5f01e3b3c5733 
    sdb4        8  20    634422976    342345089     -    0f      -                                     - 
    sdb5        8  21    634422978      4192902  swap    82      2  c224505c-6233-404f-a706-308138573fce 
    sdb6        8  22    638615943     42281032  ext3    83    1.0  d0f134b3-a468-4f72-95aa-cd09c498ba8c 
    sdb7        8  23    680899023     12578832  ext4    83    1.0  0e9cefcd-5e38-4ac7-8de8-749433ac9f59 
    sdb8        8  24    693477918     16803927  ext4    83    1.0  7ccc6cbb-89dd-4e5e-827e-4ae23d3f19b3 
    sdb9        8  25    710281908     33559722  ext3    83    1.0  bbc5c1b6-56f6-4af1-a482-0d3a674df9b5 
    sdb10       8  26    743841693      8385867  ext3    83    1.0  245f9ef8-3937-4baa-9748-4664bec34d67 
    sdb11       8  27    752227623      8385867  ext4    83    1.0  222c7f62-2a7f-41a1-aa39-95167768d853 
    sdb12       8  28    760613553    216154512  ext3    83    1.0  a556486d-f7fe-4161-8a97-6daff6b03a87   /misc
    sdb13       8  29     18539010    251658240  ufs1    a5      1                      4773dd451d97f645 
    sdb14       8  30    270197250    240412710  ufs1    a5      1                      496b164831d164a0 
    sdb15       8  31    510609960     12582912  ufs2    a5      2                      4cf5ff21b59da81a 
    sdb16     259  14    523192872     16777216  ufs1    a5      1                      4c200308d3b18ed5 
    sdb17     259  15    539970088      4194304  ufs1    a5      1                      4c20030fb9d386ff 
    sdb18     259  16    544164392      8391283  ufs2    a5      2                      4cf5ff2cb23acb98 
    sdb19     259  17    554724450            ?  ufs2    a5      2                      4cf5f01e3b3c5733 
    sdb20     259  18    630221919            ?     -    a5      -                                     - 
    sdb21     259  19    563113058            ?  ufs2    a5      2                      4cf5f02034b778cc 
    sdb22     259  20    571501666            ?  ufs2    a5      2                      4cf5f01faddc43e8 
    sdb23     259  21    605056095            ?  ufs1    a5      1                      4bc2b81325d896e5 
    sdb24     259  22    621833311            ?  ufs2    a5      2                      4bc2b816430be504 
    
    fd0         2   0          0 B         0.00 GiB       -      -                                     -
    Code:
    # fdisk -l /dev/sda
    
    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xb545b545
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63      514079      257008+   6  FAT16
    /dev/sda2        73947195   359229464   142641135   a5  FreeBSD
    /dev/sda3       361398240   462061529    50331645   a5  FreeBSD
    /dev/sda4   *   462061591   976768064   257353237    f  W95 Ext'd (LBA)
    /dev/sda5       462061593   466254494     2096451   82  Linux swap / Solaris
    /dev/sda6       466254558   518961774    26353608+  83  Linux
    /dev/sda7       518963823   535746559     8391368+  83  Linux
    /dev/sda8       535748608   569303039    16777216   83  Linux
    /dev/sda9       569305088   633792511    32243712   83  Linux
    /dev/sda10      633794560   650571775     8388608   83  Linux
    /dev/sda11      650573824   695932927    22679552   83  Linux
    /dev/sda12      695934976   704335871     4200448   83  Linux
    /dev/sda13      704337858   768825343    32243743   83  Linux
    /dev/sda14      768827392   783538175     7355392   83  Linux
    /dev/sda15      783538308   792197279     4329486   83  Linux
    /dev/sda16      792197343   976768064    92285361   83  Linux

  4. #34

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by arvidjaar View Post
    Already fixed upstream

    Code:
           /* If this partition is a normal one, call the hook.  */
    -      if (! grub_msdos_partition_is_empty (e->type))
    +      if (! grub_msdos_partition_is_empty (e->type)
    +          && ! grub_msdos_partition_is_extended (e->type))
    I will submit openSUSE bug report.
    Which file is that?

  5. #35
    Join Date
    Sep 2012
    Posts
    5,279

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by please_try_again View Post
    Which file is that?
    grub-core/partmap/msdos.c

    https://bugzilla.novell.com/show_bug.cgi?id=785341

  6. #36

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by arvidjaar View Post
    Thank you so much for filing bug reports for me!

  7. #37

    Default Re: Failure installing OS 12.2 when grub2 is installed

    grub2-iterate-and-hook-for-extended-partition.patch introduced this bug. If I compile grub2 without this patch, grub2-probe output is correct:

    Code:
    agnelo@jadzia:~/rpmbuild/BUILDROOT/grub2-2.00-1.11.1.x86_64/usr/sbin> ./grub2-probe --target=device /boot
    /dev/sda9
    
    agnelo@jadzia:~/rpmbuild/BUILDROOT/grub2-2.00-1.11.1.x86_64/usr/sbin> sudo ./grub2-probe --target=drive /boot
    (hd0,msdos9)

  8. #38

    Default Re: Failure installing OS 12.2 when grub2 is installed

    For now I replaced /usr/sbin/grub2-probe with the one I compiled locally (I don't want to re-package grub2 for other reasons) and everything is fine it Grub menu now.

    @arvidjaar, maybe you could revert this patch in your grub2 build in OBS? People won't be able to install Grub2 in the extended partition ... but you're not supposed to do so anyway, or at least not with a hack that breaks other things (IMO).

  9. #39
    Join Date
    Sep 2012
    Posts
    5,279

    Default Re: Failure installing OS 12.2 when grub2 is installed

    While is nice to find and hopefully fix yet another bug, it is still not clear whether it has anything to do with TS problem ...

  10. #40

    Default Re: Failure installing OS 12.2 when grub2 is installed

    Quote Originally Posted by arvidjaar View Post
    While is nice to find and hopefully fix yet another bug, it is still not clear whether it has anything to do with TS problem ...
    I do not know if grub2 was my problem but I was finally successful upgrading to Suse 12.2 from 11.4. The installation found my 11.4 root partition, it figured out that I had previously grub in my 11.4 boot partition and not in my MBR, and successfully upgraded me from 11.4 to 12.2. The only probelm I encountered was in the new grub menu entries for 12.2. There it added entries for the vmlinuz files as if they were in my MBR instead of my /boot partition ( hd0 instead of the correct hd0,4 ). But it was easy enough editing the entry upon booting to be correct, booting into 12.2 and then manually changing the entries to be correct. Notice that I am booting using grub ( and not grub2 ) in 12.2 as I did in 11.4. The 12.2 upgrade did install grub2 just in case I wanted to use it, but evidently did not hang up on me when doing so.

    Thaniks to everyone for their help. It is disconcerting that Suse added grub2 to their 12.n product, but produced such problems using it in the installation. Nonetheless Suse has always been very solid for me just using it, so I am very glad I was able to upgrade successfully after so much initial trouble.

Page 4 of 5 FirstFirst ... 2345 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •