Hi, I am now able to boot the board from a ubuntu USB stick, my plan is to install ubuntu to a empty sd-card. However all sd cards (Transcend, SanDisk, Intenso; 16GB, 32GB) are detected as readonly. When inserting a sd -card dmesg shows the following: [ 732.954886] mmc1: new ultra high speed SDR104 SDHC card at address 59b4 [ 732.956289] mmcblk1: mmc1:59b4 USDU1 15.0 GiB (ro)udevadm monitor shows: KERNEL[894.513403] add /devices/pci0000:00/80860F14:01/mmc_host/mmc1/mmc1:59b4 (mmc) KERNEL[894.514899] add /devices/virtual/bdi/179:32 (bdi) KERNEL[894.519474] add /devices/pci0000:00/80860F14:01/mmc_host/mmc1/mmc1:59b4/block/mmcblk1 (block) UDEV [894.522250] add /devices/virtual/bdi/179:32 (bdi) UDEV [894.523492] add /devices/pci0000:00/80860F14:01/mmc_host/mmc1/mmc1:59b4 (mmc) UDEV [894.573978] add /devices/pci0000:00/80860F14:01/mmc_host/mmc1/mmc1:59b4/block/mmcblk1 (block)hdparm /dev/mmcblk1 shows: /dev/mmcblk1: HDIO_DRIVE_CMD(identify) failed: Invalid argument readonly = 1 (on) readahead = 256 (on) geometry = 490976/4/16, sectors = 31422464, start = 0 When I set the device than to readwrite with hdparm r=0 /dev/mmcblk1, I receive: /dev/mmcblk1: HDIO_DRIVE_CMD(identify) failed: Invalid argument readonly = 0 (off) readahead = 256 (on) geometry = 490976/4/16, sectors = 31422464, start = 0 however, the device is still read-only: dd if=/dev/zero of=/dev/mmcblk1 bs=512 count=10 dd: failed to open '/dev/mmcblk1': Read-only file system However all my tested cards are read-write, when I plug them in an USB-card reader, connected to the Udoo-x86 Thanks for any hints!
Lots of hints on the internet like this one: http://askubuntu.com/questions/249376/read-only-sd-cards
There is unfortunately no useful hint in the internet. Problems discussed there are either write-protection sliders, wrong permissions on the mount directory broken/damaged partition data broken/damaged file system. However here the problem is before all that. The kernel itself identifies the raw device as RO, when plugged in. I tried several recent *ubuntu derivates (Ubuntu, Mate, Ubuntu Studio and Lubuntu), all with 64bit kernel 4.8.0-22 and 4.8.0-45. in addition I tried the most recent Ubuntu 17.04 beta with kernel 4.10.0-13 (64-bit) I know, that the micro-sd card is not using the USB interface. I mentioned, that my cards are making no problem at all, when used via an USB card reader. That should proof, that the cards itself have no problem. Everytime when I plug in a card the two lines in dmesg look like: mmc1: new ultra high speed SDR104 SDHC card at address 59b4 mmcblk1: mmc1:59b4 USDU1 15.0 GiB (ro)That is the same for cards without any partition data and for cards with valid partition information an filesystem. Each card with a valid filesystem is recognised and can be used read only.
We've just tried to install Ubuntu from a bootable SD-card, flashed with Ubuntu 16.10 Kernel 4.8, and we are able to write on the Micro SD, it doesn't appear as read-only. Anyway we are going on with tests and we'll let you know as soon as possible.
Could you guys give us the links to the model of SDs you got, so we can order them and test them here?
Here's what I know from testing, so far Windows 10 as zero issues with writing to the SD card and tried with both class 4 and class 10 cards. It's slow as dirt and this did make an SD card image process fail trying to create an SD card for an IOT device (Rapsberry Pi3) using the supplied microsoft tool where a plug in USB to microSD card adapter worked fine, but as far as normal within the OS writes to SD card it functions.
SAME problem, DMESG LOG ---------------------------------------------------------------------------------------------- mmc1: new ultra high speed SDR104 SDHC card at address aaaa mmcblk1: mmc1:aaaa SL16G 14.8 GiB (ro) mmcblk1: p1 ---------------------------------------------------------------------------------------------- Micros SD Card - Sandisk Ultra Class 10, 16 Gb OS - Ubuntu 16.04 (4.4.0-71-generic) I also tried multiple other cards ( 4Gb, 8Gb ) but no luck ! Kindly guide Best, @nccchirag
Hi @Chirag A, many thanks for providing this info. Did you changed something in the BIOS? If you restore the default configuration in the BIOS through the F9 key, do you get the same behaviour from your SD?
I've had this kind of problem with most Linux distributions. The SD card gets set to read-only because the linux distro doesn't think you have the proper permissions or ownership of the card. This always happens because another computer formatted the sd card. There is some painful method I remember chmod +x or chown that you can do. Another trick that you might be able to do is to use another computer and delete the partition tables fdisk/gparted (linux) or diskman (windows) and leave it unformatted. Insert it into the Udoo and then have the Udoo format it via fdisk or right clicking on it -> format [I do this in live mode in linux]. That should make the Linux Distro think that it's the owner of the card. Otherwise happy hunting with chmod or chown.
Yes I did update the BIOS .. but hadn't changed any settings .. nevertheless I tried F9, No luck with that too
chmod / chown isn't a solution for this case .. even if you plug in a raw unpartitioned micro SD card ... it does not work ! you cannot partition using gparted
If you have a windows installation on hand you can try installing it to a formated SDcard just to test if it is the Udoo board or a bad SDcard. Windows is more liberal and doesn't care about ownership like linux does. If it does start to install then that means it's definitely Linux being Linux. It would have to be a permissioning issue at that point. Try unmounting then mounting it another way. Be sure to use the sdcard device name /dev/SDCARDDEVICENAME I think yours is mmcblk1 and I updated command to reflect that. Method One: sudo mount -t vfat -o rw,uid=1000 /dev/mmcblk1 /mnt/sdcard This makes you the owner when mounting. Method Two: sudo mount -t vfat -o rw,umask=000 /dev/mmcblk1 /mnt/sdcard This leaves root the owner, but lets everyone write.
thank you for the help, but no luck with either methods... in both cases it is mounting the SD as "read-only" .. the OS detects it as write-protected .. ( dmesg logs show that ) .. I think it's something relating to hardware as, the same SD card works on other SBC's ( raspberry pi, odroid etc )
This does not help, because /dev/mmcblk1 is already ReadOnly! That is the cause, that you are neither able to create partititions, create filesystems etc.. Without beeing mounted the command "echo "TEST" > /dev/mmcblk1" (as root!) gives the write permission failure.
I wish I could be of more help. I can usually figure out this kind of issue. I have over 10 micro SDcards 5 different types and can put write protection with different file system types fat32, ext2, ext4... on them and then test them on the Udoo x86 then try removing the protection when I receive my Udoo. It could be anything from a linux driver issue [likely, might need some special NUC driver], bad SDcards [unlikely], Permissioning issues [likely, I'd need to exhaustively test them], Udoo bios firmware [unlikely since it's still reading]. When I get my Udoo I'll figure it out.
Did some more research. There is a Sony SD-CARD specification: http://www.digitalspirit.org/file/index.php/obj-download/docs/sd/TOSHIBA_SD_Card_Specification.pdf Page 13, figure 7 shows how a SD card is wired to the host. Despite the fact, that micro sd-cards have no write protection slider, I assume, that the host interface is still the same, having a write-protection input. Can it be, that this write protection input is pulled to Vss by a solder bridge or whatever?
Here is actual SoC datasheet (for N3710) - page 25 says that it's "Designed to work with I/O cards, Read-only cards and Read/Write cards" but pages 93-94 which list actual signals doesn't seem to mention any write-protect signal. Also Wikipedia page Secure Digital says that there is also a programmable write-protect[1] and that physical write-protect is optional feature which is not supported by all host devices. [1] "The host device can command the SD card to become read-only (to reject subsequent commands to write information to it). There are both reversible and irreversible host commands that achieve this."
As far, as I understand the SD-card mechanisms, there are a bunch of possibilities to protect the card. The programmable write protect, you mentioned from the Wikipedia-article. Here for example is a standalone device, which can program a card: http://hackaday.com/2013/11/12/keep-your-sd-cards-data-safe-with-the-sd-locker/ This information is stored in a register inside the card, and is either temporary or final. The latter is used sometimes for archive issues, when you need to make sure, that data is not tampered. The problem I am facing i think is related to this optional write protection input on the SD-card host. Here a hint would be helpful, if there is the possibility, to check if this specific pin from the SoC is reachable on the board, to check its state with an oscilloscope or a voltmeter. All my tests are showing, that the cards are writable, as soon, as I plug them into a usb based reader on the same udoo board. As well on all my other computers, raspberrys, pine64, ....
Hi everyone, this isn't an hardware problem, but a firmware bug that will be fixed shortly. In the meanwhile, the only viable workaround is to plug a Wi-Fi-BT M.2 expansion card, like the one in the shop. I know it sounds weird, but this will remove the bug.