[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kohabitation Debian Win10



Am 04.01.2017 um 22:42 schrieb Michael Lange:

> Hier auch, der Installer hat grub natürlich ohne Nachfrage weggebügelt,
> aber aus einem Live-System mit chroot liess sich grub problemlos wieder
> installieren und hat Win10 auch gleich erkannt (wenn auch seltsamerweise
> als  'Windows Recovery Environment", aber egal, es funktioniert :-)

Man kann auch den umgekehrten Weg gehen, wenn man sich mit GRUB-Legacy
statt GRUB2 begnügen will - funktioniert so von Windows Vista bis
Windows 10 (für XP siehe ganz unten):

Aus GRUB4DOS die Dateien GRLDR und GRLDR.mbr nach C:\ kopieren.

Das hier als addgrub.cmd speichern, nach Bedarf anpassen und ausführen:
@echo off
setlocal
set BCDEDIT=%SYSTEM%\bcdedit.exe
if not exist %BCDEDIT% exit 1
for /f "tokens=3" %%A in ('%BCDEDIT% /create /d "PXE boot" /application
bootsector') do set guid=%%A
%BCDEDIT% /set %guid% device partition=%SystemDrive%
%BCDEDIT% /set %guid% path \grldr.mbr

REM you can use /addfirst instead, if you want
%BCDEDIT% /displayorder %guid% /addlast

REM this sets a 5 second timeout until the default entry is booted
REM feel free to adjust to your needs, but NEVER set it to 0 or 1
REM in combination with using /default below unless you don't ever
REM intend to boot back into Windows again.
%BCDEDIT% /timeout 5

REM "bootsequence" means only the single, next reboot will default to this
%BCDEDIT% /bootsequence %guid% /addfirst

REM alternatively, you can uncomment this and make the Linux
REM boot option the default boot option
REM %BCDEDIT% /default %guid%

endlocal

Eine menu.lst nach C:\ legen, die nur

default 0
timeout 5


title           Load Linux GRUB config
find		/boot/grub/menu.lst
root
configfile	/boot/grub/menu.lst

enthält.

Das bewirkt, dass der Standard-Windows-MBR und -Bootloader erhalten
bleibt. Somit sind bei Windows-Updates keine Probleme zu erwarten.
Es kam nämlich schon öfters vor, dass sich Windows-Updates an
alternativen Bootloadern und Nicht-Windows-MBRs verschluckt haben und
dann beim nächsten Reboot gar nichts mehr ging, weder Linux noch
Windows, oder das Linux nicht mehr erreichbar war.

Falls noch jemand Windows XP einsetzt, dort geht es noch einfacher,
statt der CMD-Datei braucht man dort nur die C:\boot.ini bearbeiten.
attrib -r -h -s C:\boot.ini
Editor öffnen und C:\boot.ini laden
Irgendwo unterhalb [operating systems]
C:\grldr=“Start ThinClient”
eintragen
Falls Linux der Default-Menüeintrag sein soll, unter
[boot loader]
die Zeile mit "default" am Anfang auf
default=C:\grldr
ändern.
attrib +r +h +s C:\boot.ini
Fertig.

Gruß
Stefan


Reply to: