Skip to content

Commit

Permalink
README.md: Update NBD info
Browse files Browse the repository at this point in the history
  • Loading branch information
bignaux committed Sep 7, 2021
1 parent 6af0f59 commit b314fa0
Showing 1 changed file with 61 additions and 11 deletions.
72 changes: 61 additions & 11 deletions README.md
Expand Up @@ -123,32 +123,82 @@ that contains the preferred partition name (for example `__common`).
<summary> <b> NBD Server </b> </summary>
<p>

NBD server replaced HDL server. For using it, you need a way to run some NBD client on your machine.
A [NBD](https://en.wikipedia.org/wiki/Network_block_device) server replaced HDL server.
NBD is [formally documented](https://github.com/NetworkBlockDevice/nbd/blob/master/doc/proto.md)
and developed as a collaborative open standard.
The current implementation of the server is based on [lwNBD](https://github.com/bignaux/lwNBD),
go there to contribute.
The main advantage of using NBD is that the client will simulate a similar
interface to the OS as if the device was plugged directly into your machine.
All your favorite software that worked with the device directly connected to your
machine, will work with the device accessible through the network.

### Linux
Currently, only export for HDD is supported by the server.
You can use hdl-dump, pfs-shell, or even directly edit disk in some hex editor.
Example, how to install HDL game to the HDD:
Connect with your choosen client, then `hdl_dump inject_dvd ps2/nbd "Test Game" ./TEST.ISO`
and when you're done, disconnect the client.

For example, on Windows 10 you can use WSL2. The nbd client will create a block device on the PC. Currently, the only working nbd client on the WSL2 - `nbdfuse`.
An example, how to install HDL game to the HDD:
So you need a NBD client.
Here we list some known compatible clients and how to use them.

### nbd-client

Supported: Linux, [Windows with WSL and custom kernel](https://github.com/microsoft/WSL/issues/5968)

nbd-client requires nbd kernel support. If it isn't loaded,
`sudo modprobe nbd` will do.

connect:

```sh
nbd-client -no-optgo 192.168.1.45 /dev/nbd1 &
```

disconnect:

```sh
nbd-client -d /dev/nbd1
```

You'll generally need sudo to run this commands in root or
add your user to the right group usually "disk".

### nbdfuse

Supported: Linux, Windows with WSL2

connect:

```sh
mkdir ps2
nbdfuse ps2/ nbd://192.168.1.45 &
hdl_dump inject_dvd ps2/nbd "Test Game" ./TEST.ISO
```
After you are done, type `umount ps2` to prevent corruption.

On pure Linux, you can also use `nbd-client -no-optgo`.
disconnect:

```sh
umount ps2
```

### Windows
### wnbd

On Windows systems, you can use [WNBD client](https://cloudbase.it/ceph-for-windows/). Install, reboot, open elevated (with Administrator rights) [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell?view=powershell-7.1#how-to-start-windows-powershell-on-earlier-versions-of-windows) and type the following command:
Supported: Windows

[WNBD client](https://cloudbase.it/ceph-for-windows/).
Install, reboot, open elevated (with Administrator rights) [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell?view=powershell-7.1#how-to-start-windows-powershell-on-earlier-versions-of-windows)

connect:

```sh
wnbd-client.exe map hdd0 192.168.1.22
```

Now you can use hdl-dump, pfs-shell, or even directly edit disk in some hex editor.
After you are done, type `wnbd-client.exe unmap hdd0` to prevent corruption.
disconnect:

```sh
wnbd-client.exe unmap hdd0
```

### Mac OS

Expand Down

0 comments on commit b314fa0

Please sign in to comment.