A simple, zero-configuration script to quickly boot FreeBSD ISO images using QEMU

Update README for improved clarity and usage instructions

+54 -4
+54 -4
README.md
··· 11 11 - ๐Ÿ”— **Download and boot from URLs**: Automatically downloads ISO images from 12 12 remote URLs 13 13 - ๐Ÿ“ **Local file support**: Boot from local ISO files 14 + - ๐Ÿท๏ธ **Version shortcuts**: Simply specify a version like `14.3-RELEASE` to 15 + auto-download 16 + - ๐ŸŽฏ **Smart defaults**: Run without arguments to boot the latest stable release 17 + (FreeBSD 14.3-RELEASE) 14 18 - โšก **Zero configuration**: Works out of the box with sensible defaults 15 19 - ๐Ÿ–ฅ๏ธ **Serial console**: Configured for headless operation with stdio console 16 20 - ๐ŸŒ **Network ready**: Pre-configured with SSH port forwarding (host:2222 โ†’ 17 21 guest:22) 18 22 - ๐Ÿ’พ **Smart caching**: Automatically skips re-downloading existing ISO files 23 + - ๐Ÿ†˜ **Help support**: Built-in help with `--help` or `-h` flags 19 24 20 25 ## ๐Ÿ“‹ Prerequisites 21 26 ··· 50 55 51 56 ## ๐Ÿš€ Quick Start 52 57 53 - ### Boot from URL (Recommended) 58 + ### Default Usage (Easiest) 54 59 55 - Download and boot the latest FreeBSD release: 60 + Simply run without any arguments to boot the latest stable FreeBSD release: 61 + 62 + ```bash 63 + ./main.ts 64 + ``` 65 + 66 + This will automatically download and boot FreeBSD 14.3-RELEASE. 67 + 68 + ### Boot with Version Shortcut 69 + 70 + Specify just a version to auto-download and boot: 71 + 72 + ```bash 73 + ./main.ts 14.3-RELEASE 74 + ./main.ts 15.0-BETA3 75 + ./main.ts 13.4-RELEASE 76 + ``` 77 + 78 + ### Boot from URL 79 + 80 + Download and boot from a specific URL: 56 81 57 82 ```bash 58 83 ./main.ts https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/15.0/FreeBSD-15.0-BETA3-amd64-disc1.iso ··· 64 89 ./main.ts /path/to/your/freebsd.iso 65 90 ``` 66 91 92 + ### Get Help 93 + 94 + ```bash 95 + ./main.ts --help 96 + # or 97 + ./main.ts -h 98 + ``` 99 + 67 100 ### Alternative Execution Methods 68 101 69 102 If the script isn't executable, you can run it directly with Deno: 70 103 71 104 ```bash 72 - deno run --allow-run --allow-read --allow-env main.ts <iso-path-or-url> 105 + deno run --allow-run --allow-read --allow-env main.ts [options] 73 106 ``` 74 107 75 108 ## ๐Ÿ–ฅ๏ธ Console Setup ··· 94 127 - **Memory**: 2GB RAM 95 128 - **Cores**: 2 virtual CPUs 96 129 - **Network**: User mode networking with SSH forwarding 97 - - **Console**: Serial console via stdio 130 + - **Console**: Enhanced serial console via stdio with proper signal handling 131 + - **Default Version**: FreeBSD 14.3-RELEASE (when no arguments provided) 98 132 99 133 ## ๐Ÿ”ง Customization 100 134 ··· 110 144 "2G", // Change memory 111 145 "-smp", 112 146 "2", // Change CPU cores 147 + "-chardev", 148 + "stdio,id=con0,signal=off", // Enhanced console handling 149 + "-serial", 150 + "chardev:con0", 113 151 // ... other options 114 152 ], 115 153 // ... 116 154 }); 117 155 ``` 156 + 157 + ### Supported Version Formats 158 + 159 + The script automatically recognizes and handles these version formats: 160 + 161 + - `14.3-RELEASE` - Stable releases 162 + - `15.0-BETA3` - Beta versions 163 + - `13.4-RC1` - Release candidates 164 + - Any format matching: `X.Y-RELEASE|BETAX|RCX` 165 + 166 + To change the default version when no arguments are provided, modify the 167 + `DEFAULT_VERSION` constant in `main.ts`. 118 168 119 169 ## ๐Ÿ“ Project Structure 120 170