vlmcsd-floppy.7.dos.txt 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. VLMCSD-FLOPPY(7) KMS Activation Manual VLMCSD-FLOPPY(7)
  2. NAME
  3. floppy144.vfd - a bootable floppy disk with Linux and vlmcsd(8)
  4. DESCRIPTION
  5. floppy144.vfd is an image of a bootable floppy that contains a minimal
  6. version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri‐
  7. mary purpose is to run vlmcsd(8) in a small virtual machine which makes
  8. it easy to use vlmcsd(8) to activate the virtual machine's host com‐
  9. puter which is not possible in Windows 8.1 and up. The floppy image is
  10. a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
  11. FAT12 filesystem. The floppy can be mounted to apply several customiza‐
  12. tions.
  13. SUPPORTED HYPERVISORS
  14. The floppy image has been tested with the following hypervisors:
  15. VMWare, VirtualBox, Hyper-V and QEMU
  16. Others are likely to work.
  17. SETUP
  18. Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive
  19. and attach floppy144.vfd to this drive. Do not create a virtual hard
  20. disk. Setup the virtual machine to boot from a floppy drive (VirtualBox
  21. has floppy boot disabled by default). If possible, setup a virtual
  22. machine with plain old BIOS (not UEFI). If you created an UEFI virtual
  23. machine, enable the compatibility support mode (CSM) to allow a BIOS
  24. compatible boot. Set number of CPUs to 1. The Linux kernel is not capa‐
  25. ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
  26. Linux kernel can't handle this and ignores any devices connected to
  27. these buses.
  28. Setup an ethernet card. The following models are supported:
  29. Intel PRO/1000
  30. AMD PCNET III
  31. AMD PCNET32
  32. VMWare vmxnet3 (paravirtualized driver used by VMWare)
  33. virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and
  34. lguest)
  35. Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
  36. Selecting a paravirtualized driver slightly improves performance. In
  37. VirtualBox you can simply select virtio in the network configuration
  38. dialog. VMWare requires that you add or change the VMX file. Use 'eth‐
  39. ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
  40. If you are using QEMU, you must also setup a TAP adapter. Port redi‐
  41. rection does not work to activate your own computer.
  42. CONFIGURATION
  43. floppy144.vfd can be customized to fit your needs. This is done by
  44. editing the file syslinux.cfg on the floppy image. The floppy image
  45. must be mounted. Under Linux you can simply attach floppy144.vfd to a
  46. loop device which is mountable like any other block device. For Windows
  47. you must use some software that allows mounting a floppy image, e.g.
  48. OSFMount ⟨http://www.osforensics.com/tools/mount-disk-images.html⟩
  49. OSFMount works under all Windows versions beginning with Windows XP up
  50. to Windows 10 (32- and 64-bit).
  51. The default syslinux.cfg file looks like this:
  52. prompt 0
  53. TIMEOUT 50
  54. default dhcp
  55. LABEL dhcp
  56. KERNEL bzImage
  57. APPEND vga=773 quiet initrd=initrd KBD=us LIS‐
  58. TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
  59. NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
  60. USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
  61. INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016
  62. OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016
  63. OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016
  64. HWID=36:4F:46:3A:88:63:D3:5F
  65. LABEL static
  66. KERNEL bzImage
  67. APPEND vga=773 quiet initrd=initrd KBD=fr LIS‐
  68. TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
  69. IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE‐
  70. WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
  71. NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
  72. USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
  73. INETD=Y
  74. There are two configurations in this files: dhcp (for configuring the
  75. IPv4 network via DHCP) and static (for a static IPv4 configuration).
  76. The kernel always boots the dhcp configuration without asking (lines
  77. 'prompt 0' and 'default dhcp'). You can simply change the default con‐
  78. figuration to static and then customize the APPEND line in the static
  79. configuration. For more details how to customize the syslinux.cfg file
  80. see syslinux(1).
  81. Each APPPEND line contains one or more items seperated by spaces. All
  82. items are case-sensitive. The following parameters can be customized:
  83. vga=vesa-video-mode
  84. Sets the VESA display mode for the virtual machine. The parame‐
  85. ter is not optional. If you ommit it, you will not see anything
  86. on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
  87. ⟨https://en.wikipedia.org/wiki/
  88. VESA_BIOS_Extensions#Linux_video_mode_numbers⟩ for more video
  89. modes. Note that all 16 color (4-bit) modes will not work. Use
  90. 8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
  91. 16 Million colors) only. All modes above 1280x1024 are non-VESA-
  92. standard and vary for all (virtual) graphic cards.
  93. quiet This causes the kernel not display the its log during boot. You
  94. may omit quiet but it doesn't make much sense. The boot log is
  95. actually very verbose and scrolls away from screen quickly. If
  96. any errors occur during boot, they will be displayed even if
  97. quiet is present in the APPEND line. You may evaluate the com‐
  98. plete boot log later by using the dmesg command or the menu on
  99. /dev/tty8.
  100. initrd=initial-ram-disk-file
  101. This defines the initial ram disk that the kernel will read.
  102. There is only one initial ram disk on the floppy thus leave ini‐
  103. trd=initrd as it is.
  104. KBD=keyboard-layout-name
  105. This allows you to select the keyboard layout. keyboard-layout-
  106. name is usually the ISO 3166-1 (top level domain) code for a
  107. country. A list of valid keyboard-layout-names can be accessed
  108. via the menu system on /dev/tty8 (press ALT-F8). Note, that this
  109. is a keyboard driver only. There is no Unicode font support in
  110. floppy144.vfd (due to the fact that the kernel uses a generic
  111. VESA framebuffer device only). Characters beyond ASCII work for
  112. Western European languages only but not Eastern European, Greek,
  113. Cyrillic, Arabic, Hebrew, CJK and other languages. There is no
  114. need in floppy144.vfd to enter any characters outside ASCII. The
  115. purpose of the keyboard maps are that you will find characters
  116. like dash, backslash, brackets, braces, etc. at the usual place
  117. on your keyboard.
  118. LISTEN=PRIVATE[:tcp-port] | ip-address[:tcp-port][,ip-address[:tcp-
  119. port]][,...]
  120. One or more combinations of IP addresses and optional TCP port
  121. seperated by commas that vlmcsd(8) should listen on or PRIVATE
  122. to listen on all private IP addresses only. The default port is
  123. 1688. If you use an explicit port number, append it to the IP
  124. address seperated by a colon. If you use a port number and the
  125. IP address contains colons, you must enclose the IP address in
  126. brackets. For example 192.168.0.2,[fd00::dead:beef]:5678 causes
  127. vlmcsd(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef
  128. port 5678.
  129. WINDOWS=epid
  130. Defines the ePID that is used for Windows activations. If you
  131. ommit this parameter, vlmcsd generates a random ePID when it is
  132. started.
  133. OFFICE2010=epid
  134. Defines the ePID that is used for Office 2010 activations. If
  135. you ommit this parameter, vlmcsd(8) generates a random ePID when
  136. it is started.
  137. OFFICE2013=epid
  138. Defines the ePID that is used for Office (versions 2013 and
  139. greater) activations. If you ommit this parameter, vlmcsd(8)
  140. generates a random ePID when it is started.
  141. HWID=hwid
  142. Defines the HwId that is sent to clients. hwid must be specified
  143. as 16 hex digits that are interpreted as a series of 8 bytes
  144. (big endian). Any character that is not a hex digit will be
  145. ignored. This is for better readability.
  146. TZ=posix-time-zone-string
  147. Set the time zone to posix-time-zone-string. It must conform to
  148. the POSIX ⟨http://pubs.opengroup.org/onlinepubs/009695399/
  149. basedefs/xbd_chap08.html⟩ specification. Simplified time zone
  150. strings like "Europe/London" or "America/Detroit" are not
  151. allowed. This has the very simple reason that there is no space
  152. on the floppy to store the time zone database.
  153. The string CET-1CEST,M3.5.0,M10.5.0/3 (most countries in Europe)
  154. reads as follows:
  155. CET The standard (winter) time zone has the name CET.
  156. -1 The standard time zone is one hour east of UTC. Nega‐
  157. tive numbers are east of UTC. Positive numbers are
  158. west of UTC.
  159. CEST The daylight saving (summer) time zone has the name
  160. CEST.
  161. M3.5.0 Daylight saving time starts in the 3rd month (March)
  162. on the 5th (=last) occurence of weekday 0 (Sunday) at
  163. 2 o'clock (2 o'clock is a default value).
  164. M10.5.0/3 Daylight saving time ends in the 10th month (October)
  165. on the 5th (=last) occurence of weekday 0 (Sunday) at
  166. 3 o'clock.
  167. If you don't have daylight saving time, things are easier. For
  168. Chinese Standard Time for example, just use CST-8 as the time
  169. zone string.
  170. On a Linux desktop system, you can use a command like
  171. strings /usr/share/zoneinfo/America/New_York | tail -n1. This
  172. should return EST5EDT,M3.2.0,M11.1.0. You can use the returned
  173. string for the TZ=posix-time-zone-string parameter.
  174. IPV4_CONFIG=DHCP | STATIC
  175. This determines how you want to configure IPv4 networking. If
  176. you use IPV4_CONFIG=STATIC, you must supply additional para‐
  177. maters to the APPEND command line.
  178. IPV4_ADDRESS=ipv4-address/CIDR-mask
  179. Use ipv4-address with netmask CIDR-mask for static IPv4 configu‐
  180. ration. The netmask must not be ommitted. For IPv4 address
  181. 192.168.12.17 with a netmask of 255.255.255.0 use
  182. 192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
  183. 255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you
  184. used IPV4_CONFIG=DHCP.
  185. IPV4_GATEWAY=ipv4-address | NONE
  186. Use ipv4-address as the default gateway. This is usually the
  187. IPv4 address of your router. You may specify NONE explicitly for
  188. no gateway. In this case your virtual machine is only visible on
  189. its local LAN. This paramater is ignored, if you used IPV4_CON‐
  190. FIG=DHCP.
  191. IPV4_DNS1=ipv4-address | NONE
  192. Use ipv4-address as the primary name server. In home networks
  193. this is often the IPv4 address of your router. You may specify
  194. NONE explicitly. If you specified NONE for both IPV4_DNS1= and
  195. IPV4_DNS2=, your virtual machine cannot resolve host names to IP
  196. addresses. While vlmcsd(8) works perfectly without DNS servers,
  197. you must use IP addresses when referring to a host, e.g. for
  198. specifying an NTP server. This paramater is ignored, if you used
  199. IPV4_CONFIG=DHCP.
  200. IPV4_DNS2=ipv4-address | NONE
  201. Use ipv4-address as the secondary name server. It serves as a
  202. backup if the primary name server is not available. Home net‐
  203. works often don't have a secondary name server. In this case set
  204. this to NONE. This paramater is ignored, if you used IPV4_CON‐
  205. FIG=DHCP.
  206. NTP_SERVER=host-name | ipv4-address | NONE
  207. This sets the name of a time server using the NTP protocol. If
  208. your virtualization environment reliably provides time, you can
  209. set this to NONE. Don't use a public time service like
  210. pool.ntp.org or time.nist.gov if you have a (at least somewhat
  211. reliable) NTP server in your LAN.
  212. HOST_NAME=host-name
  213. Sets the local host name for your virtual machine. It can be a
  214. single name or a fully-qualified domain name FQDN. If you used
  215. IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
  216. domain part of an FQDN will be replaced by that name. This host
  217. name or host part of an FQDN will not replaced by a host name
  218. returned via DHCP. The host name is not important for the opera‐
  219. tion of floppy144.vfd.
  220. ROOT_PASSWORD=password
  221. Sets the password of the root user.
  222. USER_NAME=username
  223. Sets the name of for a general user with no special privileges.
  224. This user can login but can't do much.
  225. USER_PASSWORD=password
  226. Sets the password for the user defined by USER_NAME=username.
  227. GUEST_PASSWORD=password
  228. Sets the password for the pre-defined guest user. This user has
  229. the same priviliges (none) as the user defined by
  230. USER_NAME=username.
  231. INETD=Y | N
  232. INETD=Y specifies that inetd(8) should automatically be started.
  233. That means you can telnet and ftp to your virtual machine.
  234. OPERATION
  235. Diskless System
  236. The floppy144.vfd virtual machine is a diskless system that works
  237. entirely from RAM. The file system is actually a RAM disk that is cre‐
  238. ated from the initrd(4) file on the floppy image.
  239. Anything you'll do from inside the virtual machine, for instance edit‐
  240. ing a config file, will be lost when you reboot the machine. So, if you
  241. ever asked yourself if rm -fr / (root privileges required) really
  242. deletes all files from all mounted partitions, the floppy144.vfd VM is
  243. the right place to test it (Yes, it does).
  244. The VM uses a RAM disk, because the Linux kernel had to be stripped
  245. down to essential features to fit on a 1.44 MB floppy. It has no floppy
  246. driver, no disk file system drivers and no block layer (cannot use
  247. disks of any type).
  248. System startup
  249. The kernel boots up very quickly and the init script (/sbin/init) waits
  250. 5 seconds. In these 5 seconds you can:
  251. Press 'm' to manually enter the time zone and the IPv4 parame‐
  252. ters. These will be queried interactively.
  253. Press 't' to manually enter the time zone only.
  254. Press 's' to escape to a shell.
  255. If you don't want to 5 seconds for continuing the init process, you can
  256. press any other key to speed things up. At the end of the init script
  257. you should see thatvlmcsd(8) has started. You should also see the IP
  258. addresses and all user names and passwords.
  259. Logging into the system
  260. There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
  261. to these logins, simply press ALT-F2 to ALT-F6. To return to the con‐
  262. sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
  263. use telnet(1). This allows you use a terminal program (e.g. putty) that
  264. can utilize your keyboard layout, can be resized and has full UTF-8
  265. support. The local terminals support US keyboard layout only. Please be
  266. aware that telnet(1) is unencrypted and everything including passwords
  267. is transmitted in clear text. There is not enough space for an ssh
  268. server like sshd(8) or dropbear(8).
  269. The floppy image only provides basic Unix commands. Type busybox or ll
  270. /bin to get a list. The only editor available is vi(1). If you don't
  271. like vi, you may transfer config files via ftp(1) edit them with the
  272. editor of your choice and transfer them back to the floppy144.vfd VM.
  273. The menu system
  274. You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
  275. allows you performing some administrative tasks and to view various
  276. system information. It is mainly for users that do not have much expe‐
  277. rience with Unix commands.
  278. 1) (Re)start vlmcsd
  279. Starts or restarts vlmcsd(8). This is useful if you changed
  280. /etc/vlmcsd.ini(5).
  281. 2) Stop vlmcsd
  282. Stops vlmcsd(8).
  283. 3) (Re)start inetd
  284. Starts or restarts inetd(8). If inetd(8) is restarted, current
  285. clients connected via telnet(1) or ftp(1) will not be dropped.
  286. They can continue their sessions. This is useful if you changed
  287. /etc/inetd.conf(5).
  288. 4) Stop inet
  289. Stops inetd(8). All clients connected via telnet(1) or ftp(1)
  290. will be dropped immediately.
  291. 5) Change the time zone
  292. Just in case you missed pressing 't' during system startup. This
  293. also restarts vlmcsd(8) if it was running to notify it that the
  294. time zone has changed. Restarting vlmcsd(8) allows currently
  295. connected clients to finish their activation.
  296. k) Change keyboard layout
  297. This allows you to select a different keyboard layout.
  298. 6) Show all kernel boot parameters
  299. Shows all parameters passed to the kernel via syslinux.cfg. If
  300. you experience any unexpected behavior, you can use this to
  301. check if your APPEND line in syslinux.cfg is correct. The output
  302. is piped through less(1). So press 'q' to return to the menu.
  303. 7) Show boot log (dmesg)
  304. Shows the boot log of the kernel. The output is piped through
  305. less(1). So press 'q' to return to the menu.
  306. 8) Show TCP/IP configuration
  307. Shows the TCP/IP configuration, listening sockets and current
  308. TCP and UDP connections. Useful, if you problems with net con‐
  309. nectivity. The output is piped through less(1). So press 'q' to
  310. return to the menu.
  311. 9) Show running processes
  312. Shows all processes including memory and CPU usage. Display will
  313. updated every second. Press 'q' or CTRL-C to return to the menu.
  314. s) Shutdown
  315. Shuts down the floppy144.vfd virtual machine. Proper shutdown is
  316. not required. It is ok to use a hard power off in your virtual‐
  317. ization program.
  318. r) Reboot
  319. Reboots the floppy144.vfd virtual machine. Proper reboot is not
  320. required. It is ok to use a hard reset in your virtualization
  321. program.
  322. PERMANENT CHANGES OF INITRD
  323. If you want to change any file or script of the file system (e.g. the
  324. init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the
  325. floppy image, unpack the initrd(4) file, make any modfications you
  326. like, create a new initrd(4) file and copy it to the mounted floppy.
  327. To unpack the initrd(4) file you'll need xz(1) (or lzma(1) on older
  328. unix-like OSses) and cpio(1). These can be installed using your package
  329. manager on all major distros. It is ok to use the BSD version of
  330. cpio(1). No need to get the GNU version for BSD users. Provided the
  331. floppy is mounted in /mnt/floppy do the following:
  332. Create an empty directory
  333. mkdir ~/vlmcsd-floppy-initrd
  334. cd into that directory
  335. cd ~/vlmcsd-floppy-initrd
  336. Unpack initrd
  337. cat /mnt/floppy/initrd | unlzma | cpio -i
  338. After applying your changes build a new initrd(4) file:
  339. cd into your directory
  340. cd ~/vlmcsd-floppy-initrd
  341. Create the packed file
  342. find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
  343. Do not try to use 'lzma -9' to achive better compression. The kernel
  344. can't read the resulting file. While customizing the initrd(4) file
  345. works on almost any unix-like OS, it does not work on Windows even not
  346. with Cygwin. The reason is that the NTFS file system can't handle uids
  347. and gids. These cannot be preserved when unpacking the cpio(1) archive
  348. to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver‐
  349. sary Update) and later, you must make sure to unpack the initrd(4) file
  350. to a directory on VolFs (normally everything that is not mounted under
  351. /mnt). The initrd(4) file can be on a VolFs or DriveFs.
  352. FAQ
  353. On what distro is the floppy image based?
  354. None. Besides the boot loader ldlinux.sys, there are only three bina‐
  355. ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
  356. static. bzImage and busybox(1) have been compiled with carefully
  357. selected configuration parameters not found in any distro. This was
  358. neccesary to fit everything on a 1.44 MB floppy.
  359. Why is a rather old Linux kernel (3.12) used?
  360. Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
  361. Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
  362. boot. The floppy image is regularly tested with newer kernels. Every‐
  363. thing works except that you need to assign much more main memory to the
  364. virtual machine.
  365. Can the floppy be booted on bare metal?
  366. Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet
  367. cards are supported by the kernel. In addition there is no USB support
  368. compiled into the kernel. That means you can only use an IBM AT or IBM
  369. PS/2 keyboard which are not available on newer hardware.
  370. FILES
  371. syslinux.cfg, vlmcsd.ini(5)
  372. BUGS
  373. IPv6 cannot be configured with static or manual parameters.
  374. DHCPv6 is not supported.
  375. ´ip route add ...' does not work. Use 'route add ...' instead.
  376. AUTHOR
  377. floppy144.vfd has been created by Hotbird64
  378. CREDITS
  379. Linus Torvalds et al. for the Linux kernel
  380. Erik Andersen et al. for the original uClibc
  381. Waldemar Brodkorb et al. for uClibc-ng
  382. Denys Vlasenko et al. for BusyBox
  383. H. Peter Anvin et al. for SYSLINUX
  384. SEE ALSO
  385. vlmcsd(8), vlmcsd.ini(5), initrd(4), busybox(1), syslinux(1)
  386. Hotbird64 June 2016 VLMCSD-FLOPPY(7)