add boot to bios meshcmd #7852

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed May 30, 2026 at 13:49 UTC e6371956e160278cbb11d088928d74be578a4b8d
1 file changed +6 -6
agents/meshcmd.js
+6 -6
@@ -305,7 +305,7 @@ function run(argv) {
305 console.log(' --pass [password] The Intel AMT login password.');
306 console.log(' --agent [uuid] The unique identifier of the watchdog agent.');
307 } else if (action == 'amtpower') {
308 - console.log('AmtPower will get current pwoer state or send a reboot command to a remote Intel AMT device. Example usage:\r\n\r\n meshcmd amtpower --reset --host 1.2.3.4 --user admin --pass mypassword --tls');
308 + console.log('AmtPower will get current power state or send a reboot command to a remote Intel AMT device. Example usage:\r\n\r\n meshcmd amtpower --reset --host 1.2.3.4 --user admin --pass mypassword --tls');
309 console.log('\r\nRequired arguments:\r\n');
310 console.log(' --host [hostname] The IP address or DNS name of Intel AMT.');
311 console.log(' --pass [password] The Intel AMT login password.');
@@ -313,7 +313,7 @@ function run(argv) {
313 console.log(' --reset, --poweron, --poweroff, --powercycle, --sleep, --hibernate');
314 console.log(' --user [username] The Intel AMT login username, admin is default.');
315 console.log(' --tls Specifies that TLS must be used.');
316 - console.log(' --bootdevice [pxe|hdd|cd|ider-floppy|ider-cdrom] Specifies the boot device to use after reset, poweron or powercycle.');
316 + console.log(' --bootdevice [pxe|hdd|cd|bios|ider-floppy|ider-cdrom] Specifies the boot device to use after reset, poweron or powercycle.');
317 console.log(' --bootindex [number] Specifies the index of boot device to use.');
318 } else if (action == 'amtnetwork') {
319 console.log('AmtNetwork is used to get/set Intel AMT network interface configuration. Example usage:\r\n\r\n meshcmd amtnetwork --host 1.2.3.4 --user admin --pass mypassword --dhcp');
@@ -873,7 +873,7 @@ function run(argv) {
873 if (args.reset) { settings.poweraction = 10; }
874 //if (settings.poweraction == 0) { console.log('No power action, specify --poweron, --sleep, --powercycle, --poweroff, --hibernate, --reset.'); exit(1); return; }
875 // Accepted option for boot device are: pxe, hdd, cd
876 - var bootdevices = ['pxe','hdd','cd'];
876 + var bootdevices = ['pxe','hdd','cd','bios'];
877 var ider_bootdevices = ['ider-floppy', 'ider-cdrom']
878 if (args.bootdevice) {
879 if (bootdevices.indexOf(args.bootdevice.toLowerCase())>=0) {
@@ -887,7 +887,7 @@ function run(argv) {
887 settings.ider_bootindex = ider_bootdevices.indexOf(args.bootdevice.toLowerCase());
888 settings.ider_boot = true;
889 } else {
890 - console.log('Supported boot devices are pxe, hdd, cd, ider-floppy, ider-cdrom'); exit(1); return;
890 + console.log('Supported boot devices are pxe, hdd, cd, bios, ider-floppy, ider-cdrom'); exit(1); return;
891 }
892 }
893 // boot index for cd and hdd
@@ -3165,8 +3165,8 @@ function powerActionResponse1(stack, name, response, status) {
3165 r['ConfigurationDataReset'] = false;
3166 r['BIOSPause'] = false;
3167 r['EnforceSecureBoot'] = false;
3168 - r['BIOSSetup'] = false;
3169 - if (settings.bootdevice && settings.bootdevice!='pxe') {
3168 + r['BIOSSetup'] = (settings.bootdevice === 'bios');
3169 + if (settings.bootdevice && settings.bootdevice!='pxe' && settings.bootdevice!='bios') {
3170 r['BootMediaIndex'] = settings.bootindex;
3171 } else {
3172 r['BootMediaIndex'] = 0;