Tag Info

Hot answers tagged

9

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 ...


9

LVM is not overkill if you have 17 partitions. (IMHO) As for the partition limit, it just happens to be the default. Probably no one expected that many partitions on a device that used to have only a few megs. /usr/src/linux/Documentation/devices.txt: 179 block MMC block devices 0 = /dev/mmcblk0 First SD/MMC card ...


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 ...


5

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 ...


5

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 ...


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

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 ...


4

The image file will already contain partitions and a boot sector therefore you cannot copy it to a partition. Instead you need to copy the image to the whole SD Card: sudo dd if=Cubian-desktop-x1-a10-hdmi.img of=/dev/mmcblk0 bs=4096; sync Note the lack of p1 at the end of the output file. You could probably increase the block size too - try bs=1M ...


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

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

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

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 ...


3

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.


3

There are a number of issues with your test, some fuzzy, some not. It also depends on your goal. Two subtle, sort of fuzzy issues are: You are not reading from the same area you are writing to, your read test effectively, then, does nothing (unless the controller has read disturb correction, in which case it may occasionally move the page being read to ...


3

Btrfs uses crc32c checksums to check the integrity of blocks. If the checksum doesn't match the block when it's read then an alternative block is read. This is assuming there is an alternative (RAID1). If that block also fails or if there is no alternative an EIO (error input/output) is returned. I do not know of any way to automatically detecting errors, ...


3

Solution: dd if='input_file.bin' \ of='/dev/sd{X}' \ bs={desired write block size} \ seek={start offset in bytes} \ count={write size in bytes} \ oflag=seek_bytes \ iflag=count_bytes From the man page: count_bytes treat 'count=N' as a byte count (iflag only) ... seek_bytes treat ...


3

I would attempt to do this using UNetbootin. It runs on Windows, Linux, & OSX.            You should be able to mount your SD card under Windows, and target it as a drive in UNetbootin's UI.


3

why is it in /dev/mmcblk0p1 instead of some sdx? That's caused by udev' rules. 'sdx' - that's a typically udev name for SATA-based devices. Since it shows b FAT32 W95 should I use -t vfat option to mount? Yes, this is a correct option to use. why sudo file -s /dev/mmcblk0p1 is returning /dev/mmcblk0p1: x86 boot sector? So should I use another ...


2

Something similar was discussed in electronics.stackexchange.com: How do I protect SD card against unexpected power failures? A sideways answer which works in tandem with software solutions is to look at the hardware (there was a question on ESE about this too, but I can't find it now; it wasn't strictly about SD cards, just about devices losing power and ...


2

/sys/block is the place to look for this. When the card reader is plugged in, it lists two block devices in the style of sd*, where * is a letter. It's as though the system has added a physical scsi device without any way to access the media (unless of course there's a formatted partition on it, which the hotplug system mounts automatically through mdev's ...


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

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

Just be aware that when SD cards fail they fail suddenly and catastrophically. Hard drives may give you some advance warning and degrade gracefully. You can usually mount a failing hard drive and retrieve data. SD cards don't give you that chance.


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 ...



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