8 ms·
Speaking of booting Linux from places, what I would like to be able to do is carry a Linux image around with me on my (Android) smartphone, plug the phone into
by nemoniac 2y ago
Speaking of booting Linux from places, what I would like to be able to do is carry a Linux image around with me on my (Android) smartphone, plug the phone into a USB port on a laptop and boot the Linux image from there on the laptop. Does such a thing exist?
- jstanley 2y agoWhy does it need to be on the phone? Carry a normal USB stick.
- Infinity315 2y agoIt doesn't, but consider that the vast majority of us already carry our phones everywhere. Would carrying an extra USB stick be that big of a hassle? No, but I can see the need for booting up a ready Linux image being extremely situational so the vast majority of time you're just carrying dead weight.
- forgotpwd16 2y agoYou can have a stick with one boot and one commonly formatted (FAT32/exFAT/ext) partition, Linux image being stored in later. Then it's like a normal stick that can also be used to boot Linux. Ventoy automates this process, allowing you to throw any ISO in a specific directory and boot it.
- 2OEH8eoCRo0 2y agoWouldn't it be cool if these general purpose computers in our pockets were useful in novel ways? You're only allowed to use it in the prescribed fashion.
- dataflow 2y agoWhat do you do about the USB cable though? A flash drive you can plug in directly, it's guaranteed to work. A phone requires you to either carry around an extra cable (arguably more annoying to carry than a flash drive) or take the risk that you won't have the right cable available nearby when you're trying to (say) boot a laptop.
- Medox 2y agoThe USB stick will be forgotten or lost much quicker than the phone.
- diggan 2y agoUSB sticks attached to keychains are already widespread in some communities (DJs for example), I'm sure us software people could do it too if we wanted to :)
- lizknope 2y agoI have a few Verbatim "Tuff and Tiny" USB drives. Like this but without the plastic clip part. I can fit them in my wallet because its about the thickness of 2 credit cards which are also in my wallet. https://www.amazon.com/Verbatim-8GB-Clip-Flash-Drive/dp/B00NJG6K0G/ https://www.amazon.com/Verbatim-8GB-Clip-Flash-Drive/dp/B00N...
- Medox 2y agoReminds me of the credit card sized (literally [1]) USB stick I still have somewhere but it was too annoying to carry around and hope that next time that cheap stick still works... Using the phone directly still seems the cleanest and most reliable way. Or maybe a combination of both, like those magnetic plugs [2] but with an integrated USB stick. Bonus points if you don't have to take it out at all (until needed) by either connecting the other magnetic part for data transfer and charging or data through USB OTG and wireless charging. One can dream... but the technology will shrink even further so who knows. 1. https://www.amazon.com/Enfain-Flash-Drives-Memory-Credit/dp/B00KBO2FGW https://www.amazon.com/Enfain-Flash-Drives-Memory-Credit/dp/... 2. https://www.adafruit.com/product/5524 https://www.adafruit.com/product/5524
- hexmiles 2y agohttps://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid&hl=en https://play.google.com/store/apps/details?id=com.softwareba.... It dosen't work on all smartphone
- sandreas 2y agoBoot linux of a Smartphone would take drive emulation, which is possible, but not easily available. To rootless Boot a Linux ON (not from) your phone is possible via tmux APP. Search for "rootless kali nethunter" on YouTube. See here: https://m.youtube.com/watch?v=GmfM8VCAu-I https://m.youtube.com/watch?v=GmfM8VCAu-I
- ce4 2y agoThat is not booting a linux-kernel at all. it is just using the existing kernel which Android is based on (also Linux).
- franga2000 2y agoThis really is nice to have and a sibling comment has already linked to DriveDroid, the solution I'm using for this. Back in the CyanogenMod days, I had an even better setup: there was an app that also let you emulate a USB keyboard and mouse, so I could, with some command-line trickery, boot a computer from an ISO on my phone, then use that same phone as a keyboard and mouse/trackpad, including in the BIOS.
- adriancr 2y agoYou could set up a PXE boot server on the android phone, then set up computer to boot off it.
- ddalex 2y agoWhy just not use Samsung's DeX that gets you a linux desktop when you plug your phone in a usb-c monitor/console
- Crestwave 2y agoWasn't Linux on DeX discontinued?
- criddell 2y agoYes it was.
- byteknight 2y agoDex does not need an underlying OS. Your conflating features. Dex simply requires a monitor. No computer.
- criddell 2y agoThis is the feature I'm thinking of: https://www.slashgear.com/samsung-linux-on-dex-is-dead-here-are-open-source-alternatives-21596310/ https://www.slashgear.com/samsung-linux-on-dex-is-dead-here-...
- byteknight 2y agoDex does not need an underlying OS. Your conflating features. Dex simply requires a monitor. No computer.
- sambazi 2y agodifferent use case and requirement for samsung device?
- stragies 2y agoA magisk module to do just that: https://github.com/nitanmarcel/isodrive-magisk https://github.com/nitanmarcel/isodrive-magisk needs root, and your kernel needs USB Mass storage gadget support module enabled, which, sadly, LineageOS doesn't enable by default.
- Timber-6539 2y agoI have used this many times on my phone running LineageOS. Did not have to enable any kernel features.
- stragies 2y agoOn the phones, where the Vendor kernel has this option enabled, Lineage also enables it, e.g. most LGs. But Lineage does not enable it on all kernels, even if it could just be enabled. I observe this on all of my Samsungs, for example. You can use this app to see which USB gadget options are enabled on your kernel: https://github.com/tejado/android-usb-gadget https://github.com/tejado/android-usb-gadget
- Timber-6539 2y agoMakes sense. My phone model is a Xiaomi. Don't know why Samsung would ship their kernels without ConfigFS support but I have never had such issues.
- stragies 2y agoIt's not about `ConfigFS` as a whole, but specifically `CONFIG_USB_CONFIGFS_MASS_STORAGE`, that is left disabled, while lots of other `CONFIG_USB_CONFIGFS_BLA` are enabled. This and more can be seen in the `device info` screen of the App mentioned above
- Timber-6539 2y agoShould have said *proper ConfigFS support. Anyway, had no prior interest in this kernel feature until you mentioned the anomaly that is specific to certain vendors. You can also do `zcat /proc/config.gz | grep CONFIGFS_` in a root shell (su) inside termux to get what options are set by the default kernel.
- 0x1ceb00da 2y agoGlue a bootable usb to your phone.
- akoboldfrying 2y agoYes, do this. Don't under any circumstances try to solve a cute technical challenge -- that would only lead to fun, or worse yet, satisfaction.
- gibspaulding 2y agoIt sounds to me like software enlightenment: https://xkcd.com/1988/ https://xkcd.com/1988/
- sambazi 2y agoi used drivedroid [0] on in the 2010's for this purpose. handy but never essential. requires root though. [0] https://play.google.com/store/apps/details?id=com.softwarebakery.drivedroid https://play.google.com/store/apps/details?id=com.softwareba...
- toast0 2y agoAndroid stopped exposing USB Mass Storage, because it's problematic for the core use case of letting you grab pictures and what not from your phone, because it requires exclusive access to a filesystem; that wouldn't be a big deal for you, I don't think, you probably just want to create a large file and expose that as a device, but the implications of exposing the sd card (or the virtual sd card) as mass storage are why it went out of style. I did find this, but it's ancient and may not meet your needs anyway... https://xdaforums.com/t/app-root-usb-mass-storage-enabler-v1-6.3240097/ https://xdaforums.com/t/app-root-usb-mass-storage-enabler-v1...
- Aardwolf 2y agoWhat do you mean, usb mass storage was much better for the core use case of getting pictures of your phone than the flaky mtp now is
- toast0 2y agoI mean, yes, but ... If the sd card is mounted by your computer, you can't run any apps on the phone that need to use the sd card. That means, apps you moved to the SD card for space reasons, or apps that might save photos to the SD card (such as messengers). If your computer messes up the filesystem, then you're in a world of hurt.
- Aardwolf 2y agoCouldn't they emulate it then? If multiple apps can access the filesystem at the same time, why couldn't also some app (background system process) read from / write to the filesystem in an android multi access compatible way, while serving the mass storage device API on the other side
- toast0 2y agoThat's possible, but really challenging to do because mass storage is block oriented, the host (desktop) is likely to do read and write caching, and there's no mechanism for a host to say I finished writing this file, and there's no mechanism for a device (phone) to say blocks changed from under you. The paradigm for block oriented filesystem access is exclusive access, and filesystem code is built around that. There's some niche filesystems around multiple simultaneous access to block devices, but I don't know if there's any that are open source; mostly people don't setup scsi/sas/das disk arrays with two hosts anymore, and when they do, they're much more likely to have exclusive access with failover than simultaneous access. If you had a team of really detail oriented developers capable of getting this done for Android and desktop platforms, wouldn't you rather they work on something else? Another approach might be to build a virtual filesystem to export as a block device on usb connection that's essentially a snapshot of the current one, and then you sync any changes that were written on usb disconnect, but then you need to manage divergent changes and that's unfun too. SMB over USB would be terrible in many ways, but probably handle this use case much better.