Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload file from web to remote USB disk that plug into PiKvm #1218

Open
KaoTuz opened this issue Jan 18, 2024 · 6 comments
Open

Upload file from web to remote USB disk that plug into PiKvm #1218

KaoTuz opened this issue Jan 18, 2024 · 6 comments
Assignees
Labels
type:question User question

Comments

@KaoTuz
Copy link

KaoTuz commented Jan 18, 2024

Is your feature request related to a problem? Please describe.
Ans: No

Remote Web<-Internet-> --> PiKvm<-->USB Disk>--> target PC
USB disk connect to PiKvm

We want to remote flash BIOS via our flash tool in UEFI shell
so we want to upload BIOS file in to remote usb disk.
And control target PC boot into UEFI shell, then we execute flash command via usb disk

@Popkornium18
Copy link

You can create a disk image on your machine, create whatever filesystem you need in it (likely fat32), mount it, put the file into it, unmount it and then upload it like a normal disk image to the pikvm.

Look at step 2 of "Creating a simple fat32 image": https://docs.pikvm.org/msd/#writable-flash-drive

I successfully used that method to flash a BIOS over pikvm without actually plugging a USB stick into the system.

@KaoTuz
Copy link
Author

KaoTuz commented Jan 19, 2024

Thanks for your reply

I have an usage scenarios
I am bios engineer
And i would need to copy bios binary to target PC (USB Disk) every time that i build an new bios
And boot the USB disk to UEFI shell (Not windows) than flash the BIOS

Does that means i need to un-mount and re-create new disk image when i need to add new file to usb disk?

@Popkornium18
Copy link

Popkornium18 commented Jan 19, 2024

With my proposed solution you would need to upload a new disk image every time, which might be too much of a hassle if you flash BIOSes multiple times every day. You could also try to mount the disk on the pikvm (writable) and scp the new bios file from your workstation onto the disk image. Not sure if it works, but worth a try.

If it works, automating the process with a shell script or ansible should be straightforward.

@mdevaev
Copy link
Member

mdevaev commented Jan 28, 2024

@KaoTuz Hello. Please help me understand your workflow and I'll figure out what can be done. It sounds super interesting.

You have a test host that PiKVM is connected to, right? You are building a binary BIOS. Then you need to put it on some specialized USB flash drive, which has a utility for BIOS firmware. Then you connect it to the host, and the magic happens. Do I understand correctly?

@mdevaev mdevaev self-assigned this Jan 28, 2024
@mdevaev mdevaev added the type:question User question label Jan 28, 2024
@KaoTuz
Copy link
Author

KaoTuz commented Jan 30, 2024

@KaoTuz Hello. Please help me understand your workflow and I'll figure out what can be done. It sounds super interesting.

You have a test host that PiKVM is connected to, right? You are building a binary BIOS. Then you need to put it on some specialized USB flash drive, which has a utility for BIOS firmware. Then you connect it to the host, and the magic happens. Do I understand correctly?

@mdevaev
Yes, i have a test host(remote target) that PiKVM is connect to.

Standard Procedure to Flash BIOS

  1. Copy bios file (Ex: Bios.bin ) to USB drive
  2. Connect to test host
  3. Reboot host
  4. Boot to UEFI Shell (Not boot into windows or linux)
  5. then it would auto execute batch file that i write to flash BIOS

My Expected behavior of flashing BIOS via PIKvm

  1. Copy bios file (Ex: Bios.bin ) to Pikvm Internal USB drive
  • Do not need to re-make whole usb disk image, just add or override one file to the Internal USB drive that existed
  1. Re-connect internal USB drive to host
  2. Reboot host
  3. Boot to UEFI Shell (Not boot into windows or linux)
  4. then it would auto execute batch file that i write to flash BIOS

Due to i would build a lot of bios to testing host, so i may need to copy bios file to usb driver frequently
So , i just want to add or override one file to the Internal USB drive to reduce time that re-build whole disk

@mdevaev
Copy link
Member

mdevaev commented Jan 31, 2024

I've more or less figured out what you need. I need to think about the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question User question
Development

No branches or pull requests

3 participants