Linbo verrechnet sich - ein ulkiges Problem

Hallo, Leute,

wenn ich es nicht selbst ausprobiert hätte, würde ich es nicht glauben:

Folgendes Phänomen tritt bei mir auf, wenn ich über (U)EFI starte und dabei Windows und Ubuntu auf der Platte habe (reproduziert nachvollziehbar beim originalen /var/linbo/examples/start.conf.windows10-ubuntu-efi):

Zunächst mal „verrechnet“ sich linbo, wenn ich den Menüpunkt „Partitionierung“ auswähle, sobald ich im Linbo-Imaging angekommen bin.
Gewünscht ist:

  1. EFI 2. MSR 3. NTFS-windows 4. Ubuntu 5. Cache 6. Swap

Es legt brav an:

  1. EFI … 2. MSR… 3. dann den Swap (!), dann 4. NTFS-Windows, dann 5. Ubuntu, dann 6. den Cache

ich habe dann Schritt für Schritt erst drei Partitionen anlegen lassen (1-3) - ok, dann 1-4 - ok, dann, sobald der swap ins Spiel kommt, wird der wieder mitten reingeschoben.

Zum Spaß habe ich statt des Swap eine normale ext4-Partition anlegen lassen - alles ok !
Und jetzt kommts:
Wenn man statt des Labels „swap“ „swappy“ nimmt (oder auch irgend etwas anderes, z.B. „schlumpf“), wird der Swap (als Dateisystem-Swap, also korrekt !) als fünfte GPT-Partition angelegt (mit Fstype = swap und ID = 82 also).

Hammer, oder ? Man sollte also den swap nicht als swap labeln, dann ist alles gut …

Grüßle,
Christoph Gü

Zum Nachmachen:

Version, in der die Fehler passieren:

[LINBO]                             # global section
Server = 10.16.1.1                  # linbo server ip address
Group = icorenew
Cache = /dev/sda5                   # cache partition
RootTimeout = 600                   # logout from admin console after 600 secs
AutoPartition = no                  # no partition repair during LINBO startup
AutoFormat = no                     # no formatting of all partitions during LINBO startup
AutoInitCache = no                  # no initial cache setup during LINBO startup
DownloadType = torrent              # image download method (torrent|multicast|rsync)
BackgroundFontColor = white         # font color of status section (default: white)
ConsoleFontColorStdout = lightgreen # console font color (default: white)
ConsoleFontColorStderr = orange     # console error font color (default: red)
SystemType = efi64                  # possible values: bios|bios64|efi32|efi64 (default: bios)
# KernelOptions = quiet splash        # linbo kernel options, space separated
KernelOptions = nomodeset dhcpretry=18 
#KernelOptions = acpi=noirq irqpoll # linbo kernel options example for use with acpi problems
#KernelOptions = server=10.16.1.5   # different pxe server ip, (needs device import to be activated)

[Partition]          # efi system partition
Dev = /dev/sda1      # device name of the partition
Label = efi          # partition label
Size = 200M          # partition size 200M, will use kiB if no unit (M, G or T) is set
Id = ef              # partition id (ef = efi)
FSType = vfat        # filesystem vfat
Bootable = yes       # set bootable flag yes

[Partition]          # microsoft reserved partition
Dev = /dev/sda2      # device name of the partition
Label = msr          # partition label
Size = 128M          # partition size 128M
Id = 0c01            # partition id (0c01 = msr)
FSType =             # no filesystem
Bootable = no        # set bootable flag no

[Partition]          # partition section (operating system)
Dev = /dev/sda3      # device name of the partition
Label = windows      # partition label
Size = 16G           # partition size 50G, will use kiB if no unit (M, G or T) is set
Id = 7               # partition id (7 = ntfs)
FSType = ntfs        # filesystem ntfs
Bootable = no        # set bootable flag no

[Partition]          # partition section (operating system)
Dev = /dev/sda4      # device name of the partition
Label = ubuntu       # partition label
Size =  19G           # partition size 30G
Id = 83              # partition id (83 = linux)
FSType = ext4        # filesystem ext4
Bootable = no        # set bootable flag no

[Partition]          # partition section (cache)
Dev = /dev/sda5      # device name of the partition
Label = Cache        # partition label
Size = 11G           # partition size 80G
Id = 83              # partition id (83 = linux)
FSType = ext4        # filesystem ext4
Bootable = no        # set bootable flag no

[Partition]          # partition section (swap)
Dev = /dev/sda6      # device name of the partition
Label = swap         # partition label
Size = 7G            # partition size 8G
Id = 82              # partition id (82 = swap)
FSType = swap        # filesystem swap
Bootable = no        # set bootable flag no

[Partition]          # partition section (data)
Label = data         # partition label
Dev = /dev/sda7      # device name of the partition
Size =               # partition size (no value = remaining space of the disk)
Id = 7               # partition id (7 = ntfs)
FSType = ntfs        # filesystem ntfs
Bootable = no        # set bootable flag no


# Betriebssystemdefinitionen ....

Version, in der die Partitionen stimmen:

[LINBO]                             # global section
Server = 10.16.1.1                  # linbo server ip address
Group = icorenew
Cache = /dev/sda5                   # cache partition
RootTimeout = 600                   # logout from admin console after 600 secs
AutoPartition = no                  # no partition repair during LINBO startup
AutoFormat = no                     # no formatting of all partitions during LINBO startup
AutoInitCache = no                  # no initial cache setup during LINBO startup
DownloadType = torrent              # image download method (torrent|multicast|rsync)
BackgroundFontColor = white         # font color of status section (default: white)
ConsoleFontColorStdout = lightgreen # console font color (default: white)
ConsoleFontColorStderr = orange     # console error font color (default: red)
SystemType = efi64                  # possible values: bios|bios64|efi32|efi64 (default: bios)
# KernelOptions = quiet splash        # linbo kernel options, space separated
KernelOptions = nomodeset dhcpretry=18 
#KernelOptions = acpi=noirq irqpoll # linbo kernel options example for use with acpi problems
#KernelOptions = server=10.16.1.5   # different pxe server ip, (needs device import to be activated)

[Partition]          # efi system partition
Dev = /dev/sda1      # device name of the partition
Label = efi          # partition label
Size = 200M          # partition size 200M, will use kiB if no unit (M, G or T) is set
Id = ef              # partition id (ef = efi)
FSType = vfat        # filesystem vfat
Bootable = yes       # set bootable flag yes

[Partition]          # microsoft reserved partition
Dev = /dev/sda2      # device name of the partition
Label = msr          # partition label
Size = 128M          # partition size 128M
Id = 0c01            # partition id (0c01 = msr)
FSType =             # no filesystem
Bootable = no        # set bootable flag no

[Partition]          # partition section (operating system)
Dev = /dev/sda3      # device name of the partition
Label = windows      # partition label
Size = 16G           # partition size 50G, will use kiB if no unit (M, G or T) is set
Id = 7               # partition id (7 = ntfs)
FSType = ntfs        # filesystem ntfs
Bootable = no        # set bootable flag no

[Partition]          # partition section (operating system)
Dev = /dev/sda4      # device name of the partition
Label = ubuntu       # partition label
Size =  19G           # partition size 30G
Id = 83              # partition id (83 = linux)
FSType = ext4        # filesystem ext4
Bootable = no        # set bootable flag no

[Partition]          # partition section (cache)
Dev = /dev/sda5      # device name of the partition
Label = Cache        # partition label
Size = 11G           # partition size 80G
Id = 83              # partition id (83 = linux)
FSType = ext4        # filesystem ext4
Bootable = no        # set bootable flag no

[Partition]          # partition section (swap)
Dev = /dev/sda6      # device name of the partition
Label = lurch         # partition label
Size = 7G            # partition size 8G
Id = 82              # partition id (82 = swap)
FSType = swap        # filesystem swap
Bootable = no        # set bootable flag no

[Partition]          # partition section (data)
Label = data         # partition label
Dev = /dev/sda7      # device name of the partition
Size =               # partition size (no value = remaining space of the disk)
Id = 7               # partition id (7 = ntfs)
FSType = ntfs        # filesystem ntfs
Bootable = no        # set bootable flag no

# Betriebssystemdefinitionen ....

Hallo Christoph,

auch ich habe das Problem beobachten können: aber nicht bei UEFI sondern
bei einer BIOS Gruppe.
Auch ich stellte fest, dass die vierte Partition die Sache schwankend
machte.
Das seltsame ist: betroffen war mein (damals) neuer bionic Client und
ich hatte, wie früher, 6 Partitionen.
Als das zu Problemen beim Partitionieren führte dampfte ich das ein auf
4 Partitionen:
sda1 -> ubuntu
sda2 -> cache
sda3 -> swap
sda4 -> ext4 data Partition (open end)

Damit funktionierte es auf allen Rechnern … bis auf die T61 Laptops.
Die haben wiederholbar gebootet und falsch partitioniert: immer! Absolut
zuverlässig.
Allerdings lag es nicht am „verrechnen“ sondern an einer verstümmelten
start.conf auf dem Client.
Ich hab die Dinger erst sauber partitioniert bekommen, wenn ich
folgendes gemacht habe:

  1. booten in linbo
  2. linbo-console auf und die lokale /start.conf (nicht
    start.conf.) editiert: dort stand dann nämlich
    sda1 -> ubuntu
    sda1 -> cache
    sda3 -> swap
    sda4 -> ext4 data Partition (open end)
    Und bei Cache ganz oben in der start.conf stand Cache = /dev/sda1
    Das hab ich korrigiert
  3. Partitioniert

Seit dem reagieren die Cleints absolut normal.

Meine Vermutung: ist schon eine start.conf auf der Platte, dann mischt
linbo beim PXE boot die Infos aus der start.conf.gruppe vom server mit
denen der lokalen start.conf.
Das denke ich aber auch nur, weil ich mir nicht vorstellen kann, dass
linbo sich selber was ausdenkt …

LG

Holger

Lieber Holger,

Ja: Deine Beobachtung deckt sich mit den weiteren Erfahrungen, die ich gestern auch machte, aber:
Wenn Du Dir mein Beispiel ansiehst und dann erst die funktionierende start.conf auswählst, führt ein Wechsel danach zur problematischen start.conf trotz gleicher Partitionsanzahl und -größen - außer eben beim label „swap“ - zum Chaos, -
ein Umlabeln zu „lurch“ wieder zur korrekten Reihenfolge.
Ergo handelt es sich hier um einen „parsing“-Fehler bei Linbo, da bin ich mir aufgrund der Beobachtungen sicher!
L.G.
Christoph G.
(mit der Bitte an @thomas, sich das mal anzusehen)

Hallo Christoph,

wir haben Heute auf der FoBi das Problem diskutiert und kamen auf
folgendes Ergebnis.
Wenn linbo lokal Label vorfindet, versucht es die mit den Labeln in der
start.conf zusammen zu füphren.
Dabei haben wohl label auf der Platte Vorrang: weswegen mein Cache, der
in der start.conf auf dem server sda2 ist, aber auf der Platte sda6 war
(von früher) dann plötzlich auf sda6 angelegt wird.
Eigentlich würde es reichen die Platte zu leeren (alle Partitionen
löschen) und dann linbo zu booten: dann klappt alles.

LG

Holger

Hallo Christoph und die anderen,

ich hatte ja etwas ähnliches vor einiger Zeit schon mal beobachtet.

Meine Vermutung damals: wenn eine (zu ändernde) Partition mit gleichem Label schon existiert, geht etwas schief. Ein ggf. mehrfaches Umbenennen löst das Problem.

Was mir damals auffiel: diskpart unter Windows z.B. erwartet bei Partitionsänderungen das alte Label, sonst wird nichts gemacht - daher vermutete ich, dass vielleicht beim Ändern/Anlegen von existierenden Partitionen in Linbo irgendein Fehler nicht abgefangen wird.

Da das selten vorkommt und man es über die Label-Änderung zentral beheben kann, ist es nicht so dramatisch - ich vermute aber, dass das öfter Mal zu seltsamen Problemen führt, wenn man nicht dran denkt.

Hier die alte Diskussion: Probleme bei UEFI/Partitionsänderung

Was aber schon problematisch war: „die Platte leeren“ geht eben nicht ohne weiteres. Ein „Partitionieren“ mit den alten Labels hat damals bei mir nicht funktioniert - dabei sollte das doch wirklich alles hinwegfegen.

Man kann es wie gesagt zwar umgehen - aber eigentlich ist da doch Handlungsbedarf in der Logik, wie Linbo beim Partitionieren vorgeht - da kennt sich aber wohl am ehesten der andere Thomas aus.

Viele Grüße,
Thomas

Hallo an alle,

  • danke zunächst mal für das aufschlussreiche feedback -

bei mir hat das eifrige Experimentieren folgendes erbracht: Schreibe ich eine neue, leere GPT-Tabelle auf die Platte (z.B. mit gdisk, Buchstabe „o“, löscht alle Daten), macht LINBO danach keine Fehler beim Anlegen der Partitionen, auch nicht beim „swap“ (s.o.).

Vielleicht sollte LINBO generell so vorgehen und erstmal „die Platte putzen“ ?

Gruß Christoph G.

Hallo zusammen,

es liegt vermutlich an Folgendem:

Beim Booten analysiert Linbo die Platte. Wenn es dort Label findet, wird die lokal zwischengespeicherte start.conf anhand dieser Label korrigiert - aus sda wird z. B. sdb.

Wenn man nun z. B. Partitionen anders sortiert, die Label aber lässt, dann geht das schief.

Sinnvollerweise müsste Linbo vor dem Partitiopnieren die originale start.conf vom Server holen (oder immer zusätzlich cachen) und zum Partitionieren immer die unveränderte start.conf nehmen. Die vorhandenen Label sollten allenfalls herangezogen werden, um die korrekte Platte zu identifizieren.

Beste Grüße

Jörg

Hallo,

Thomas hat das Problem nachvollzogen.
Daraufhin hab ich einen Issue in GitHUB angelegt.

LG

Holger

1 „Gefällt mir“

Hallo,

heute kam linbo 2.3.53 raus, dass das Problem beheben soll.
Das wird nun getestet.

LG

Holger

Hallo, Holger,

merci, ich hab’s bereits gesehen und einen Test angekündigt.
L.G.
Christoph

Warum?
Ich glaube, dieses Feature hat mir schon viel graue Haare geschenkt und Zeit genommen. Besonders wenn ein Admin via Linbo ein „partition“-Befehl absetzt, kann er erwarten dass der auch durchgeführt wird.
Die Idee „Ein Image, X identische Systeme“ führt dieses Verhalten ad absurdum. Besonders wenn es nicht dokumentiert ist.

5 Beiträge wurden in ein neues Thema verschoben: Linuxmuster-import-devices verzählt sich