Devo7E filesystem only read-only via USB on Ubuntu

More
01 Jun 2016 09:04 #49710 by skohlbr
Hi everyone,

I installed Deviation 5.0.0 on my Devo7e using my Ubuntu 14.04/AMD64 system successfully. I then tried to proceed and access the file system via USB, but this does not work due apparent file system issues detected by Linux. As a workaround I was able to change the contents of the filesystem from a Windows machine, but this is really cumbersome as I don't use Windows per default. Has anyone else experienced this issue and a workaround for it? Output of dmesg pasted below.
[10181.321516] usb 1-2.1: new full-speed USB device number 15 using xhci_hcd
[10181.411449] usb 1-2.1: New USB device found, idVendor=0483, idProduct=5720
[10181.411452] usb 1-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10181.411454] usb 1-2.1: Product: STM32 Mass Storage
[10181.411455] usb 1-2.1: Manufacturer: STMicroelectronics
[10181.411456] usb 1-2.1: SerialNumber: 8D70316A5751
[10181.412407] usb-storage 1-2.1:1.0: USB Mass Storage device detected
[10181.412910] scsi host7: usb-storage 1-2.1:1.0
[10182.409978] scsi 7:0:0:0: Direct-Access     STM      SD Flash Disk    1.0  PQ: 0 ANSI: 2
[10182.410674] sd 7:0:0:0: Attached scsi generic sg0 type 0
[10182.411000] sd 7:0:0:0: [sda] 512 4096-byte logical blocks: (2.09 MB/2.00 MiB)
[10182.411229] sd 7:0:0:0: [sda] Write Protect is off
[10182.411233] sd 7:0:0:0: [sda] Mode Sense: 03 00 00 00
[10182.411397] sd 7:0:0:0: [sda] No Caching mode page found
[10182.411401] sd 7:0:0:0: [sda] Assuming drive cache: write through
[10182.412199] sd 7:0:0:0: [sda] 512 4096-byte logical blocks: (2.09 MB/2.00 MiB)
[10182.423512]  sda:
[10182.424209] sd 7:0:0:0: [sda] 512 4096-byte logical blocks: (2.09 MB/2.00 MiB)
[10182.424596] sd 7:0:0:0: [sda] Attached SCSI removable disk
[10183.055053] systemd-hostnamed[24324]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[10183.172660] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172663] FAT-fs (sda): Filesystem has been set read-only
[10183.172665] attempt to access beyond end of device
[10183.172667] sda: rw=0, want=524344, limit=4096
[10183.172669] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172671] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172673] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172674] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172676] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172678] attempt to access beyond end of device
[10183.172679] sda: rw=0, want=524344, limit=4096
[10183.172773] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172775] attempt to access beyond end of device
[10183.172776] sda: rw=0, want=524344, limit=4096
[10183.172777] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172779] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172780] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172782] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172783] FAT-fs (sda): error, invalid access to FAT (entry 0x0000ffff)
[10183.172785] attempt to access beyond end of device
[10183.172786] sda: rw=0, want=524344, limit=4096

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 11:05 #49717 by HappyHarry
are you trying to copy data to the drive when the invalid access errors occur? as it looks like you are trying to copy too much data to the drive

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 11:08 #49719 by skohlbr
No, the dmesg appears in the log after plugging in USB and powering up the transmitter in USB mode. The file system is then mounted in read-only mode and I can view files, but not change anything. This is directly after installing the Devo 5.0.0 firmware (using the "format" option) and without any further actions on my part that could screw things up :)

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 11:29 #49721 by HappyHarry
have you tried manually remounting rw, then formatting using gparted or fdisk?

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 11:41 #49724 by skohlbr
What I tried were the steps 11-14 from here: www.rcgroups.com/forums/showpost.php?p=27124295&postcount=444

I then copied the 5.0.0 files onto the newly formatted partition. I was then greeted with a blank screen after powering up the transmitter, making me fear I have bricked it. Luckily, a reflash with 5.0.0 using the Java tool (again using the "format" option) worked fine, but the mounting errors are also back.

I held off doing more low level partitioning experiments afterwards as I don't want to brick the transmitter. If it cannot be bricked from partitioning experiments, I can do some more ;)

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 12:06 #49726 by HappyHarry
you shouldn't be able to brick the tx by formatting only the filesystem, also worrying me is that the tx is showing up as sda, do you have no other drives in your linux box?

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 12:17 - 01 Jun 2016 12:21 #49732 by skohlbr
I have a fancy PCIE SSD as /dev/nvme0 so that's ok.

After running both a
sudo dosfsck -w -r -l -a -v -t /dev/sda
and
sudo fsck.vfat -r /dev/sda
things appear to work now (At least I can change things and start up the transmitter fine).

Will update this thread in case any more issues appear. Thanks for the help!

/edit: So now I can mount the filesystem in Linux, but when trying to select models from the menu, the list is shown empty. So not solved after all :\
Last edit: 01 Jun 2016 12:21 by skohlbr.

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 12:42 #49740 by PhracturedBlue
Replied by PhracturedBlue on topic Devo7E filesystem only read-only via USB on Ubuntu

skohlbr wrote: /edit: So now I can mount the filesystem in Linux, but when trying to select models from the menu, the list is shown empty. So not solved after all :\

I don't think I've ever tried to format the fs in linux, but you need to ensure it formats as FAT12 or FAT16. If it formats as fAT32 the tx can't handle it. Also, long-names are not supported, and linux has a tendency to create them which can also result in this issue. of the tx not seeing the files. I think I found on linux I had to copy all files with ALL-CAPS names to prevent it from creating a long file name (i.e. use MODEL1.INI instead of model1.ini)
There is a utility in the src code (utils/mkfat) which can be used to build a proper FAT fs as an image. you can then use dd to copy that to your drive (/dev/sda1 in your case, but be really really sure...you can't screw up your TX, but you could screw up your PC if you got thiis wrong)

I think you use it like:
mkfat.py --size 4M filesystem/devo7e fat.img
then you would do:
sudo dd if=fat.img of=/dev/sda1
(but again, make sure that path is correct)

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 12:47 #49742 by HappyHarry

skohlbr wrote: I have a fancy PCIE SSD as /dev/nvme0 so that's ok.


i have a samsung 950 pro nvme also, though it's in my gaming desktop/win7 box, they are amazingly fast drives eh!

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 12:54 - 01 Jun 2016 12:57 #49743 by skohlbr
The weird thing is the file system can be mounted and viewed in the UI (and I assume also command line), but filesystem tools such as gparted and fdisk don't see a partition at all (?). Gparted for instance just shows "unallocated space" of 2MB.

I tried the formatting instructions from www.rcgroups.com/forums/showpost.php?p=27124295&postcount=444 once more. After this, the partition shows up as "FAT16", but if I try copying the contents of the zip over (minus the debug...zip and .dfu files) I get an error that there is no space left on device. After deleting some models I managed to copy over also tx.ini, but the transmitter again refuses to boot correctly (showing me a white screen).

Will try the mkfat tool next :)
Last edit: 01 Jun 2016 12:57 by skohlbr.

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 13:07 #49746 by skohlbr
Ok, tried mkfat and it ran through without errors both for generating and copying with DD. I am also able to mount the partition and see the files, but am still greeted by the white screen on switching on the transmitter. Guess I probably should get used to using Windows for accessing the Devo for now :)

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 13:14 #49750 by aMax
Did you try as Big Floppy /Fat16 ( no partition)?

Devo7e, TaranisQ X7, R9M , 4in1 MM, Futaba FC18plusV3.2 & DFT/FLD-02

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 13:24 #49751 by skohlbr

aMax wrote: Did you try as Big Floppy /Fat16 ( no partition)?

No, using which tool and how?

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 13:59 #49753 by aMax
The only tool I know is Pdisk using fdisk, which should do the job.
For bootdisk devices I played with mkfloppy.
Just an idea.

On my slackware rescue file system ( on a windows system) I have the same issue as you.

Devo7e, TaranisQ X7, R9M , 4in1 MM, Futaba FC18plusV3.2 & DFT/FLD-02

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 14:51 #49756 by skohlbr

aMax wrote: The only tool I know is Pdisk using fdisk, which should do the job.
For bootdisk devices I played with mkfloppy.
Just an idea.

If you could provide a example command line as a starting point that would be helpful :)

On my slackware rescue file system ( on a windows system) I have the same issue as you.

Ok, I thought that there are many Linux users of Deviation out there and I have a "freak" issue. Given that it appears across different Linux machines I'm thinking that it is a more fundamental problem.

Please Log in or Create an account to join the conversation.

More
01 Jun 2016 19:25 - 01 Jun 2016 19:35 #49775 by skohlbr
It seems I now managed to make things work, by using:
./mkfat.py --size 2M /home/xps15/Downloads/extr fat.img
and then
sudo dd if=fat.img of=/dev/sda

After the first try I had corrupted graphics displayed (but at least no white screen), but after a reformat and running DD again it now appears to work (fingers crossed).

/edit: I ran a fdisk and selected "create a new DOS partition table" at some point. The "Total Capacity" for the partition is stated as 8.5MB, which appears to be wrong. I guess things would start falling apart when writing over the true disk size, but hopefully it works as long as I don't do that :)
Last edit: 01 Jun 2016 19:35 by skohlbr.

Please Log in or Create an account to join the conversation.

More
02 Jun 2016 01:07 - 02 Jun 2016 01:08 #49798 by PhracturedBlue
Replied by PhracturedBlue on topic Devo7E filesystem only read-only via USB on Ubuntu
sorry. I forgot that the 7e only has 2MB of flash. You should be able to copy to it from Ubuntu once formatted, but remember to make sure the filenames are all-caps otherwsie, it may create long file names and break things
Last edit: 02 Jun 2016 01:08 by PhracturedBlue.

Please Log in or Create an account to join the conversation.

More
02 Jun 2016 06:21 #49806 by skohlbr
Ok, I have lowercase filenames and as mentioned, the disk size gets reported wrongly, but as far as using the transmitter goes (both controlling quads with it and writing to it from Linux) everything appears to be working fine. Complying with "never touch a running system", I'll hold off with further experiments for now and just use it.

Given the above peculiarities, I don't think the issue has been solved satisfactory yet though, so if anybody has tips for making this work without any issues whatsoever on Linux that would still be useful.

Please Log in or Create an account to join the conversation.

Time to create page: 0.045 seconds
Powered by Kunena Forum