Closed m-asyua closed 2 years ago
If your Centos LiveCD supports 9pfs, then you can add this line to the V86Starter configuration, as done in Buildroot:
filesystem: {},
To upload files in v86 use the function create_file()
: https://github.com/copy/v86/issues/596#issuecomment-1008208368
If the system supports 9pfs, then it will be visible in df
, for example, like this:
The easiest way to check that 9pfs is working properly is to run this in the DevTools console:
emulator.create_file("/hello_world", "");
(This example is not suitable for file uploads. To upload and download files to 9pfs, use the code from main.js) https://github.com/copy/v86/blob/229310e6864ac8c271e629782cf03597c9b9d372/src/browser/main.js#L1751-L1796
https://github.com/copy/v86/blob/229310e6864ac8c271e629782cf03597c9b9d372/index.html#L251-L259
In addition to what @SuperMaxusa wrote, you'll need to run mount host9p -t 9p /mnt/
in the guest to mount the filesystem.
Thank you for your information. I could prepare the system that supports 9pfs, and I will try to create a LiveCD.
It works. I can send a sample file. Thank you very much! I need the option to run. mount -t 9p -o trans=virtio,version=9p2000.L host9p /mnt
I created a custom CentOS-Based Live CD and it works. Is there a way to upload a file on my linux by the custom LiveCD, like demos of Arch Linux and Buildroot which can upload a file? Is a tool needed for LiveCD?