[Eisfair] Problem mit dem aktuellen Installer

Thomas Bork tom at eisfair.org
So Dez 1 16:11:44 CET 2019


Am 30.11.2019 um 16:29 schrieb Stefan Puschek:

> eisfair-2.8.21-3.48.0-SMP-cd-image.iso

Ok, der gemeinte Installer.

> Früher hatte die erste Partition (für /boot) das boot-flag gesetzt, dies 
> wurde vom fdisk auch angezeigt.
> Heute (mit GPT) hat die erste Partition kein boot-flag mehr.

Bist Du sicher?
Wenn ich mir auf dem ISO in opt.tgz die Datei setup.part ansehe, dann 
finde ich dort:

#----------------------------------------------------------------------------
# prepare boot partition with 48 MB
#----------------------------------------------------------------------------
if [ "$boot" != "" ]
then
     boot_idx=1 
# e.g. hda1, set 'legacy BIOS bootable' with -A ${boot_idx}:set:2

     if [ -n "${_raid_level}" ]
     then
         echo "    Boot /dev/md$boot_idx   $bootsize MB" 
# boot geht in kompletter groesse auf alle Platten
     else
         if [ $cpqscsi_found = true ]
         then
             echo "    Boot /dev/${disk}p$boot_idx   $bootsize MB"
         else
             echo "    Boot /dev/$disk$boot_idx   $bootsize MB"
         fi
     fi

     sgdisk_boot="sgdisk --new=0:0:+${bootsize}M -t ${boot_idx}:8300 -c 
${boot_idx}:boot -A ${boot_idx}:set:2 /dev/$disk"
else
     bootsize=0
     boot_idx=0 
# no extra boot partition
fi


Hier wird explizit sgdisk mit "-A ${boot_idx}:set:2" ausgeführt. Wenn 
keine /boot-Partition verwendet wird, wird die /root-Partition als 
bootbar gekennzeichnet, die dann gleichzeitig die /boot-Partition ist:

#----------------------------------------------------------------------------
# prepare root partition
#----------------------------------------------------------------------------
if [ $boot_idx = 0 ]                                                   # 
no boot partition, set 'legacy BIOS bootable' with -A ${root_idx}:set:2
then
     if [ -n "${_raid_level}" ]
     then
         echo "    Root /dev/md$root_idx   Complete disk"
     else
         if [ $cpqscsi_found = true ]
         then
             echo "    Root /dev/${disk}p$root_idx   Complete disk"
         else
             echo "    Root /dev/$disk$root_idx   Complete disk"
         fi
     fi

     sgdisk_root="sgdisk --new=0:0:-10M -t ${root_idx}:8300 -c 
${root_idx}:root -A ${root_idx}:set:2 /dev/$disk"
else
     if [ $rootsize -gt 0 ] 
# not the rest
     then
         if [ -n "${_raid_level}" ]
         then
             if [ "${_raid_n_disk}" -gt "2" ]
             then
                 echo "    Root /dev/md$root_idx   $rootsize_raid5 MB" 
# angezeigte groesse (nicht berechnete groesse pro platte)
             else
                 echo "    Root /dev/md$root_idx   $rootsize MB" 
# bei spiegelung auf beiden platten identisch
             fi
         else
             if [ $cpqscsi_found = true ]
             then
                 echo "    Root /dev/${disk}p$root_idx   $rootsize MB"
             else
                 echo "    Root /dev/$disk$root_idx   $rootsize MB"
             fi
         fi

         sgdisk_root="sgdisk --new=0:0:+${rootsize}M -t ${root_idx}:8300 
-c ${root_idx}:root /dev/$disk"
     else
         if [ -n "${_raid_level}" ]
         then
             echo "    Root /dev/md$root_idx   Rest"
         else
             if [ $cpqscsi_found = true ]
             then
                 echo "    Root /dev/${disk}p$root_idx   Rest"
             else
                 echo "    Root /dev/$disk$root_idx   Rest"
             fi
         fi

         sgdisk_root="sgdisk --new=0:0:-10M -t ${root_idx}:8300 -c 
${root_idx}:root /dev/$disk"
     fi
fi


Aus der manpage zu sgdisk:

-A, 
--attributes=list|[partnum:show|or|nand|xor|=|set|clear|toggle|get[:bitnum|hexbitmask]]
     View or set partition attributes. Use list to see defined (known) 
attribute values. Omit the partition number (and even the device 
filename) when using this option. The others require a partition number. 
The show and get options show the current attribute settings (all 
attributes or for a particular bit, respectively). The or, nand, xor, =, 
set, clear, and toggle options enable you to change the attribute bit 
value. The set, clear, toggle, and get options work on a bit number; the 
others work on a hexadecimal bit mask. For example, type sgdisk -A 
4:set:2 /dev/sdc to set the bit 2 attribute (legacy BIOS bootable) on 
partition 4 on /dev/sdc.

Und wenn ich mir die erste Partition bezüglich der Attribute näher 
ansehe, dann sehe ich auch, dass das Flag gesetzt ist:

referencetest # sgdisk /dev/sda --attributes=1:show
1:2:1 (legacy BIOS bootable)

-- 
der tom
[eisfair-team]


Mehr Informationen über die Mailingliste Eisfair