Categorie:BCLD uitrollen via GPO

Uit Wiki Facet
Naar navigatie springenNaar zoeken springen

Het is mogelijk om de installatie van de BCLD geautomatiseerd te laten verlopen via GPO

In dit geval wordt een GPO gebruikt die een opstart script uitvoert en een aantal bestanden kopieert.

Hiervoor is het niet nodig een extra partitie aan te maken. Het is mogelijk om dit uit te rollen zonder handmatige acties te verrichten. Tijdens het opstarten wordt een boot menu getoond van waaruit er kan worden gekozen tussen Windows(10) en de BCLD. Word ter gedurende het ingestelde aantal seconden geen keuze gemaakt, dan start de machine zelf door naar Windows. Je kunt dit ook uitzetten in de timeout settings door deze op ‘0’ te zetten.


Hieronder screenshot van alle bestanden die gekopieerd moeten worden. In de bcld map staan de 2 linux bestanden (vmlinuz, initrd).

GPO.JPG

Grub2win wordt als bootloader gebruikt. Alleen de mappen ‘g2bootmgr’, ‘i386-pc’ zijn hiervoor nodig en een CFG bestand. Het CFG bestand dient in de ‘grub2’ map te staan. Verder in deze post staat het CFG bestand.


Onderstaande batch file word als startup script uitgevoerd op de facet afname computers.


Het ID {48d0f13a-231d-11e6-9f9e-ab7cbd5115b2} kan bij uw eigen computers anders zijn, als er bijvoorbeeld meer partities worden gebruikt.


''''''Startup script batch file''':</'''nowiki> <nowiki>bcdedit.exe /create /application bootsector /d "Facet"


bcdedit.exe /set {48d0f13a-231d-11e6-9f9e-ab7cbd5115b2} device "partition=C:"


bcdedit.exe /set {48d0f13a-231d-11e6-9f9e-ab7cbd5115b2} path "\grub2\g2bootmgr\grub2win.boot.bios"


bcdedit.exe /displayorder {48d0f13a-231d-11e6-9f9e-ab7cbd5115b2} /addlast


bcdedit.exe /set {bootmgr} timeout "15"


Ipadres van 1.1.1.1 aanpassen naar je eigen FAO ip of online afname url. <nowiki>'''grub.cfg''':


#

# Created at 08:34:39 on Woensdag 11 Oktober 2017

#

# Generated by Grub2Win Version 0.9.8.6 from directory C:\grub2

# Stamp 2017 - 1006 - 184758


#

# The grub menu theme is - basic

#

#

# Grub2Win generated 1 menu entry.

#


# The Grub default boot OS is menu entry 0 - FACET

# The Grub default timeout is 0 seconds

# The Grub locale language is English The locale code is - en

#<nowiki> <nowiki>set default=0

set grub2win_chosen='0 - FACET'

set timeout=0

set lang=en

set grub2win_version=0.9.8.6

set pager=1

set icondir=$prefix/themes/icons

set locale_dir=$prefix/locale

set grub2win_procbits=32

if [ cpuid -l ] ; then set grub2win_procbits=64 ; fi


set grub2win_bootmode=BIOS

if [ $grub_platform = efi ] ; then set grub2win_bootmode=EFI ; fi


set grub2win_custmode=BIOS

set grub2win_lastbooted=no set gfxmode=1024x768,800x600,auto set theme=$prefix/themes/custom.config if [ $grub2win_bootmode = EFI ] ; then set theme=$theme.efi.txt ; else set theme=$theme.bios.txt ; fi export theme set gfxpayload=text export icondir insmod png insmod all_video loadfont $prefix/fonts/unicode.pf2 insmod gfxterm terminal_output gfxterm insmod gfxmenu


# start-grub2win-auto-menu-section ***************************************************<nowiki> # # # Menu Entry 0 FACET # # ** Grub will boot this entry by default ** # menuentry 'FACET' --class other --class icon-xtra-01 --class custom_000 { # # start-custom-code set root=(hd0,msdos2) linux /BCLD/vmlinuz quiet initrd=initrd bcld.url=https://1.1.1.1/facet-afname initrd /BCLD/initrd # end-custom-code savelast 0 'FACET' echo Grub is now loading FACET } # # end-grub2win-auto-menu-section *************************************************** # start-grub2win-savelast-section **************************************************** # function savelast { set default=$1 save_env default if [ $grub2win_bootlast = yes ] ; then set grub2win_chosen=$default' - '$2 fi save_env grub2win_chosen if [ ! -z $subdefault ] ; then set default=$subdefault ; fi } # # end-grub2win-savelast-section **************************************************** # start-grub2win-getbootpartition-section ********************************************* # # The getbootpartition function searches for a partition # If the first paramater is 'label' it searches for a partition with the label name # passed in the second parameter. Otherwise it searches for a file with the filename # passed in the second parameter. # It then sets the root address to prepare for boot. # # function getbootpartition { set pager=0 set searchtype=$1 set partsearch=$2 if [ $searchtype = label ] ; then search.fs_label $partsearch rootaddress else search.file $partsearch rootaddress fi if [ $? = 0 ] ; then set root=($rootaddress) echo echo Grub is setting root to $root echo The boot partion $searchtype is $partsearch echo else g2werror 'Grub did not find a boot partition with' $searchtype $partsearch fi } <nowiki>function g2werror {</nowiki>


echo


echo


echo *** $1 $2 $3 $4 $5


echo *** Press the ESC key to continue


echo


sleep -v -i 120


configfile $prefix/grub.cfg


}



  1. end-grub2win-getbootpartition-section ********************************************


  1. start-grub2win-user-section ********************************************************




# end-grub2win-user-section ********************************************************

Deze categorie bevat geen pagina’s of media.