FOG running under Linux Bash Shell on Windows 10
today i tried to install FOG on the Linux Bash Microsoft has introduced with Windows 10:
They updated from Ubuntu 14 to 16, i just activated it and tried to install FOG and it works:
The Linux Filesystem is located here:
Just wanted to let you know its working, maybe its interesting for someone.
The main problem is when you close the command prompt (leave bash) it will close down anything, that means if you start the bash again nothing is running, no apach, no mysql, no fog services.
I think i need to create a start script that’s triggering the bash itself and runs some commands in it:
set ws=wscript.createobject("wscript.shell") ws.run "C:\Windows\System32\bash.exe -c 'sudo DOSTUFF'",0
What is needed to start? Can someone help me collecting everything needed?
- DHCP (if needed)
- FOG Multicastmanager, Image Replicator, Snapin Replicator, Scheduler, PingHosts, SnapinHash and ImageSize
Anything else? Howto start the FOG Services manually?
Is there a command to start everything needed instead of executing foginstall script again?
@Wayne-Workman not tested yet, but i will try this but don’t expect it in the next hours
@x23piracy Does it deploy and capture as expected?
thats what i got so far within the linux subsystem i have this file (startFOG.sh):
service apache2 start service php7.1-fpm start service mysql start service vsftpd start service tftpd-hpa start service FOGMulticastManager start service FOGImageReplicator start service FOGSnapinReplicator start service FOGPingHosts start service FOGSnapinHash start service FOGImageSize start service FOGScheduler start read -rn1
To run that as kind of service without having everything down when closing the bash window i use a vbs script:
set ws=wscript.createobject("wscript.shell") ws.run "C:\Windows\System32\bash.exe -c '/home/startFOG.sh'",0
This only works because my startFOG.sh has the “read -rn1” command as last line, this will wait for a key press like return or something and therefore helds the bash open until i close the process.
@x23piracy That’s because it’s FOGScheduler. Not FOGTaskScheduler.
that’s what i got so far:
service apache2 start service php7.1-fpm start service mysql start service vsftpd start service tftpd-hpa start service FOGMulticastManager start service FOGImageReplicator start service FOGSnapinReplicator start service FOGPingHosts start service FOGSnapinHash start service FOGImageSize start /usr/bin/php -q /opt/fog/service/FOGTaskScheduler/FOGTaskScheduler &
Why is the FOGTaskScheduler no registered Service?
Is there a way to start all the services marked as startup service?
Using this command i can see the services are enabled to start but simply opening bash will bring my into an already booted system where just all the startup services has been forced to close. Is there a way to retrigger the service init?
root@x23i7:/mnt/c/Users/x23# service --status-all [ + ] FOGImageReplicator [ + ] FOGImageSize [ + ] FOGMulticastManager [ + ] FOGPingHosts [ + ] FOGScheduler [ + ] FOGSnapinHash [ + ] FOGSnapinReplicator [ - ] acpid [ + ] apache-htcacheclean [ + ] apache2 [ - ] apparmor [ ? ] apport [ - ] atd [ - ] bootmisc.sh [ - ] checkfs.sh [ - ] checkroot-bootclean.sh [ - ] checkroot.sh [ - ] console-setup [ - ] cron [ ? ] cryptdisks [ ? ] cryptdisks-early [ - ] dbus [ - ] hostname.sh [ ? ] hwclock.sh [ + ] irqbalance [ + ] iscsid [ - ] keyboard-setup.dpkg-bak [ - ] killprocs [ - ] kmod [ - ] lvm2 [ + ] lvm2-lvmetad [ + ] lvm2-lvmpolld [ - ] lxcfs [ - ] lxd [ - ] mdadm [ - ] mdadm-waitidle [ - ] mountall-bootclean.sh [ - ] mountall.sh [ - ] mountdevsubfs.sh [ - ] mountkernfs.sh [ - ] mountnfs-bootclean.sh [ - ] mountnfs.sh [ + ] mysql [ ? ] networking [ - ] nfs-kernel-server [ ? ] ondemand [ + ] open-iscsi [ - ] open-vm-tools [ + ] php7.1-fpm [ ? ] plymouth [ ? ] plymouth-log [ - ] procps [ - ] rc.local [ + ] resolvconf [ - ] rpcbind [ - ] rsync [ - ] rsyslog [ - ] screen-cleanup [ - ] sendsigs [ - ] ssh [ + ] tftpd-hpa [ - ] udev [ - ] ufw [ - ] umountfs [ - ] umountnfs.sh [ - ] umountroot [ - ] unattended-upgrades [ - ] urandom [ - ] uuidd [ + ] vsftpd [ - ] xinetd
As you can see FOGTaskScheduler is no registered Service.
Is the PXE Services started with TFTP?
What about RPC Bind and NFS Server, howto start em?
@Wayne-Workman well wayne i don’t want to use this productive, just a try to waste a bunch of time
root@x23i7:/home# ./startFOG.sh * Starting Apache httpd web server apache2 [Mon Apr 17 15:23:48.994516 2017] [core:warn] [pid 43] (92)Protocol not available: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT [Mon Apr 17 15:23:48.994953 2017] [core:warn] [pid 43] (92)Protocol not available: AH00076: Failed to enable APR_TCP_DEFER_ACCEPT * * Starting MySQL database server mysqld No directory, logging in with HOME=/ [ OK ] * Starting FTP server vsftpd [ OK ] * Starting HPA's tftpd in.tftpd [ OK ] * Starting internet superserver xinetd [ OK ] * Starting FOG Computer Imaging Solution: FOGMulticastManager [ OK ] * Starting FOG Computer Imaging Solution: FOGImageReplicator [ OK ] * Starting FOG Computer Imaging Solution: FOGSnapinReplicator [ OK ] FOGTaskScheduler: unrecognized service * Starting FOG Computer Imaging Solution: FOGPingHosts [ OK ] * Starting FOG Computer Imaging Solution: FOGSnapinHash [ OK ] * Starting FOG Computer Imaging Solution: FOGImageSize [ OK ] root@x23i7:/home# service FOGTaskScheduler start FOGTaskScheduler: unrecognized service root@x23i7:/home#
What the hell taskscheduler is not a serivce?
Howto start the tftp like it started after foginstall.sh was running?
it’s not service xinetd start, maybe service tftpd-hpa start?
You are ahead of us. The list there looks good enough to start with. FOG was designed to run on Linux - so you’ll just need to write your own scripts for starting everything up. The commands on Ubuntu 16.04 to start/stop services are just
systemctl start blahAlso, pretty cool that you got this going! I’ll stick with my Linux though