Page 1 of 1
On a modem stick, troubles with switching between mass stora
Posted: 13 Dec 2012, 20:49
by leperou
Hi,
I want to put on a modem stick (Huawei, ZTE, or other), a microSD with an embeded linux OS (Ubuntu or Debian).
First i make an OS (squeeeze for Debian, 12.04 and 12.10 for Ubuntu), without graphical windowing.
I put the microSD in the appropriate slot on the modem stick, and i boot the computer.
All seem good, but when the OS want to switch the USB in modem , the mass storage is lost.
My question, how can i have the mass storage online and the modem.
If i put my OS on an other memory stick (or ssd), all works good !

(of course, the os don't use the same port).
Thanks for your answer.
Re: On a modem stick, troubles with switching between mass s
Posted: 14 Dec 2012, 20:02
by Josh
Hmm, the task you have taken on is a bit tricky, but certainly not impossible. As long as the SD card is reachable before and after the mode switch, it can be used as file system.
The point is that you need to adapt the Linux system to completely load into memory, probably using "tmpfs" folders as a temporary file system (which are also sitting in memory). There may be small rescue distributions available which are doing just that.
If the modem does the mode switch now, the system just waits until it sees the SD card slot again (most likely with a different device name than before).
Now you can finally attach the "physical" (flash) file system.
Re: On a modem stick, troubles with switching between mass s
Posted: 14 Dec 2012, 22:37
by leperou
Thanks,
It's the way of my search
First i create a small OS (based on debian), just burn mbr and just the necessary fs.
I burn the iso on the rom (with huawei dashboard writer)
and i try to boot
at this time i am just in phase of create the iso file
best regards
PS: I seen a beginning of response in an other discussion in your site
Re: On a modem stick, troubles with switching between mass s
Posted: 19 Dec 2012, 15:55
by Josh
Actually (I just read an article about it) there is already the "initramfs" which is used during boot on every Linux system.
It is contained in a file that is loaded by the kernel, with the name extension ".img".
You can open, unpack and re-pack this image which is exactly what we have been talking about: a temporary system which sits in memory and already has the basic tools to run custom scripts.
In theory, it should be easy to incorporate the mode switch and a wait/check for the returned device. In most cases, the "udev" system is included with the image so the initial system can react to newly appeared devices.
If you manage to make this work, the rest of the distribution on the SD card can be pretty much standard. All you need on the "pseudo CD" partition is the boot loader.