Categorie:BCLD uitrollen via GPO
BCLD via GPO uitrollen
Het is mogelijk om de BCLD via GPO uit te rollen. Hieronder wordt *globaal* aangegeven wat er voor nodig is. In uw eigen omgeving kan dit iets anders zijn.
Hier wordt een opstartscript uitgevoerd die een aantal bestanden kopieert. Hierbij is het niet nodig een extra partitie aan te maken. Op deze manier kan de BCLD worden uitgerold zonder handmatige acties te verrichten.
Tijdens het opstarten wordt een bootmenu getoond waaruit er kan worden gekozen tussen Windows of de BCLD. Door de time-out aan te passen start de machine automatisch door naar Windows. Wanneer de time-out op '0' wordt gezet, zal de machine direct doorstarten naar Windows. Dit kan bijvoorbeeld worden gebruikt wanneer er geen afnameperiodes zij.
Hieronder een screenshot van alle bestanden die gekopieerd moeten worden. In de BCLD map staan de 2 linux bestanden uit de PXE download (vmlinuz, initrd). In dit geval wordt Grub2win als bootloader gebruikt. Hier zijn alleen de mappen ''''g2bootmgr'''' en ''''i386-pc'''' zijn hiervoor nodig en een CFG bestand deze moet in de grub2 map staan. Verder in deze post staat het CFG bestand.
Batchfile
Onderstaande batch file word als startup script uitgevoerd op de facet afname computers.
Het ID {48d0f13a-231d-11e6-9f9e-ab7cbd5115b2} kan verschillen, bijvoorbeeld als uw eigen computers meer partities heeft.
Startup script batch file:
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.
Grup aanpassen
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
#
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=tekst
export icondir
insmod png
insmod all_video
loadfont $prefix/fonts/unicode.pf2
insmod gfxterm
terminal_output gfxterm
insmod gfxmenu
# start-grub2win-auto-menu-section *************************************************** #
#
# 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
}
function g2werror {
echo
echo
echo *** $1 $2 $3 $4 $5
echo *** Press the ESC key to continu
echo
sleep -v -i 120
configfile $prefix/grub.cfg
}
#
# end-grub2win-getbootpartition-section ********************************************
# start-grub2win-user-section ********************************************************
#
#
# end-grub2win-user-section ********************************************************
Deze categorie bevat geen pagina’s of media.