Tag Info

Hot answers tagged

8

I think stress testing an SD card is in general problematic given 2 things: wear leveling There are no guarantees that one write to the next is actually exercising the same physical locations on the SD. Remember that most of the SD systems in place are actively taking a block as we know it and moving the physical location that backs it around based on the ...


7

While they are quite reliable (no moving parts), SD cards/USB flash drives can be slower (you probably do not want to run disk-intensive operations from there) and have limited write cycles. From this Super User question: Flash memory indeed has limited write cycles. However, by now it is unlikely that you'll encounter this within the normal lifetime of ...


7

The reason that switch_root is not working on the command line is this code in busybox: if (st.st_dev == rootdev || getpid() != 1) { // Show usage, it says new root must be a mountpoint // and we must be PID 1 bb_show_usage(); } You are not PID 1, so you are falling though into this bb_show_usage. The implication is that ...


7

hdparm --trim-sector-ranges can trim a range. The man page warns to use it, so you better be sure you got the right range and syntax. I think sending a trim for all data outside a partition would be dangerous, as there is some hidden data there sometimes like bootloader code or second partition tables. You'd need to know exaclty, which areas outside of ...


6

I do this and it works just fine for me. But I only use it on one computer; the biggest problem I see with using the same card for two means you can only use one at a time. Just something to watch out for: I ran into a bit of trouble because the system was trying to mount the /home directory before the SD card was detected, aborting the boot process. I had ...


4

Just adding some points to slm's answer - note these are more in place for SSDs than for "dumb" SD cards, since SSDs play much dirtier tricks with your data (e.g. de-duplication): you are writing 64KB to the beginning of the device - this itself has two problems: flash cells usually have erase blocks of size from 16KB up (more likely in the 128-512KB ...


4

Well, the way you can fix this is to fix the "power can be cut at any time" problem. Is it impossible to add even a minute of battery power? Alternatively, maybe you could use two SD cards. Write the data to one card, sync, write to the other. Each block of your data would need a checksum and block number, but then even with some pretty unlucky power ...


4

I've ran an entire system from an SD card before (over USB 1.0!) It was extremely slow. I was running OpenBSD. It has softdep which increased performance by a large amount, though that doesn't transfer to Linux. I'd say the biggest thing to make sure of is that you mount it with noatime, this way, you don't get penalized by every read you do. Also, you ...


3

From my experience, I will really suggest NO. On past few years working of Linux environment for my development purposes, the thing that matters most is performance and stability and SD cards are hardly meant for those, I believe they serve as secondary storage more(Please correct me If I am wrong), rather than primary high speed storage such as HDD itself. ...


3

You must tell apart the resizing of a block device (here: /dev/sdb4) from the resizing of a file system. A file system can be smaller but not bigger than the underlying block device. You should make a backup of the partition table: sfdisk -d /dev/sdb > ~/sfdisk_sdb.txt Then you make a copy of that file and adapt the line that looks similar to this: ...


3

Short answer The card is password-protected. (@derobert's guess is right.) And kernel modules do not provide useful pointers to this. TL;DR: I was suspecting this but I did not know that it's a SD-specific hardware feature; I thought that the Nokia simply encrypts the partition which I would be able to solve by action like mkdosfs /dev/sdb or such. Too ...


3

SD cards are pretty much the worst kind of flash storage. They're fine for cameras that do large linear reads and writes to FAT format cards, and don't overwrite the same spot very often, but they wear out very quickly of you try to put a rootfs on them. I have a very unhappy card in a dev board to prove it. I don't know of a way to monitor the card, but in ...


3

If you have a recent enough version of util-linux, it contains the tool blkdiscard which is able to TRIM entire devices, or ranges within a device using --offset and --length options. Please note: blkdiscard is dangerous, if you let it TRIM the wrong regions, your data is gone! So you can figure out the unpartitioned (free) regions of your partition table ...


2

Without looking at the kernel source, that would depend on the specific SD chip and its kernel driver. You should look at datasheets and the kernel source. For example, on my laptop: $ lspci | grep SD 15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21) Presumably, the chip implements the SD state machine in hardware, ...


2

For Data Security in an environment with the possibility of power cuts and overall data security you should conider even more points. USE NO MLC cells for storage, only SLC have a data retention time which is sufficient. Then those SLC cards can have smart firmware, some cannot under any state be corrupted by power loss. They recognize the power cut by ...


2

After rebooting on the generic Slackware kernel I noticed the SDcard was detected as a SCSI device - dmesg output follows: [ 205.694553] usb 2-2: new high-speed USB device number 3 using ehci_hcd [ 205.812086] usb 2-2: New USB device found, idVendor=0cf2, idProduct=6250 [ 205.812100] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4 [ ...


2

I have a lot of bad experience with MicroSD-Cards. They seem to be very sensitive. I have some, that are readable in a Navigon routing device. But not in my Thinkpad X40 internal card reader (with SD card to microSD adaptor). I never tried that—but I should—to clean the contacts of the card. Maybe that helps. I think that at least one of the contacts has ...


2

You wouldn't as a SD card normally doesn't look like a ISO image. Instead have a look at EXTLINUX. In short: Mount your sd card run extlinux --install MOUNTPOINT/boot


2

mmcqd is a kernel process responsible for the I/O queue. If you're getting high resource usage from this, that means your SD card is too slow for your video stream. In cases like this, you really need a class 10 SD card or an UHS card designed for video streaming. The reason the system responds after an eject/insert is becuase the queue is cleared.


2

To check that you obtain the same tar file, you could do (here with GNU tar): cd /where/it/was/extracted && tar tf /path/to/file.tar | tar -T - --no-recursion -cf - | cmp - /path/to/file.tar Note that it compares content and metadata including ownership and times. So for instance, if you didn't extract the files as root, ownership are likely ...


2

If your home folder is not huge and all your PCs have normal connectivity, you could try one or more of these cloud storage services: Dropbox, Google Drive, Sugarsync, Microsoft Skydrive (but there are many more). We're living in times of cloud storage and ubiquitous connectivity: if you don't have particular constraints, using a SD to bring your documents ...


2

The error message says "Is een map" which is Dutch for something like "Is a directory". You can't dd a directory. You have to have a file or another device as source and target. if and of respectively. Bad dd if=/some/directory of=/another/file dd if=/some/directory of=/some/device dd if=/some/directory of=/some/directory dd if=/some/device ...


2

This does the job: Put the card in a card reader on your machine. See the end of dmesg to find the device path (for example /dev/sdx). If the device has any data on it, now is the time to back it up! If the device was auto-mounted, sudo umount /dev/sdx. Run sudo gparted /dev/sdx (or gksudo/kdesu if you have one of those). If you have any partitions, delete ...


1

Refer to this page (RPi Easy SD Card Setup) for details on setting up NOOBS and Rasp Pi. This page has lots of details for various burning scenarios, too numerous to list here. References RPi Easy SD Card Setup


1

Peterph's answer did make me consider the issue of possible caching further. After digging around, I still can't say for sure whether any, some, or all SD cards do this, but I do think it is possible. However, I don't believe that the caching would involve data larger than the erase block. To be really sure, I repeated the test using a 16 MB chunk instead ...


1

I would compare the checksums of each file. First is the rootfs folder issue the following command: rootfs# find . -type f -print0 | xargs --null sha1sum --binary > ../rootfs.sum Then in the targetfs folder, check each file: targetfs# sha1sum --check <PATH_TO_SUM_FILE> | grep FAILED


1

You could try resetting a SATA device using the following steps: Assuming the device is named: /dev/mmcblk0p1. Find out which controller the device is attached to (we’ll need this later): $ readlink /sys/block/mmcblk0p1 ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/mmcblk0p1 NOTE: The interesting part if the answer is host1, which ...


1

The reason the inode tables are initialized with zeros it to make sure that any garbage that happened to be there before does not get misinterpreted as a valid inode by e2fsck. Normally it won't make any difference but if e2fsck detects errors, it may try to recover by heuristically recognizing inodes whether or not the bitmap indicates they are in use, and ...


1

Medium error means inability to get raw sector data - it's on lower layer than file systems or even disk partitioning. If Windows works with this card but Linux doesn't, it means that Linux incorrectly detects needed protocol to access it. It's rather often that device misreports needed protocol so special quirk table is used to fix reported data. You should ...


1

To answer your specific question: "So is there a filesystem for SD cards where recovery is virtually gauranteed?" NO! It also appears that you are confusing the issue here. The problem that you describe having is with the way the system handles I/O for removable media, not with the filesystem itself. It is possible to recover corrupted information from ...



Only top voted, non community-wiki answers of a minimum length are eligible