6 Replies Latest reply on Nov 10, 2016 1:25 AM by vinay@

    detect USB drive on intel edison

    falak.desai@yahoo.com

      hi everyone,

       

      I'm trying to take backup image of my intel edison mini breakout board on the external usb flash drive.  I've connected my flash drive (8 gb pendrive) through the otg wire.

      now how can I see my flash drive from the intel edison console ?? I want to take recovery image on that external flash drive..

       

      I got commands to backup and restore edison image from this link:  https://communities.intel.com/thread/55807?tstart=0

       

      should I make any changes into my  commands for backup and recovery of image to take it on external flash drive ??

       

       

      By   lsusb   command, i got the following output:

       

      root@edison:/# lsusb

      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

      Bus 001 Device 004: ID 14cd:125c Super Top SD card reader

      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

       

       

      i want to take backup in sd card reader.

       

      help me please...

        • 1. Re: detect USB drive on intel edison
          JPMontero_Intel

          Hello falak.desai@yahoo.com,

           

          To back up your files in a flash drive you have to follow these steps:

          1. Look for the flash drive in the directory /dev. It should appear as sda1 or sdb1. To know the device name use the following command, its output will be the device you need to use in step 3.

                    ls /dev/sd*

          1. Now you have to make a directory where to mount the drive. For example, I'll mount the device in a directory called flashdrive inside /media

                  mkdir /media/flashdrive

          1. Mount the drive into the folder we just created. Use the device name you got in step 1, as an example we are using sda1.

                    mount /dev/sda1 /media/flashdrive

          1. To back up your files you need to use the dd command you will use the if to get what you want to backup in this case /dev/mmcblk0, use of to create the backup file and you can change the name, in this case we are using BackupFile. The bs parameter will select the read and write speed. The command would look like this:

                    dd if=/dev/mmcblk0 of=/media/flashdrive/BackupFile bs=4M

           

          To back up in the SD card you just have to use the following command:

                    dd if=/dev/mmcblk0 of=/media/sdcard/BackupFile bs=4M

           

          Let me know if you are able to make the backup file.


          Regards,
          JPMontero_Intel

          1 of 1 people found this helpful
          • 2. Re: detect USB drive on intel edison
            falak.desai@yahoo.com

            hi JPMontero_Intel

             

            1. ls /dev/sd*


            output:  /dev/sda   /dev/sda1           ( so I got the sda1 )

             

            2. mkdir /media/flashdrive               (I also created the directory called  flashdrive to mount the drive)


            3. mount /dev/sda1 /media/flashdrive  (mounted the drive)


            4. dd if=/dev/mmcblk0 of=/mnt/flashdrive/BackupFile bs=4M  ( run command to back up )


            output:

            root@edison:/# dd if=/dev/mmcblk0 of=/mnt/flashdrive/BackupFile bs=4M

            dd: can't open '/mnt/flashdrive/BackupFile': No such file or directory

             

             

             

            the last, step 4 is still incomplete ...  any solution please...

             

            thanks

            • 3. Re: detect USB drive on intel edison
              JPMontero_Intel

              falak.desai@yahoo.com - I apologize I used a different directory, in the of parameter of the bb command you need to use the same location in which you mounted the device in your case /media/flashdrive. I’ve already corrected my previous reply. You need to use the following command:

               

              dd if=/dev/mmcblk0 of=/media/flashdrive/BackupFile bs=4M

               

              Please try again with this change and let me know if it works.

               

              Regards,
              JPMontero_Intel

              • 4. Re: detect USB drive on intel edison
                falak.desai@yahoo.com

                hi JPMontero_Intel

                 

                Yes, I was about to post this as soon as I get time,

                I did the same command and it worked.. !!

                now I'hv backup of my edison..

                 

                thank you very much..

                • 5. Re: detect USB drive on intel edison
                  falak.desai@yahoo.com

                  hi JPMontero_Intel

                   

                  In my case I used the following command:

                   

                  dd if=/dev/mmcblk1p1 of=/media/flashdrive/BackupFile bs=4M


                  as I'm booting my edison from external sd card, I need to provide the partition name    mmcblk1p1

                  Thank you..

                  • 6. Re: detect USB drive on intel edison
                    vinay@

                    Hi,

                     

                    I was able to read and write data from/to usb pen drive on Edison Arduino expansion board.

                    Which types of USB pendive classes will it supports. I want to use more speed pendrive.. Please suggest anyone.