This is a feature available on PiKVM v2+ that allows you to emulate a CD-ROM or Flash Drive.
There are some subtleties that you should know:
This is an important feature that is available on all PiKVM V2+ devices.
It is provides possibility to emulate a CD-ROM or Flash Drive to connect removable media
to the target host which will be available evein in BIOS/UEFI if you need live disk
to revive the OS or even reinstall it.
!!! info "The size of the CD-ROM image is limited to 2.2 GB"
This is a [limitation](https://github.com/pikvm/pikvm/issues/322) of the Linux kernel, which currently cannot emulate a DVD.
To use a larger boot image, use Flash emulation. If this is not possible (the image does not support Flash, for example, for Windows),
use [this](#create-a-windows-based-flash-disk-image) recipe.
This is a Linux kernel [limitation](https://github.com/pikvm/pikvm/issues/322) on PiKVM,
which currently cannot emulate a DVD drive.
To use a larger boot image, please use a Flash Drive emulation.
If this is not possible (the image does not support Flash, for example, for Windows),
you can try [this recipe](#create-a-windows-based-flash-disk-image).
!!! info "Changing the media type between CD-ROM and Flash is possible only when the device is reconnected"
For PiKVM v3 HAT, this can be done using the switch `System -> Connect main USB`.
In this case, the **media type is determined at the time of connecting the image, and not by clicking on the switch**.
The switch affects the settings of the future connection. For non-v3 devices,
you need to either reboot your server or otherwise reinitialize the connection.
For PiKVM V3, this can be done using the `System -> Connect main USB` switch.
-----
## Upload images manually (without Web UI)
In this case, the **media type is determined at the time of connecting the image, and not by clicking on the switch**.
!!! info "This instruction is relevant for KVM >= 3.203. If you are using a previous version, then update OS."
The switch affects the settings of the future connection. For non-V3/V4 devices,
you need to either reboot your target host or otherwise reinitialize the drive.
1. Remount internal storage to rw (read-write):
!!! warning "Legacy note"
This document is relevant for `KVMD >= 3.249`. If you are using an older version, please update the PiKVM OS.
```
# kvmd-helper-otgmsd-remount rw
```
2. Upload the .ISO image(s) to `/var/lib/kvmd/msd` via scp or similar.
-----
## Manual image uploading without Web UI
3. Create an empty file in `/var/lib/kvmd/msd` with the exact name (case sensitive!) of the uploaded image + prefix `.__` and suffix `.complete`. This will indicate PiKVM that the uploaded image is okay and can be used. For example:
Make sure that the `kvmd` user has read access rights from these directories. You can also give write access if needed.
Make sure that the `kvmd` user has the *read* access from these directories. You can also give the *write* access if needed.
For the best performance, it is required to ensure reliable connectivity with NFS server and use minimum `timeo` and `retrans` values.
**Using the `soft` option is mandatory, `nolock` is recommended.**
Note if an image is added to the NFS storage from the outside, PiKVM will not be able to track this event, so it is required to use
`Drive -> Reset` in the Web UI to update the list of images.
Configuring an NFS server is beyond the scope of this guide.
-----
## Multiple and writable drives
@ -141,7 +140,7 @@ to the server and download some files from to PiKVM from it.
After that you will have access to the flash drive from the target server. **Drive 0 represents a drive that is controlled via a web interface and API. Don't use it with kvmd-otgmsd if you don't know exactly what you're doing.**
4. View the driver state:
4. View the drive state:
```
# kvmd-otgmsd -i 1
@ -232,11 +231,10 @@ Once you have the desired USB stick perform the following on the RPi to create t