User Tools

Site Tools


Operating systems

Creating a bootable flashdrive

On Windows

Linux or Windows images

Rufus - Rufus usually has no problem working with Linux and Windows ISOs and is easy to work with. The only negative thing is that I didn't figure out how to make ISOs that boot both under BIOS and UEFI, only one or the other, which is selected under the “Partition scheme” label.

You want to use “GPT for UEFI” partition scheme unless your hardware is years and years old.

unetbootin - Sometimes certain Linux distributions fail to be used by Rufus

On Linux and macOS

macOS has some command name differences not mentioned here, but the general idea works still.

Linux images

Unebootin or dd can be used for this purpose, I chose to use dd because it's preinstalled and straightforward.

Make sure to run lsblk to know what device you should be dealing with.

umount /dev/sde1 - Unmount the device in case it's mounted

sudo dd if=/path/to/file.iso of=/dev/sde bs=4M status=progress && sync

You should now be able to boot the distribution in both BIOS and UEFI, if the distribution supports it.

Windows images

Below is a description of the manual process, however you can use WoeUSB for an automated one.

1 2

Format the flash drive with Gparted - Device > Create partition table - Set partition table to msdos. Afterwards create a FAT32 partition, remember to label it, labeling it is optional if you only want to keep only one OS on the flash drive but probably required for more.

Right click the partition you created > Manage flags > tick the 'boot' flag. Exit gparted.

Mount the ISO you want to use to some already existing folder

sudo mount -o loop ~/Downloads/Win8.1Englishx64.iso /mnt/iso

and copy all files from it to the mounted flash drive. The exclude is there to support Win10 1809+ images which have over 4GB install.wim which needs to be split:

rsync -rv --progress --exclude=install.wim /mnt/iso/ /run/media/c0rn3j/WINDOWS/

wimsplit /mnt/iso/sources/install.wim /run/media/c0rn3j/WINDOWS/sources/install.swm 3000

At this point the flash drive should be UEFI bootable. You're likely done here, but if you have a very old machine, the rest is needed to also enable BIOS booting.

Also you should create a file ei.cfg in the sources folder with following content(it makes sure you can actually select the edition):


sudo grub-install --target=i386-pc --boot-directory=/run/media/c0rn3j/WINDOWS/boot /dev/sdd - This command will install GRUB bootloader on the flash drive.

Last thing you'll need to do is create a config file for GRUB.

gedit /run/media/c0rn3j/WINDOWS/boot/grub/grub.cfg - This command will run gedit, paste the following text block in it and save it. Remove the label part if you didn't set one.

menuentry "Start Windows Installation" {
    insmod ntfs
    insmod search_label
    search --no-floppy --set=root --label WINDOWS --hint hd0,msdos1
    ntldr /bootmgr

The flash drive should now be bootable by both UEFI and BIOS.

KON-BOOT images

Format the flash drive with Gparted - Device > Create partition table - Set partition table to msdos. Afterwards create a FAT32 partition, remember to label it.

Copy the EFI folder onto the new partition.(you may need to rename it to lowercase efi?) Copy the files in USBFILES folder onto the new partition.

sudo grub-install –target=i386-pc –boot-directory=/run/media/c0rn3j/KONBOOT/boot /dev/sdd - This command will install GRUB bootloader on the flash drive.

sudo cp /usr/lib/syslinux/bios/memdisk /run/media/c0rn3j/KONBOOT/boot/grub/ - copies memdisk onto the flashdrive - needed for BIOS booting.

gedit /run/media/c0rn3j/KONBOOT/boot/grub/grub.cfg - create the following grub entry

 menuentry "Konboot" {
 linux16 /boot/grub/memdisk
 initrd16 /konboot.img

Note: Konboot v2.5 does not seem to work on anything past the first W10 RTM build.

Using Android to emulate mass storage

This can be used to boot OS images off of your phone instead off a flash drive.

Usb Mountr

You need root.

Your kernel might support emulating USB, emulating CD drive or both.

Managing partitions

Windows: Disk Management, EASEUS Partition Master(paid)

Linux: parted, gparted, fdisk, cfdisk, sfdisk

You can also manage partitions from within the install media of both Windows and Arch Linux without having a working OS installed.


# Activate Office 2019 Pro Plus
cd 'C:\Program Files\Microsoft Office\Office16'
cscript ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
cscript ospp.vbs /sethst:
cscript ospp.vbs /act

 # W10 Pro
 slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
 # W10 Edu 
 slmgr /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
 # Set KMS server to a LAN one
 slmgr /skms
 # Force activation now
 slmgr /ato
 # What does this do?
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v SilentInstalledAppsEnabled /t REG_DWORD /d 0 /f
 # What does this do?
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /f
 # What does this do?
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v SoftLandingEnabled /t REG_DWORD /d 0 /f
 # What does this do?
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager /v SubscribedContent-310093Enabled /t REG_DWORD /d 0 /f
 # Show file extensions
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v HideFileExt /t REG_DWORD /d 0 /f
 # What does this do?
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v LaunchTo /t REG_DWORD /d 1 /f
 # Do not hide tray items when they get cluttered(? not sure)
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer /v EnableAutoTray /t REG_DWORD /d 0 /f
 # Take searchbar off the taskbar
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Search /v SearchboxTaskbarMode /t REG_DWORD /d 0 /f
 # Hide Task View button
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v ShowTaskViewButton /t REG_DWORD /d 0 /f
 # Hide People button
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
 # Show hidden files
 reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v Hidden /t REG_DWORD /d 1 /f
 # Show system hidden files
 #reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /v ShowSuperHidden /t REG_DWORD /d 1 /f
 # What does this do?
 reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
 # Delete all taskbar shorcuts to get rid of Edge, Store and more
 reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband /v Favorites /f
 # Kill and restart explorer.exe to apply most changes right now
 taskkill /f /im explorer.exe
 Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
 Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(''))
 choco install -y mumble googlechrome notepadplusplus 7zip crystaldiskmark crystaldiskinfo keepassxc sharex openssh telegram windirstat jre8 everything teamviewer smplayer hwinfo qbittorrent
 # Alternatively do a minimal install
 choco install -y googlechrome notepadplusplus 7zip sharex openssh telegram windirstat everything smplayer 


You can download latest .ISO of Win 10, 8.1 and 7 directly from Microsoft's servers. The W10 ISO contains both Home and Pro edition which you get to choose during installation. If you want to install a W8.1/7 version that is not available directly from MS, you could possibly (ab)use the …/sources/ei.cfg file to change installed version that is going to be installed.

You can download older versions of windows and different versions of W10 through this method

If you want something like Enterprise versions and such you'll have to resort to torrenting them and THEN CHECKING THE HASHES provided by Microsoft.

Windows 10 Installation

If you want to dual-boot with Arch already installed, just install it on an unallocated “partition”. Windows install alone usually takes some 20~GB.

Boot from the flash drive. Remember to always select “Custom” where applicable and “skip” when you get a prompt for creating Microsoft account.

Windows usually gets all the drivers itself, but if something doesn't work as it should you might need to visit your motherboard or device manufacturer's website and download drivers.

Windows usually downloads outdated GPU driver so head over to AMD's or Nvidia's website depending on what GPU you have and download according driver.

If you already have or had a W10 license, then your hardware ID combination(should be motherboard+CPU) is stored at Microsoft's servers and your license will be obtained automatically when you connect to the internet, provided you installed the same W10 version.

If you don't have a W10 license you can either:

1) Buy a license key from official source. Buying from unofficial sources/grey markets is exactly as illegal as cracking it. You'd be literally giving your money away to thieves. The keys are from hacked MSDN accounts, credit card frauds etc.

2) If you're in college or some sort of academic institute, they might have MSDN licenses, see if you can find a copy from their IT department.

3) Not activate W10 - you will not be able to use Personalization features and it'll nag you

4) Permanently activate via HWIDGEN mk3 which gives you a W10 pro license tied to your motherboard+CPU.

5) Activate W10 with KMSpico. Defender will bitch about it, allow it manually in Defender after installing it. Alternatively you can use vlmcsd if you want an open source, more hardcore solution.



Since I'm using Arch Linux this page will be focused on Arch.

You can download Arch here

Basic commands and usage

Before going through the install guide you really should know these.

Lower/upper case is important in linux.

You can use arrow keys to navigate through your previous commands.

CTRL+ALT+F1-F12 - key combination for switching between terminals

cd DIRECTORY - for example cd /home/baf/Downloads - chooses directory

nano FILE - edit a text file

CTRL + C - break from a command, for example a ping

lsblk - lists all your drives and their partitions.

elinks - tool you can use to view webpages from the CLI

irssi - IRC in the CLI in case you get lost, #archlinux on freenode should help you out if you ask nicely.

Installing GPU proprietary drivers


sudo nano /etc/pacman.conf - uncomment [multilib] and the line below it. This is required for 32bit applications.

sudo pacman -Syu - synchronize the repository databases and update the system's packages

sudo pacman -S nvidia nvidia-libgl lib32-nvidia-libgl nvidia-settings



Do not use Catalyst. If you think you have to, rather get another GPU.

Table of hardware with needed drivers is here.

Installing packages from AUR

You can download user created PKGBUILDs from AUR.

Package managers


Usage: tldr pacman + the rest of this page:

-S has a useful --ignore packagename flag, which lets you ignore a broken package when doing a full update for example. Use multiple times when you want to avoid installing more packages. There's also a --noconfirm flag, which ignores confirmation of actions.

pacman -Qm - List packages installed locally.(that includes AUR)

You can get to the package cache via this command cd /var/cache/pacman/pkg/ and then use pacman -U packagename to downgrade/reinstall a package.

Useful tools and commands


Full(?) cheatsheet:

tmux running a session but list-sessions doesn't show it? This might help killall -s SIGUSR1 tmux

If you're running nested tmux sessions, explanation and tips how to do it efficiently. (CTRL+B twice to get into the second level session etc)

Command to detach all other sessions(in case the window is small and other session is blocking resizing): attach -d

Basic usage:

tmux - start new tmux session

tmux ls - list active sessions

tmux a -t sessionName - attach to specific session

tmux kill-session -t sessionName - kill specific session

Inside of tmux:

CTRL+B $ - rename session

CTRL+B d - detach session

CTRL+B % - split current pane vertically

CTRL+B “ - split current pane horizontally

CTRL+B ARROW_KEY - move between panes

CTRL+B+ARROW_KEY - resize current pane

CTRL+B z - toggle current pane fullscreen state

CTRL+B x - kill current pane

CTRL+B c - create a new window

CTRL+B n - next window

CTRL+B p - previous window

CTRL+B , - rename current window

operating_systems.txt · Last modified: 2019/06/02 16:41 by c0rn3j