Hallo zusammen,
meine Anfrage mag ohne Erklärung etwas eigenartig klingen, daher vorweg einige Informationen, um meine Anfrage etwas sinnvoller erscheinen zu lassen: Ich engagiere mich an meiner Uni als Teil einer stud. Initiative dafür, dass GNU/Linux eine Standard-Wahlalternative auf den öffentlichen Computer-Pool-PCs wird. Ich habe die Erlaubnis, in einem der Computer-Pools, in dem ausnahmslos 2015er iMacs stehen, in eine Multiboot-Umgebung umzuwandeln, die OS-Auswahl soll mit rEFInd erfolgen. Problem: Das GNU/Linux muss, so die zweite Vorgabe des Admins, am Ende skriptgesteuert von MacOS aus (denn das ist auf den iMacs ja vorinstalliert) installiert werden können. Ein umfangreiches Software-Deployment/Orchestierungs-System gibt es nicht, nur einen NFS-Server, den ich nutzen kann. Als System soll, dritte Vorgabe des Admins, elementaryOS dienen (nicht mein Favorit, es soll aber genutzt werden, um die MacOS-User optisch nicht zu verschrecken, was ich nachvollziehen kann) - da elementaryOS Ubuntu-basiert ist hoffe ich bezüglich meiner Anfrage um Nachsicht, ich würde bei elementaryOS im Forum fragen, wenn die Com dort denn eines hätte.
Meine Idee zur Umsetzung war:
1. Quell-System einrichten (elementaryOS neben MacOS, als Boot-Manager rEFInd, LDAP-Anbindung). 2. Quell-System mit dd klonen. 3. Auf Ziel-System die MacOS-Partition verkleinern und das geklonte Quell-System mit dd "importieren". 4. grub-Konfiguration manuell von Quell-System nach Ziel-System kopieren. 5. rEFInd auf Ziel-System installieren. 6. Nachjustierungen auf Ziel-System durchführen, damit die das geklonte elementaryOS sauber läuft.
Nach Schritt 5 habe ich leider das Problem, dass elementaryOS nur ins initramfs kommt. Mein erster Gedanke war, dass irgendetwas mit dem Filesystem-UUIDs nicht hinhaut, denn diese müsste ja auf dem Ziel-System eine andere sein als auf dem Quell-System.
Daher hier zum Vergleich die hoffentlich essentiellen Daten von Quell- und Ziel-System:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | Quell-System:~ root# mkdir /Volumes/ESP && mount -t msdos /dev/disk0s1 /Volumes/ESP && ls -la /Volumes/ total 9 drwxrwxrwt@ 5 root admin 170 25 Apr 17:19 . drwxr-xr-x 38 root wheel 1360 6 Aug 2018 .. lrwxr-xr-x 1 root admin 1 24 Apr 01:10 Apple OS X -> / drwxrwxrwx@ 1 _unknown _unknown 512 4 Apr 17:31 ESP drwxrwxr-x@ 10 root admin 408 11 Aug 2017 Linux Quell-System:~ root# cat /Volumes/ESP/EFI/ubuntu/grub.cfg search.fs_uuid bff72c95-8954-45c5-8d41-6d843335395a root hd0,gpt5 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg Quell-System:~ root# diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_HFS Apple OS X 687.2 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 4: Apple_HFS Linux 649.1 MB disk0s4 5: Linux Filesystem 65.5 GB disk0s5 6: Linux Swap 36.6 GB disk0s6 Quell-System:~ root# |
(disk0s4 hat hier historische Gründe, die relevante Systempartition für eOS ist disk0s5
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | Ziel-System:~ root# mkdir /Volumes/ESP && mount -t msdos /dev/disk0s1 /Volumes/ESP && ls -la /Volumes/ total 1 drwxr-xr-x+ 4 root wheel 128 25 Apr 17:18 . drwxr-xr-x 28 root wheel 896 17 Apr 11:36 .. drwxrwxrwx@ 1 _unknown _unknown 512 25 Apr 16:49 ESP lrwxr-xr-x 1 root wheel 1 25 Apr 17:10 macOS -> / Ziel-System:~ root# cat /Volumes/ESP/EFI/ubuntu/grub.cfg search.fs_uuid b7d98e30-f434-4125-ad6f-f7f9746e99bf root hd0,gpt3 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg Ziel-System:~ root# diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_APFS Container disk1 871.0 GB disk0s2 3: Linux Filesystem 107.4 GB disk0s3 4: Linux Swap 17.2 GB disk0s4 /dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +871.0 GB disk1 Physical Store disk0s2 1: APFS Volume macOS 48.0 GB disk1s1 2: APFS Volume Preboot 27.6 MB disk1s2 3: APFS Volume Recovery 522.7 MB disk1s3 4: APFS Volume VM 4.3 GB disk1s4 Ziel-System:~ root# |
(Auch hier nicht wundern: Das MacOS des Ziel-System läuft unter MacOS 10.13, weswegen hier APFS verwendet werden muss, jedenfalls ignorierte der MacOS-Installer meine Wünsche bezüglich HFS.)
Es fällt also auf, dass die rEFInd-Installation in der zuvor von Quelle nach Ziel kopierten grub-Konfiguration die UUID von bff72c95-8954-45c5-8d41-6d843335395a auf b7d98e30-f434-4125-ad6f-f7f9746e99bf geändert hat. Das Ergebnis ist wie gesagt, dass eOS nur ins initramfs kommt.
Besagtes initramfs (des Ziel-Systems) sagt mir:
1 2 3 | (initramfs) ls -la /dev/disk/by-partuuid/ ... 538ba927-4be0-4702-8420-8405744ad0ab -> ../../sda3 |
→ also wieder eine andere UUID, von der ich nicht weiß, wo sie herkommt
Wie dem auch sei: Wenn ich nun in /Volumes/ESP/EFI/ubuntu/grub.cfg
des Ziel-Systems die UUID eintrage, die mir im intramfs des Quell-Systems angezeigt wird, entsprechend also
b7d98e30-f434-4125-ad6f-f7f9746e99bf
(s. grub.cfg des Ziel-Systems)
auf
538ba927-4be0-4702-8420-8405744ad0ab
(s. initramfs des Ziel-Systems)
ändere, bootet das Ziel-System leider auch nur ins initramfs.
Hat jemand eine Idee, was ich hier übersehe oder ob der Ansatz langfristig so überhaupt durchführbar ist, selbst wenn sich das UUID-Problem lösen lässt?