Checking Letsencrypt Certificates Dates

certbot certificates | grep "Certificate Name\|Expiry Date"

<span title='2020-03-22 12:23:31 +0200 +0200'>March 22, 2020</span>&nbsp;·&nbsp;wiki@snet.at

Show me all Block devices without the Partition definitions

lsblk -n -o NAME,TYPE | awk '$2 == "disk" {print $1}' | grep -v '[z].*$'

<span title='2019-07-16 14:35:42 +0200 CEST'>July 16, 2019</span>&nbsp;·&nbsp;wiki@snet.at

Backup before edit

export EDITOR=vi; if [ -f "$1" ]; then cp $1{,@"$(date +%Y%m%y_%H%M%S)"}; $EDITOR $1; fi

<span title='2018-12-24 13:37:19 +0200 +0200'>December 24, 2018</span>&nbsp;·&nbsp;wiki@snet.at

32 or 64

getconf LONG_BIT

<span title='2017-01-12 13:40:48 +0200 +0200'>January 12, 2017</span>&nbsp;·&nbsp;dev@snet.at

Boot WinPE From Linux PXE Server

The information in this article may be outdated. Download WAIK Automated Installation Kit (AIK) for Windows Vista SP1 and Windows Server 2008 and install. Create and execute mkWinPE.cmd “C:\Program Files\Windows AIK\Tools\x86\imagex.exe” /unmount /commit c:\winpe_x86\mount if exist c:\WinPE_x86 rd c:\WinPE_x86 /S /Q md c:\WinPE_x86 md c:\WinPE_x86\ISO md c:\WinPE_x86\mount if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\bootmgr” copy “C:\Program Files\Windows AIK\Tools\PETools\x86\bootmgr” “c:\WinPE_x86\ISO” if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\bootmgr.efi” copy “C:\Program Files\Windows AIK\Tools\PETools\x86\bootmgr.efi” “c:\WinPE_x86\ISO” if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com”copy “C:\Program Files\Windows AIK\Tools\PETools\x86\boot\etfsboot.com” “c:\WinPE_x86” if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\boot\efisys.bin” copy “C:\Program Files\Windows AIK\Tools\PETools\x86\boot\efisys.bin” “c:\WinPE_x86” if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\boot” xcopy /cherky “C:\Program Files\Windows AIK\Tools\PETools\x86\boot” “c:\WinPE_x86\ISO\boot\” if exist “C:\Program Files\Windows AIK\Tools\PETools\x86\EFI” xcopy /cherky “C:\Program Files\Windows AIK\Tools\PETools\x86\EFI” “c:\WinPE_x86\ISO\EFI\” copy “C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim” “c:\WinPE_x86\winpe.wim” copy “C:\Program Files\Windows AIK\Tools\PETools\x86\winpe.wim” “c:\WinPE_x86\ISO\sources\boot.wim” if exist c:\tftpboot rd c:\tftpboot /S /Q md c:\tftpboot md c:\tftpboot\Boot md c:\tftpboot\Boot\Fonts bcdedit -createstore c:\tftpboot\Boot\BCD Bcdedit /store c:\tftpboot\Boot\BCD /create {ramdiskoptions} /d “Ramdisk options” bcdedit /store c:\tftpboot\Boot\BCD /set {ramdiskoptions} ramdisksdidevice boot bcdedit /store c:\tftpboot\Boot\BCD /set {ramdiskoptions} ramdisksdipath \Boot\boot.sdi for /f “Tokens=3” %%i in (‘bcdedit /store c:\tftpboot\Boot\BCD /create /d “WinPE 2.0” /application osloader’) do set GUID=%%i bcdedit /store c:\tftpboot\Boot\BCD /set %GUID% systemroot \Windows bcdedit /store c:\tftpboot\Boot\BCD /set %GUID% detecthal Yes bcdedit /store c:\tftpboot\Boot\BCD /set %GUID% winpe Yes bcdedit /store c:\tftpboot\Boot\BCD /set %GUID% osdevice ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions} bcdedit /store c:\tftpboot\Boot\BCD /set %GUID% device ramdisk=[boot]\Boot\winpe.wim,{ramdiskoptions} bcdedit /store c:\tftpboot\Boot\BCD /create {bootmgr} /d “WinPE 2.0” bcdedit /store c:\tftpboot\Boot\BCD /set {bootmgr} timeout 1 bcdedit /store c:\tftpboot\Boot\BCD /set {bootmgr} displayorder %GUID% bcdedit /store c:\tftpboot\Boot\BCD “C:\Program Files\Windows AIK\Tools\x86\imagex.exe” /mountrw c:\WinPE_x86\winpe.wim 1 c:\WinPE_x86\mount “c:\Program Files\Windows AIK\Tools\PETools\peimg.exe” /install=WinPE-HTA-Package c:\winpe_x86\mount\Windows “c:\Program Files\Windows AIK\Tools\PETools\peimg.exe” /install=WinPE-MDAC-Package c:\winpe_x86\mount\Windows “c:\Program Files\Windows AIK\Tools\PETools\peimg.exe” /install=WinPE-Scripting-Package c:\winpe_x86\mount\Windows “c:\Program Files\Windows AIK\Tools\PETools\peimg.exe” /install=WinPE-XML-Package c:\winpe_x86\mount\Windows imagex /unmount c:\WinPE_x86\mount /commit copy c:\winpe_x86\mount\Windows\Boot\PXE\*.* c:\tftpboot\ copy “c:\Program Files\Windows AIK\Tools\PETools\x86\boot\boot.sdi” c:\tftpboot\ copy c:\winpe_x86\winpe.wim c:\tftpboot\ copy “c:\WinPE_x86\ISO\boot\fonts\wgl4_boot.ttf” c:\tftpboot\Boot\Fonts We need a DHCP and TFTP-Server apt-get install dhcp3-server tftpd-hpa edit /etc/dhcpd/dhcpd.conf host tftpclient { hardware ethernet [MAC-address of the PXE client]; fixed-address [IP-address of the PXE client]; filename “Boot/pxeboot.n12”; Edit the File /etc/default/tftpd-hpa RUN_DAEMON=”yes” OPTIONS=”-v -l -m /etc/default/tftpd.rules -s /tftpboot” Create /etc/default/tftpd.rules rg \\ / # Convert backslashes to slashes We also need the PXE Stack PXELINUX Edit the file “/tftpdboot/pxelinux.cfg/default” and add the following ...

<span title='2008-07-10 13:42:56 +0200 CEST'>July 10, 2008</span>&nbsp;·&nbsp;wiki@snet.at