GRUB2
blkid /dev/sdb1
/dev/sdb1: UUID=„2204-F1DB“ TYPE=„vfat“ PARTLABEL=„EFI system partition“ PARTUUID=„296ca700-e41c-4959-b900-a41a0c3509b2“
nano /etc/grub.d/11_windows7
nano /etc/grub.d/11_windows7<file>#!/bin/sh exec tail -n +3 $0 menuentry „Windows 7 UEFI/GPT“ { insmod part_gpt insmod search_fs_uuid insmod chain search –fs-uuid –no-floppy –set=root 2204-F1DB chainloader ($root)/EFI/MICROSOFT/BOOT/bootmgfw.efi }</info>
multiboot GTP/MBR
[root@archbook michael]# gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.1 Partition table scan: MBR: hybrid BSD: not present APM: not present GPT: present Found valid GPT with hybrid MBR; using GPT. Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): p Your option? (Y/N): y Command (? for help): p Disk /dev/sdb: 7864320 sectors, 3.8 GiB Logical sector size: 512 bytes Disk identifier (GUID): 111F2E5B-60C6-4959-B6A7-9419747741B6 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7864286 Partitions will be aligned on 2048-sector boundaries Total free space is 7864253 sectors (3.7 GiB) Number Start (sector) End (sector) Size Code Name Command (? for help): n Partition number (1-128, default 1): First sector (34-7864286, default = 2048) or {+-}size{KMGTP}: Last sector (2048-7864286, default = 7864286) or {+-}size{KMGTP}: +1M Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): ef02 Changed type of partition to 'BIOS boot partition' Command (? for help): n Partition number (2-128, default 2): First sector (34-7864286, default = 4096) or {+-}size{KMGTP}: Last sector (4096-7864286, default = 7864286) or {+-}size{KMGTP}: +100M Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): ef00 Changed type of partition to 'EFI System' Command (? for help): n Partition number (3-128, default 3): First sector (34-7864286, default = 208896) or {+-}size{KMGTP}: Last sector (208896-7864286, default = 7864286) or {+-}size{KMGTP}: Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): Changed type of partition to 'Linux filesystem' Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully. [root@archbook michael]# gdisk /dev/sdb GPT fdisk (gdisk) version 1.0.1 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): r Recovery/transformation command (? for help): h WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one, just hit the Enter key at the below prompt and your MBR partition table will be untouched. Type from one to three GPT partition numbers, separated by spaces, to be added to the hybrid MBR, in sequence: 1 2 3 Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n Creating entry for GPT partition #1 (MBR partition #1) Enter an MBR hex code (default EF): Set the bootable flag? (Y/N): n Creating entry for GPT partition #2 (MBR partition #2) Enter an MBR hex code (default EF): Set the bootable flag? (Y/N): n Creating entry for GPT partition #3 (MBR partition #3) Enter an MBR hex code (default 83): Set the bootable flag? (Y/N): y Recovery/transformation command (? for help): x Expert command (? for help): h Expert command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. The operation has completed successfully. [root@archbook michael]# mkfs.ext4 /dev/sdb3 mke2fs 1.43.3 (04-Sep-2016) /dev/sdb3 hat ein ext4-Dateisystem mit Namen „ROOT“ zuletzt auf /mnt auf Tue Jan 3 03:00:04 2017 eingehängtTrotzdem fortfahren? (j,n) j Ein Dateisystems mit 956923 (4k) Blöcken und 239520 Inodes wird erzeugt. UUID des Dateisystems: 19ab5fd9-f0bd-4080-9d78-3068a49f5fca Superblock-Sicherungskopien gespeichert in den Blöcken: 32768, 98304, 163840, 229376, 294912, 819200, 884736 beim Anfordern von Speicher für die Gruppentabellen: erledigt Inode-Tabellen werden geschrieben: erledigt Das Journal (16384 Blöcke) wird angelegt: erledigt Die Superblöcke und die Informationen über die Dateisystemnutzung werden geschrieben: erledigt [root@archbook michael]# mkfs.vfat -F32 /dev/sdb2 mkfs.fat 4.0 (2016-05-06) [root@archbook michael]# mount /dev/sdb3 /mnt/ [root@archbook michael]# mkdir -p /mnt/boot/efi [root@archbook michael]# mount /dev/sdb2 /mnt/boot/efi/ [root@archbook michael]# grub-install --target=x86_64-efi --efi-directory=/mnt/boot/efi --boot-directory=/mnt/boot --removable --recheck x86_64-efi wird für Ihre Plattform installiert. installation beendet. Keine Fehler aufgetreten. [root@archbook michael]# grub-install --target=i386-pc --boot-directory=/mnt/boot --recheck /dev/sdb i386-pc wird für Ihre Plattform installiert. grub-install: Warnung: Es wird versucht, GRUB auf einer Platte mit mehreren Partitionsbezeichnungen zu installieren. Dies wird derzeit noch nicht unterstützt.. grub-install: Warnung: Einbettung ist nicht möglich. GRUB kann in dieser Konfiguration nur mittels Blocklisten installiert werden. Blocklisten sind allerdings UNZUVERLÄSSIG und deren Verwendung wird daher nicht empfohlen.. grub-install: Fehler: mit Blocklisten wird nicht fortgesetzt. [root@archbook michael]# grub-install --target=i386-pc --boot-directory=/mnt/boot --recheck /dev/sdb3 i386-pc wird für Ihre Plattform installiert. grub-install: Warnung: Dateisystem »ext2« unterstützt keine Einbettungen. grub-install: Warnung: Einbettung ist nicht möglich. GRUB kann in dieser Konfiguration nur mittels Blocklisten installiert werden. Blocklisten sind allerdings UNZUVERLÄSSIG und deren Verwendung wird daher nicht empfohlen.. grub-install: Fehler: mit Blocklisten wird nicht fortgesetzt. [root@archbook michael]# grub- grub-bios-setup grub-glue-efi grub-menulst2cfg grub-mklayout grub-mkrescue grub-probe grub-set-default grub-editenv grub-install grub-mkconfig grub-mknetdir grub-mkstandalone grub-reboot grub-sparc64-setup grub-file grub-kbdcomp grub-mkfont grub-mkpasswd-pbkdf2 grub-mount grub-render-label grub-syslinux2cfg grub-fstest grub-macbless grub-mkimage grub-mkrelpath grub-ofpathname grub-script-check [root@archbook michael]# ls /mnt/boot/ efi grub [root@archbook michael]# ls /mnt/boot/grub/ fonts grubenv i386-pc locale themes x86_64-efi