You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vlmcsd/man/vlmcsd-floppy.7.dos.txt

549 lines
25 KiB
Plaintext

VLMCSD-FLOPPY(7) KMS Activation Manual VLMCSD-FLOPPY(7)
NAME
floppy144.vfd - a bootable floppy disk with Linux and vlmcsd(8)
DESCRIPTION
floppy144.vfd is an image of a bootable floppy that contains a minimal
version of Linux and vlmcsd(8). It requires only 16 MB of RAM. Its pri-
mary purpose is to run vlmcsd(8) in a small virtual machine which makes
it easy to use vlmcsd(8) to activate the virtual machine's host com-
puter which is not possible in Windows 8.1 and up. The floppy image is
a standard 3,5" floppy with 1.44 MB storage. It is formatted with a
FAT12 filesystem. The floppy can be mounted to apply several customiza-
tions.
SUPPORTED HYPERVISORS
The floppy image has been tested with the following hypervisors:
VMWare, VirtualBox, Hyper-V and QEMU
Others are likely to work.
SETUP
Create a new virtual machine. Assign 16 MB of RAM. Add a floppy drive
and attach floppy144.vfd to this drive. Do not create a virtual hard
disk. Setup the virtual machine to boot from a floppy drive (VirtualBox
has floppy boot disabled by default). If possible, setup a virtual
machine with plain old BIOS (not UEFI). If you created an UEFI virtual
machine, enable the compatibility support mode (CSM) to allow a BIOS
compatible boot. Set number of CPUs to 1. The Linux kernel is not capa-
ble of SMP. Remove IDE, SATA, SCSI and USB support if possible. The
Linux kernel can't handle this and ignores any devices connected to
these buses.
Setup an ethernet card. The following models are supported:
Intel PRO/1000
AMD PCNET III
AMD PCNET32
VMWare vmxnet3 (paravirtualized driver used by VMWare)
virtio (paravirtualized driver used by VirtualBox, QEMU, KVM and
lguest)
Most hypervisors emulate an Intel PRO/1000 or AMD PCNET32 by default.
Selecting a paravirtualized driver slightly improves performance. In
VirtualBox you can simply select virtio in the network configuration
dialog. VMWare requires that you add or change the VMX file. Use 'eth-
ernet0.virtualDev = "vmxnet3"' in your VMWare config file.
If you are using QEMU, you must also setup a TAP adapter. Port redi-
rection does not work to activate your own computer.
CONFIGURATION
floppy144.vfd can be customized to fit your needs. This is done by
editing the file syslinux.cfg on the floppy image. The floppy image
must be mounted. Under Linux you can simply attach floppy144.vfd to a
loop device which is mountable like any other block device. For Windows
you must use some software that allows mounting a floppy image, e.g.
OSFMount <http://www.osforensics.com/tools/mount-disk-images.html>
OSFMount works under all Windows versions beginning with Windows XP up
to Windows 10 (32- and 64-bit).
The default syslinux.cfg file looks like this:
prompt 0
TIMEOUT 50
default dhcp
LABEL dhcp
KERNEL bzImage
APPEND vga=773 quiet initrd=initrd KBD=us LIS-
TEN=[::]:1688,0.0.0.0:1688 TZ=UTC0 IPV4_CONFIG=DHCP
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
INETD=Y WINDOWS=06401-00206-271-395032-03-1033-9600.0000-1652016
OFFICE2010=06401-00096-199-204970-03-1033-9600.0000-1652016
OFFICE2013=06401-00206-234-921934-03-1033-9600.0000-1652016
HWID=36:4F:46:3A:88:63:D3:5F
LABEL static
KERNEL bzImage
APPEND vga=773 quiet initrd=initrd KBD=fr LIS-
TEN=[::]:1688,0.0.0.0:1688 TZ=CET-1CEST,M3.5.0,M10.5.0/3
IPV4_CONFIG=STATIC IPV4_ADDRESS=192.168.20.123/24 IPV4_GATE-
WAY=192.168.20.2 IPV4_DNS1=192.168.20.2 IPV4_DNS2=NONE
NTP_SERVER=pool.ntp.org HOST_NAME=vlmcsd ROOT_PASSWORD=vlmcsd
USER_NAME=user USER_PASSWORD=vlmcsd GUEST_PASSWORD=vlmcsd
INETD=Y
There are two configurations in this files: dhcp (for configuring the
IPv4 network via DHCP) and static (for a static IPv4 configuration).
The kernel always boots the dhcp configuration without asking (lines
'prompt 0' and 'default dhcp'). You can simply change the default con-
figuration to static and then customize the APPEND line in the static
configuration. For more details how to customize the syslinux.cfg file
see syslinux(1).
Each APPPEND line contains one or more items seperated by spaces. All
items are case-sensitive. The following parameters can be customized:
vga=vesa-video-mode
Sets the VESA display mode for the virtual machine. The parame-
ter is not optional. If you ommit it, you will not see anything
on the screen. 773 means 1024x768 with 256 colors. See Wikipedia
<https://en.wikipedia.org/wiki/
VESA_BIOS_Extensions#Linux_video_mode_numbers> for more video
modes. Note that all 16 color (4-bit) modes will not work. Use
8-bit (256 colors), 16-bit (65536 colors), 24-bit and 32-bit (>
16 Million colors) only. All modes above 1280x1024 are non-VESA-
standard and vary for all (virtual) graphic cards.
quiet This causes the kernel not display the its log during boot. You
may omit quiet but it doesn't make much sense. The boot log is
actually very verbose and scrolls away from screen quickly. If
any errors occur during boot, they will be displayed even if
quiet is present in the APPEND line. You may evaluate the com-
plete boot log later by using the dmesg command or the menu on
/dev/tty8.
initrd=initial-ram-disk-file
This defines the initial ram disk that the kernel will read.
There is only one initial ram disk on the floppy thus leave ini-
trd=initrd as it is.
KBD=keyboard-layout-name
This allows you to select the keyboard layout. keyboard-layout-
name is usually the ISO 3166-1 (top level domain) code for a
country. A list of valid keyboard-layout-names can be accessed
via the menu system on /dev/tty8 (press ALT-F8). Note, that this
is a keyboard driver only. There is no Unicode font support in
floppy144.vfd (due to the fact that the kernel uses a generic
VESA framebuffer device only). Characters beyond ASCII work for
Western European languages only but not Eastern European, Greek,
Cyrillic, Arabic, Hebrew, CJK and other languages. There is no
need in floppy144.vfd to enter any characters outside ASCII. The
purpose of the keyboard maps are that you will find characters
like dash, backslash, brackets, braces, etc. at the usual place
on your keyboard.
LISTEN=PRIVATE[:tcp-port] | ip-address[:tcp-port][,ip-address[:tcp-
port]][,...]
One or more combinations of IP addresses and optional TCP port
seperated by commas that vlmcsd(8) should listen on or PRIVATE
to listen on all private IP addresses only. The default port is
1688. If you use an explicit port number, append it to the IP
address seperated by a colon. If you use a port number and the
IP address contains colons, you must enclose the IP address in
brackets. For example 192.168.0.2,[fd00::dead:beef]:5678 causes
vlmcsd(8) to listen on 192.168.0.2 port 1688 and fd00::dead:beef
port 5678.
WINDOWS=epid
Defines the ePID that is used for Windows activations. If you
ommit this parameter, vlmcsd generates a random ePID when it is
started.
OFFICE2010=epid
Defines the ePID that is used for Office 2010 activations. If
you ommit this parameter, vlmcsd(8) generates a random ePID when
it is started.
OFFICE2013=epid
Defines the ePID that is used for Office 2016 activations. If
you ommit this parameter, vlmcsd(8) generates a random ePID when
it is started.
OFFICE2016=epid
Defines the ePID that is used for Office 2016 activations. If
you ommit this parameter, vlmcsd(8) generates a random ePID when
it is started.
WINCHINAGOV=epid
Defines the ePID that is used for Windows China Government Edi-
tion activations (Enterprise G/GN). If you ommit this parameter,
vlmcsd(8) generates a random ePID when it is started.
HWID=hwid
Defines the HwId that is sent to clients. hwid must be specified
as 16 hex digits that are interpreted as a series of 8 bytes
(big endian). Any character that is not a hex digit will be
ignored. This is for better readability.
TZ=posix-time-zone-string
Set the time zone to posix-time-zone-string. It must conform to
the POSIX <http://pubs.opengroup.org/onlinepubs/009695399/
basedefs/xbd_chap08.html> specification. Simplified time zone
strings like "Europe/London" or "America/Detroit" are not
allowed. This has the very simple reason that there is no space
on the floppy to store the time zone database.
The string CET-1CEST,M3.5.0,M10.5.0/3 (most countries in Europe)
reads as follows:
CET The standard (winter) time zone has the name CET.
-1 The standard time zone is one hour east of UTC. Nega-
tive numbers are east of UTC. Positive numbers are
west of UTC.
CEST The daylight saving (summer) time zone has the name
CEST.
M3.5.0 Daylight saving time starts in the 3rd month (March)
on the 5th (=last) occurence of weekday 0 (Sunday) at
2 o'clock (2 o'clock is a default value).
M10.5.0/3 Daylight saving time ends in the 10th month (October)
on the 5th (=last) occurence of weekday 0 (Sunday) at
3 o'clock.
If you don't have daylight saving time, things are easier. For
Chinese Standard Time for example, just use CST-8 as the time
zone string.
On a Linux desktop system, you can use a command like
strings /usr/share/zoneinfo/America/New_York | tail -n1. This
should return EST5EDT,M3.2.0,M11.1.0. You can use the returned
string for the TZ=posix-time-zone-string parameter.
IPV4_CONFIG=DHCP | STATIC
This determines how you want to configure IPv4 networking. If
you use IPV4_CONFIG=STATIC, you must supply additional para-
maters to the APPEND command line.
IPV4_ADDRESS=ipv4-address/CIDR-mask
Use ipv4-address with netmask CIDR-mask for static IPv4 configu-
ration. The netmask must not be ommitted. For IPv4 address
192.168.12.17 with a netmask of 255.255.255.0 use
192.168.12.17/24. For IPv4 address 10.4.0.8 with a netmask of
255.255.0.0 use 10.4.0.8/16. This paramater is ignored, if you
used IPV4_CONFIG=DHCP.
IPV4_GATEWAY=ipv4-address | NONE
Use ipv4-address as the default gateway. This is usually the
IPv4 address of your router. You may specify NONE explicitly for
no gateway. In this case your virtual machine is only visible on
its local LAN. This paramater is ignored, if you used IPV4_CON-
FIG=DHCP.
IPV4_DNS1=ipv4-address | NONE
Use ipv4-address as the primary name server. In home networks
this is often the IPv4 address of your router. You may specify
NONE explicitly. If you specified NONE for both IPV4_DNS1= and
IPV4_DNS2=, your virtual machine cannot resolve host names to IP
addresses. While vlmcsd(8) works perfectly without DNS servers,
you must use IP addresses when referring to a host, e.g. for
specifying an NTP server. This paramater is ignored, if you used
IPV4_CONFIG=DHCP.
IPV4_DNS2=ipv4-address | NONE
Use ipv4-address as the secondary name server. It serves as a
backup if the primary name server is not available. Home net-
works often don't have a secondary name server. In this case set
this to NONE. This paramater is ignored, if you used IPV4_CON-
FIG=DHCP.
NTP_SERVER=host-name | ipv4-address | NONE
This sets the name of a time server using the NTP protocol. If
your virtualization environment reliably provides time, you can
set this to NONE. Don't use a public time service like
pool.ntp.org or time.nist.gov if you have a (at least somewhat
reliable) NTP server in your LAN.
HOST_NAME=host-name
Sets the local host name for your virtual machine. It can be a
single name or a fully-qualified domain name FQDN. If you used
IPV4_CONFIG=DHCP and your DHCP server returns a domain name, the
domain part of an FQDN will be replaced by that name. This host
name or host part of an FQDN will not replaced by a host name
returned via DHCP. The host name is not important for the opera-
tion of floppy144.vfd.
ROOT_PASSWORD=password
Sets the password of the root user.
USER_NAME=username
Sets the name of for a general user with no special privileges.
This user can login but can't do much.
USER_PASSWORD=password
Sets the password for the user defined by USER_NAME=username.
GUEST_PASSWORD=password
Sets the password for the pre-defined guest user. This user has
the same priviliges (none) as the user defined by
USER_NAME=username.
INETD=Y | N
INETD=Y specifies that inetd(8) should automatically be started.
That means you can telnet and ftp to your virtual machine.
VLMCSD_EXTRA_ARGS=comma-seperated-argument-list
Allows you to specify additional command line options that will
be passed to vlmcsd(8). Instead of spaces you use commas between
arguments. Example: VLMCSD_EXTRA_ARGS=-c1,-K3,-M1
OPERATION
Diskless System
The floppy144.vfd virtual machine is a diskless system that works
entirely from RAM. The file system is actually a RAM disk that is cre-
ated from the initrd(4) file on the floppy image.
Anything you'll do from inside the virtual machine, for instance edit-
ing a config file, will be lost when you reboot the machine. So, if you
ever asked yourself if rm -fr / (root privileges required) really
deletes all files from all mounted partitions, the floppy144.vfd VM is
the right place to test it (Yes, it does).
The VM uses a RAM disk, because the Linux kernel had to be stripped
down to essential features to fit on a 1.44 MB floppy. It has no floppy
driver, no disk file system drivers and no block layer (cannot use
disks of any type).
System startup
The kernel boots up very quickly and the init script (/sbin/init) waits
5 seconds. In these 5 seconds you can:
Press 'm' to manually enter the time zone and the IPv4 parame-
ters. These will be queried interactively.
Press 't' to manually enter the time zone only.
Press 's' to escape to a shell.
If you don't want to 5 seconds for continuing the init process, you can
press any other key to speed things up. At the end of the init script
you should see thatvlmcsd(8) has started. You should also see the IP
addresses and all user names and passwords.
Logging into the system
There are 5 local logins provided on /dev/tty2 to /dev/tty6. To switch
to these logins, simply press ALT-F2 to ALT-F6. To return to the con-
sole on /dev/tty1, press ALT-F1. If inetd(8) is running you can also
use telnet(1). This allows you use a terminal program (e.g. putty) that
can utilize your keyboard layout, can be resized and has full UTF-8
support. The local terminals support US keyboard layout only. Please be
aware that telnet(1) is unencrypted and everything including passwords
is transmitted in clear text. There is not enough space for an ssh
server like sshd(8) or dropbear(8).
The floppy image only provides basic Unix commands. Type busybox or ll
/bin to get a list. The only editor available is vi(1). If you don't
like vi, you may transfer config files via ftp(1) edit them with the
editor of your choice and transfer them back to the floppy144.vfd VM.
The menu system
You'll find a menu system on /dev/tty8 (press ALT-F8 to see it). It
allows you performing some administrative tasks and to view various
system information. It is mainly for users that do not have much expe-
rience with Unix commands.
1) (Re)start vlmcsd
Starts or restarts vlmcsd(8). This is useful if you changed
/etc/vlmcsd.ini(5).
2) Stop vlmcsd
Stops vlmcsd(8).
3) (Re)start inetd
Starts or restarts inetd(8). If inetd(8) is restarted, current
clients connected via telnet(1) or ftp(1) will not be dropped.
They can continue their sessions. This is useful if you changed
/etc/inetd.conf(5).
4) Stop inet
Stops inetd(8). All clients connected via telnet(1) or ftp(1)
will be dropped immediately.
5) Change the time zone
Just in case you missed pressing 't' during system startup. This
also restarts vlmcsd(8) if it was running to notify it that the
time zone has changed. Restarting vlmcsd(8) allows currently
connected clients to finish their activation.
k) Change keyboard layout
This allows you to select a different keyboard layout.
6) Show all kernel boot parameters
Shows all parameters passed to the kernel via syslinux.cfg. If
you experience any unexpected behavior, you can use this to
check if your APPEND line in syslinux.cfg is correct. The output
is piped through less(1). So press 'q' to return to the menu.
7) Show boot log (dmesg)
Shows the boot log of the kernel. The output is piped through
less(1). So press 'q' to return to the menu.
8) Show TCP/IP configuration
Shows the TCP/IP configuration, listening sockets and current
TCP and UDP connections. Useful, if you problems with net con-
nectivity. The output is piped through less(1). So press 'q' to
return to the menu.
9) Show running processes
Shows all processes including memory and CPU usage. Display will
updated every second. Press 'q' or CTRL-C to return to the menu.
s) Shutdown
Shuts down the floppy144.vfd virtual machine. Proper shutdown is
not required. It is ok to use a hard power off in your virtual-
ization program.
r) Reboot
Reboots the floppy144.vfd virtual machine. Proper reboot is not
required. It is ok to use a hard reset in your virtualization
program.
PERMANENT CHANGES OF INITRD
If you want to change any file or script of the file system (e.g. the
init script /sbin/init or /etc/vlmcsd.ini), you'll need to mount the
floppy image, unpack the initrd(4) file, make any modfications you
like, create a new initrd(4) file and copy it to the mounted floppy.
To unpack the initrd(4) file you'll need xz(1) (or lzma(1) on older
unix-like OSses) and cpio(1). These can be installed using your package
manager on all major distros. It is ok to use the BSD version of
cpio(1). No need to get the GNU version for BSD users. Provided the
floppy is mounted in /mnt/floppy do the following:
Create an empty directory
mkdir ~/vlmcsd-floppy-initrd
cd into that directory
cd ~/vlmcsd-floppy-initrd
Unpack initrd
cat /mnt/floppy/initrd | unlzma | cpio -i
After applying your changes build a new initrd(4) file:
cd into your directory
cd ~/vlmcsd-floppy-initrd
Create the packed file
find . | cpio -o -H newc | lzma > /mnt/floppy/initrd
Do not try to use 'lzma -9' to achive better compression. The kernel
can't read the resulting file. While customizing the initrd(4) file
works on almost any unix-like OS, it does not work on Windows even not
with Cygwin. The reason is that the NTFS file system can't handle uids
and gids. These cannot be preserved when unpacking the cpio(1) archive
to NTFS. If you use the WSL subsystem of Windows 10 Redstone (Anniver-
sary Update) and later, you must make sure to unpack the initrd(4) file
to a directory on VolFs (normally everything that is not mounted under
/mnt). The initrd(4) file can be on a VolFs or DriveFs.
FAQ
On what distro is the floppy image based?
None. Besides the boot loader ldlinux.sys, there are only three bina-
ries: The Linux kernel bzImage, busybox(1) and vlmcsdmulti-x86-musl-
static. bzImage and busybox(1) have been compiled with carefully
selected configuration parameters not found in any distro. This was
neccesary to fit everything on a 1.44 MB floppy.
Why is a rather old Linux kernel (3.12) used?
Linux 3.12 is the last kernel that can be booted with 16 MB of RAM.
Beginning with Linux 3.13 it requires much more memory (about 80 MB) to
boot. The floppy image is regularly tested with newer kernels. Every-
thing works except that you need to assign much more main memory to the
virtual machine.
Can the floppy be booted on bare metal?
Basically yes. However, only Intel Pro/1000 and AMD PCNET32 ethernet
cards are supported by the kernel. In addition there is no USB support
compiled into the kernel. That means you can only use an IBM AT or IBM
PS/2 keyboard which are not available on newer hardware.
FILES
syslinux.cfg, vlmcsd.ini(5)
BUGS
IPv6 cannot be configured with static or manual parameters.
DHCPv6 is not supported.
'ip route add ...' does not work. Use 'route add ...' instead.
AUTHOR
floppy144.vfd has been created by Hotbird64
CREDITS
Linus Torvalds et al. for the Linux kernel
Erik Andersen et al. for the original uClibc
Waldemar Brodkorb et al. for uClibc-ng
Denys Vlasenko et al. for BusyBox
H. Peter Anvin et al. for SYSLINUX
SEE ALSO
vlmcsd(8), vlmcsd.ini(5), initrd(4), busybox(1), syslinux(1)
Hotbird64 May 2017 VLMCSD-FLOPPY(7)