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

File instead of folder #105

Open
GustaWinnipeg opened this issue Jul 9, 2024 · 1 comment
Open

File instead of folder #105

GustaWinnipeg opened this issue Jul 9, 2024 · 1 comment

Comments

@GustaWinnipeg
Copy link

How would I go around using a file to emulate a USB-stick instead of a folder?

For example if I wanted to use my raspberry to store multiple OS boot disks, I could just change the file and use it to boot another PC (doesn't need to be necessarily a file, could be a folder too, as long it is mapped to the / of the USB stick and is capable of booting from it). Is that possible in any way? I've done this using an Android device before.

@jfdelnero
Copy link
Member

jfdelnero commented Jul 9, 2024

USB-sticks don't use MTP protocol. And you can already emulate mass storage / usb stick with the current kernels. You can use the "g_mass_storage" module for this :

modprobe g_mass_storage file=/root/stick_image.img stall=0 removable=y iSerialNumber=1234567890

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants