public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Unmount and mount a mass storage from shell
@ 2017-05-25  5:59 GN Keshava
  2017-05-25 15:56 ` Carsey, Jaben
  0 siblings, 1 reply; 7+ messages in thread
From: GN Keshava @ 2017-05-25  5:59 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

How can I unmount and mount a mass storage fs from UEFI shell?

In older EFI shells, I can do with "mount" command. But it just does
"mapping" in newer shell. It doesn't actually remounting the device.

Please help.

thanks


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-25  5:59 Unmount and mount a mass storage from shell GN Keshava
@ 2017-05-25 15:56 ` Carsey, Jaben
  2017-05-26  6:02   ` GN Keshava
  0 siblings, 1 reply; 7+ messages in thread
From: Carsey, Jaben @ 2017-05-25 15:56 UTC (permalink / raw)
  To: GN Keshava, edk2-devel@lists.01.org

You can "disconnect" the driver
You can do "map -d" to delete a mapping

I am unsure what your goals are for mount/unmount

-Jaben

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> GN Keshava
> Sent: Wednesday, May 24, 2017 10:59 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] Unmount and mount a mass storage from shell
> Importance: High
> 
> How can I unmount and mount a mass storage fs from UEFI shell?
> 
> In older EFI shells, I can do with "mount" command. But it just does
> "mapping" in newer shell. It doesn't actually remounting the device.
> 
> Please help.
> 
> thanks
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-25 15:56 ` Carsey, Jaben
@ 2017-05-26  6:02   ` GN Keshava
  2017-05-30 15:25     ` Carsey, Jaben
  0 siblings, 1 reply; 7+ messages in thread
From: GN Keshava @ 2017-05-26  6:02 UTC (permalink / raw)
  To: Carsey, Jaben, edk2-devel@lists.01.org

Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is that,
the USB client is a Linux storage gadget, which needs to be remounted to
get the updated/new files created by Linux. Anyhow, now I'm doing this
programmatically by copying mount command code from older shell. :)

One more issue is that, after Linux updates some file (on client side,
Linux will mount the same partition, save some file, and then umount the
partition. Then if i remount the partition on Host side, when host is
windows, i will get updated files) I will manually remove and connect the
cable (MS device), UEFI is not able to detect the MS itself. (This issue
observed, regardless of remount. This issue is not there on windows 10
host).
Can you give some pointers on this?

Thanks a lot, Jaben.

Regards,
Keshava

On Thu, 25 May 2017 at 21:26 Carsey, Jaben <jaben.carsey@intel.com> wrote:

> You can "disconnect" the driver
> You can do "map -d" to delete a mapping
>
> I am unsure what your goals are for mount/unmount
>
> -Jaben
>
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > GN Keshava
> > Sent: Wednesday, May 24, 2017 10:59 PM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] Unmount and mount a mass storage from shell
> > Importance: High
> >
> > How can I unmount and mount a mass storage fs from UEFI shell?
> >
> > In older EFI shells, I can do with "mount" command. But it just does
> > "mapping" in newer shell. It doesn't actually remounting the device.
> >
> > Please help.
> >
> > thanks
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-26  6:02   ` GN Keshava
@ 2017-05-30 15:25     ` Carsey, Jaben
  2017-05-31  3:35       ` GN Keshava
  0 siblings, 1 reply; 7+ messages in thread
From: Carsey, Jaben @ 2017-05-30 15:25 UTC (permalink / raw)
  To: GN Keshava, edk2-devel@lists.01.org

I think that you will always need to inform the UEFI Shell of the change.  It is not designed to automatically do detection of added/removed/changed devices.

I think that your solution to use the code from mount makes the most sense.

-Jaben

From: GN Keshava [mailto:keshava.gn@gmail.com]
Sent: Thursday, May 25, 2017 11:02 PM
To: Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] Unmount and mount a mass storage from shell
Importance: High

Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is that, the USB client is a Linux storage gadget, which needs to be remounted to get the updated/new files created by Linux. Anyhow, now I'm doing this programmatically by copying mount command code from older shell. :)

One more issue is that, after Linux updates some file (on client side, Linux will mount the same partition, save some file, and then umount the partition. Then if i remount the partition on Host side, when host is windows, i will get updated files) I will manually remove and connect the cable (MS device), UEFI is not able to detect the MS itself. (This issue observed, regardless of remount. This issue is not there on windows 10 host).
Can you give some pointers on this?

Thanks a lot, Jaben.

Regards,
Keshava

On Thu, 25 May 2017 at 21:26 Carsey, Jaben <jaben.carsey@intel.com<mailto:jaben.carsey@intel.com>> wrote:
You can "disconnect" the driver
You can do "map -d" to delete a mapping

I am unsure what your goals are for mount/unmount

-Jaben

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org<mailto:edk2-devel-bounces@lists.01.org>] On Behalf Of
> GN Keshava
> Sent: Wednesday, May 24, 2017 10:59 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] Unmount and mount a mass storage from shell
> Importance: High
>
> How can I unmount and mount a mass storage fs from UEFI shell?
>
> In older EFI shells, I can do with "mount" command. But it just does
> "mapping" in newer shell. It doesn't actually remounting the device.
>
> Please help.
>
> thanks
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-30 15:25     ` Carsey, Jaben
@ 2017-05-31  3:35       ` GN Keshava
  2017-05-31 15:53         ` Carsey, Jaben
  0 siblings, 1 reply; 7+ messages in thread
From: GN Keshava @ 2017-05-31  3:35 UTC (permalink / raw)
  To: Carsey, Jaben, edk2-devel@lists.01.org

Hi Jaben,

Thanks a lot for your input.

As I have mentioned in previous mail, I'm facing an issue now, that, If I
reconnect my client device, the mass storage is not able to mount again
automatically.
Here is few more details. Expecting some help on this :

I connect the the client device to UEFI host. I get the mass storage
successfully. (device is listed as Mass storage in devices command)
The client device also has serial CDC functionality (It is Linux CDC
gadget, which will enumerate as both Mass storage (FAT32) and CDC serial
com port).
To use serial port, I have developed a custom serial driver. I use VID PID
of the device in this custom driver to bind the driver to the device. I
load this driver, and I get serial port (It is listed in sermode command)
Now I refresh the mapping using map -r. Still I get the mass storage of
device, and I'm able to access it correctly.
Now I disconnect the client from host (UEFI) by unplugging the device.
When I connect the device again, I'm not able to get Mass storage if i run
map -r. But serial port will start to work fine again.

If I run devices command, it is not shown as mass storage. but as linux
gadget.
Now if I use disconnect command, and followed by connect command to this
device with mass storage driver, I'm able to mount the mass storage and use
it.
The issue is present if I load my serial driver, which uses device's VID
PID. If I unload this driver and do the unplug-plug, I'm able to get mass
storage automatically..

What could be the issue? Is there any way to solve this?

(sorry for long post, it's difficult to explain otherwise)

Thanks again.
Regards,
Keshava

On Tue, 30 May 2017 at 20:56 Carsey, Jaben <jaben.carsey@intel.com> wrote:

> I think that you will always need to inform the UEFI Shell of the change.
> It is not designed to automatically do detection of added/removed/changed
> devices.
>
>
>
> I think that your solution to use the code from mount makes the most sense.
>
>
>
> -Jaben
>
>
>
> *From:* GN Keshava [mailto:keshava.gn@gmail.com]
> *Sent:* Thursday, May 25, 2017 11:02 PM
> *To:* Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
> *Subject:* Re: [edk2] Unmount and mount a mass storage from shell
> *Importance:* High
>
>
>
> Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is that,
> the USB client is a Linux storage gadget, which needs to be remounted to
> get the updated/new files created by Linux. Anyhow, now I'm doing this
> programmatically by copying mount command code from older shell. :)
>
>
>
> One more issue is that, after Linux updates some file (on client side,
> Linux will mount the same partition, save some file, and then umount the
> partition. Then if i remount the partition on Host side, when host is
> windows, i will get updated files) I will manually remove and connect the
> cable (MS device), UEFI is not able to detect the MS itself. (This issue
> observed, regardless of remount. This issue is not there on windows 10
> host).
>
> Can you give some pointers on this?
>
>
>
> Thanks a lot, Jaben.
>
>
>
> Regards,
>
> Keshava
>
>
>
> On Thu, 25 May 2017 at 21:26 Carsey, Jaben <jaben.carsey@intel.com> wrote:
>
> You can "disconnect" the driver
> You can do "map -d" to delete a mapping
>
> I am unsure what your goals are for mount/unmount
>
> -Jaben
>
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > GN Keshava
> > Sent: Wednesday, May 24, 2017 10:59 PM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] Unmount and mount a mass storage from shell
> > Importance: High
> >
> > How can I unmount and mount a mass storage fs from UEFI shell?
> >
> > In older EFI shells, I can do with "mount" command. But it just does
> > "mapping" in newer shell. It doesn't actually remounting the device.
> >
> > Please help.
> >
> > thanks
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-31  3:35       ` GN Keshava
@ 2017-05-31 15:53         ` Carsey, Jaben
  2017-05-31 16:23           ` GN Keshava
  0 siblings, 1 reply; 7+ messages in thread
From: Carsey, Jaben @ 2017-05-31 15:53 UTC (permalink / raw)
  To: GN Keshava, edk2-devel@lists.01.org

Keshava,

After you remove and replug it, I think you need to do "connect -r" to recursively reconnect drivers, then do the "map -r" to generate a new mapping.  

Reconnecting drivers is standard user behavior after plug in a USB device.  It is not expected to happen automatically.

-Jaben

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> GN Keshava
> Sent: Tuesday, May 30, 2017 8:35 PM
> To: Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] Unmount and mount a mass storage from shell
> Importance: High
> 
> Hi Jaben,
> 
> Thanks a lot for your input.
> 
> As I have mentioned in previous mail, I'm facing an issue now, that, If I
> reconnect my client device, the mass storage is not able to mount again
> automatically.
> Here is few more details. Expecting some help on this :
> 
> I connect the the client device to UEFI host. I get the mass storage
> successfully. (device is listed as Mass storage in devices command)
> The client device also has serial CDC functionality (It is Linux CDC
> gadget, which will enumerate as both Mass storage (FAT32) and CDC serial
> com port).
> To use serial port, I have developed a custom serial driver. I use VID PID
> of the device in this custom driver to bind the driver to the device. I
> load this driver, and I get serial port (It is listed in sermode command)
> Now I refresh the mapping using map -r. Still I get the mass storage of
> device, and I'm able to access it correctly.
> Now I disconnect the client from host (UEFI) by unplugging the device.
> When I connect the device again, I'm not able to get Mass storage if i run
> map -r. But serial port will start to work fine again.
> 
> If I run devices command, it is not shown as mass storage. but as linux
> gadget.
> Now if I use disconnect command, and followed by connect command to this
> device with mass storage driver, I'm able to mount the mass storage and use
> it.
> The issue is present if I load my serial driver, which uses device's VID
> PID. If I unload this driver and do the unplug-plug, I'm able to get mass
> storage automatically..
> 
> What could be the issue? Is there any way to solve this?
> 
> (sorry for long post, it's difficult to explain otherwise)
> 
> Thanks again.
> Regards,
> Keshava
> 
> On Tue, 30 May 2017 at 20:56 Carsey, Jaben <jaben.carsey@intel.com>
> wrote:
> 
> > I think that you will always need to inform the UEFI Shell of the change.
> > It is not designed to automatically do detection of
> added/removed/changed
> > devices.
> >
> >
> >
> > I think that your solution to use the code from mount makes the most
> sense.
> >
> >
> >
> > -Jaben
> >
> >
> >
> > *From:* GN Keshava [mailto:keshava.gn@gmail.com]
> > *Sent:* Thursday, May 25, 2017 11:02 PM
> > *To:* Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
> > *Subject:* Re: [edk2] Unmount and mount a mass storage from shell
> > *Importance:* High
> >
> >
> >
> > Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is that,
> > the USB client is a Linux storage gadget, which needs to be remounted to
> > get the updated/new files created by Linux. Anyhow, now I'm doing this
> > programmatically by copying mount command code from older shell. :)
> >
> >
> >
> > One more issue is that, after Linux updates some file (on client side,
> > Linux will mount the same partition, save some file, and then umount the
> > partition. Then if i remount the partition on Host side, when host is
> > windows, i will get updated files) I will manually remove and connect the
> > cable (MS device), UEFI is not able to detect the MS itself. (This issue
> > observed, regardless of remount. This issue is not there on windows 10
> > host).
> >
> > Can you give some pointers on this?
> >
> >
> >
> > Thanks a lot, Jaben.
> >
> >
> >
> > Regards,
> >
> > Keshava
> >
> >
> >
> > On Thu, 25 May 2017 at 21:26 Carsey, Jaben <jaben.carsey@intel.com>
> wrote:
> >
> > You can "disconnect" the driver
> > You can do "map -d" to delete a mapping
> >
> > I am unsure what your goals are for mount/unmount
> >
> > -Jaben
> >
> > > -----Original Message-----
> > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > > GN Keshava
> > > Sent: Wednesday, May 24, 2017 10:59 PM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] Unmount and mount a mass storage from shell
> > > Importance: High
> > >
> > > How can I unmount and mount a mass storage fs from UEFI shell?
> > >
> > > In older EFI shells, I can do with "mount" command. But it just does
> > > "mapping" in newer shell. It doesn't actually remounting the device.
> > >
> > > Please help.
> > >
> > > thanks
> > > _______________________________________________
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
> >
> >
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Unmount and mount a mass storage from shell
  2017-05-31 15:53         ` Carsey, Jaben
@ 2017-05-31 16:23           ` GN Keshava
  0 siblings, 0 replies; 7+ messages in thread
From: GN Keshava @ 2017-05-31 16:23 UTC (permalink / raw)
  To: Carsey, Jaben, edk2-devel@lists.01.org

Thanks Jaben,

I will test this...

Thanks a lot for the help...

Regards,
Keshava

On Wed, May 31, 2017, 9:23 PM Carsey, Jaben <jaben.carsey@intel.com> wrote:

> Keshava,
>
> After you remove and replug it, I think you need to do "connect -r" to
> recursively reconnect drivers, then do the "map -r" to generate a new
> mapping.
>
> Reconnecting drivers is standard user behavior after plug in a USB
> device.  It is not expected to happen automatically.
>
> -Jaben
>
> > -----Original Message-----
> > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> > GN Keshava
> > Sent: Tuesday, May 30, 2017 8:35 PM
> > To: Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
> > Subject: Re: [edk2] Unmount and mount a mass storage from shell
> > Importance: High
> >
> > Hi Jaben,
> >
> > Thanks a lot for your input.
> >
> > As I have mentioned in previous mail, I'm facing an issue now, that, If I
> > reconnect my client device, the mass storage is not able to mount again
> > automatically.
> > Here is few more details. Expecting some help on this :
> >
> > I connect the the client device to UEFI host. I get the mass storage
> > successfully. (device is listed as Mass storage in devices command)
> > The client device also has serial CDC functionality (It is Linux CDC
> > gadget, which will enumerate as both Mass storage (FAT32) and CDC serial
> > com port).
> > To use serial port, I have developed a custom serial driver. I use VID
> PID
> > of the device in this custom driver to bind the driver to the device. I
> > load this driver, and I get serial port (It is listed in sermode command)
> > Now I refresh the mapping using map -r. Still I get the mass storage of
> > device, and I'm able to access it correctly.
> > Now I disconnect the client from host (UEFI) by unplugging the device.
> > When I connect the device again, I'm not able to get Mass storage if i
> run
> > map -r. But serial port will start to work fine again.
> >
> > If I run devices command, it is not shown as mass storage. but as linux
> > gadget.
> > Now if I use disconnect command, and followed by connect command to this
> > device with mass storage driver, I'm able to mount the mass storage and
> use
> > it.
> > The issue is present if I load my serial driver, which uses device's VID
> > PID. If I unload this driver and do the unplug-plug, I'm able to get mass
> > storage automatically..
> >
> > What could be the issue? Is there any way to solve this?
> >
> > (sorry for long post, it's difficult to explain otherwise)
> >
> > Thanks again.
> > Regards,
> > Keshava
> >
> > On Tue, 30 May 2017 at 20:56 Carsey, Jaben <jaben.carsey@intel.com>
> > wrote:
> >
> > > I think that you will always need to inform the UEFI Shell of the
> change.
> > > It is not designed to automatically do detection of
> > added/removed/changed
> > > devices.
> > >
> > >
> > >
> > > I think that your solution to use the code from mount makes the most
> > sense.
> > >
> > >
> > >
> > > -Jaben
> > >
> > >
> > >
> > > *From:* GN Keshava [mailto:keshava.gn@gmail.com]
> > > *Sent:* Thursday, May 25, 2017 11:02 PM
> > > *To:* Carsey, Jaben <jaben.carsey@intel.com>; edk2-devel@lists.01.org
> > > *Subject:* Re: [edk2] Unmount and mount a mass storage from shell
> > > *Importance:* High
> > >
> > >
> > >
> > > Hi Jaben, Thanks a lot for input. My necessity for unmount-mount is
> that,
> > > the USB client is a Linux storage gadget, which needs to be remounted
> to
> > > get the updated/new files created by Linux. Anyhow, now I'm doing this
> > > programmatically by copying mount command code from older shell. :)
> > >
> > >
> > >
> > > One more issue is that, after Linux updates some file (on client side,
> > > Linux will mount the same partition, save some file, and then umount
> the
> > > partition. Then if i remount the partition on Host side, when host is
> > > windows, i will get updated files) I will manually remove and connect
> the
> > > cable (MS device), UEFI is not able to detect the MS itself. (This
> issue
> > > observed, regardless of remount. This issue is not there on windows 10
> > > host).
> > >
> > > Can you give some pointers on this?
> > >
> > >
> > >
> > > Thanks a lot, Jaben.
> > >
> > >
> > >
> > > Regards,
> > >
> > > Keshava
> > >
> > >
> > >
> > > On Thu, 25 May 2017 at 21:26 Carsey, Jaben <jaben.carsey@intel.com>
> > wrote:
> > >
> > > You can "disconnect" the driver
> > > You can do "map -d" to delete a mapping
> > >
> > > I am unsure what your goals are for mount/unmount
> > >
> > > -Jaben
> > >
> > > > -----Original Message-----
> > > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf
> Of
> > > > GN Keshava
> > > > Sent: Wednesday, May 24, 2017 10:59 PM
> > > > To: edk2-devel@lists.01.org
> > > > Subject: [edk2] Unmount and mount a mass storage from shell
> > > > Importance: High
> > > >
> > > > How can I unmount and mount a mass storage fs from UEFI shell?
> > > >
> > > > In older EFI shells, I can do with "mount" command. But it just does
> > > > "mapping" in newer shell. It doesn't actually remounting the device.
> > > >
> > > > Please help.
> > > >
> > > > thanks
> > > > _______________________________________________
> > > > edk2-devel mailing list
> > > > edk2-devel@lists.01.org
> > > > https://lists.01.org/mailman/listinfo/edk2-devel
> > >
> > >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-31 16:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-25  5:59 Unmount and mount a mass storage from shell GN Keshava
2017-05-25 15:56 ` Carsey, Jaben
2017-05-26  6:02   ` GN Keshava
2017-05-30 15:25     ` Carsey, Jaben
2017-05-31  3:35       ` GN Keshava
2017-05-31 15:53         ` Carsey, Jaben
2017-05-31 16:23           ` GN Keshava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox