12

I have a laptop with a spare microSD card. I am planning to install Ubuntu 16.04 on that card and use it alongside Windows. What are the pros and cons of running Ubuntu from a SD card? I don't think there are any pros apart from not having to disturb the Windows partitions. I assume lower read and write speed is one drawback. How slow would it be in layman terms? And what are the other drawbacks.

Any recommendations on the card will also be appreciated.

SDAdam
  • 129
  • 1
  • 1
  • 4
  • 4
    To put it in to perspective, a class 6 SD Card will get speeds of about 10MB/s. A mechanical hard drive should get around 200MB/s. In essence, an SD Card will be so slow, you're probably going to end up throwing it out of the window. – Lewis Smith Nov 08 '18 at 09:36
  • 2
    The only benefit is that you don't need extra cable and box, just an SD. But an external SATA SSD with UASP box will be far more better. – Alvin Liang Nov 08 '18 at 09:52
  • 1
    @LewisSmith The card (class 10) is advertised as up to 100 MB/s. Does that make any difference? – SDAdam Nov 08 '18 at 09:52
  • @SDAdam - Real world speeds will certainly be below that. I'd argue that it would still be too slow to be worthwhile, but that is just my personal opinion. You'd be better grabbing a USB3 portable hard drive from somewhere and installing Ubuntu to that. – Lewis Smith Nov 08 '18 at 09:54
  • I remember when 100MB/s was cutting edge.... and it wasn't actually that long ago. – xyious Nov 08 '18 at 19:40
  • 1
    @SDAdam That’s for sequential speeds, but random read/write speeds will be much lower. – Steve Nov 08 '18 at 20:19
  • The discussion about maximum throughput ignores latency, which is an easy win for SD cards. – MSalters Nov 08 '18 at 22:04
  • 4
    This is comparable to how Raspberry Pi systems work correct? – zero298 Nov 09 '18 at 00:49
  • It's fine, within living memory HDD's were on 33MHz IDE ribbons. Many people mount half of their Android device folders from these too. Also EeePC users. The PI zero does it, and is well usable once buffering levels out. Card speed may be throttled by your bridge of course. – mckenzm Nov 09 '18 at 04:59
  • @LewisSmith that's a bit misleading, considering that you pretty much never hit 200MB/s with hard drives, except for very specific circumstances, and running an OS is not one of those circumstances. An SD card will deal much better with the nature of OS access, and be much more faithful to its advertised speed. Not that a 10MB/s SD would be anywhere close to a modern hard drive. But also in reality if it's only the OS that's running from the SD card, then it will still be very fast. – Levi H Feb 23 '20 at 04:24

7 Answers7

9

I think the limit is the card reader and not the card.

But how about you install a persistent system an that card. This way it's like a live system and more parts are loaded into memory. The boot takes longer but should be faster in use.

Writing to the card won't be very fast. But I think that's an option to try.

Kev Inski
  • 1,021
7
  • Please check first, that your computer can boot from the card reader

  • This link may help you install Ubuntu into your microSD card (an installed system like installed into an internal drive).

  • A good alternative might be to create a persistent live drive with mkusb

  • If problems to read or write later on, try according to this link.


Please notice that an SD card

  • is much slower

  • is much more sensitive to wear of the memory cells and corruption of the logical system to distribute the wear

than an SSD connected via eSATA or USB 3 or a high-end USB 3 pendrive. See this link and links from it.

sudodus
  • 46,324
  • 5
  • 88
  • 152
3

In addition to the potential speed problems that already have good answers here, there is another issue that you may want to consider.

I assume you are talking about a built-in SD card slot, as is common in newer laptops. You need to make sure that this is a bootable device, and that it will play nice with your bootloader (GRUB or whatever). Some laptops have a BIOS option similar to "Enable Secure Digital (SD) Card Boot", which allows this. But others (for instance my Dell Precision) actively forbids access to the SD card slot during boot, as it's connected to the PCI-E bus, and not allowed to load the drivers that it would need to use it during boot.

It's worth noting that some people have had success using chained bootloaders in order to inject the drivers into the boot process, you may want to look over Ubuntu's official "boot from SD" page here.

Additionally, "boot managers" are also a potential solution for this, for instance the badly-named Plop Boot Manager.

cawwot
  • 332
2

You will ruin the SD Card in the long run.

SSDs (and similar Storage which includes SD Cards) degrades by each write cycle. If you have a Live ISO, that won't be a problem (but that's probably not what you want & only if you have no swap partition). With a normal Ubuntu however, the write load will be far above what SD Cards are made for, thereby degrading the card a lot faster than it usually would (we're still talking about years or so, it's not like the card will burn the second you boot it)

Hobbamok
  • 138
  • 5
  • 2
    "a system that resets with every restart" - you mean a regular live ISO? FYI, if you have the ram to copy everything toram, then your read & write speeds (in ram) could be measured in GB/second – Xen2050 Nov 08 '18 at 20:19
  • Beside the point, but SSD's have lifespans comparable to HDD's. – wjandrea Nov 09 '18 at 17:46
  • @wjandrea yes, but there's a difference between an SSD and an SD Card. And that difference mostly shows in their lifespan. Because the cards weren't made for the constant writing that internal Hard drves experience – Hobbamok Nov 15 '18 at 12:16
2

Pros:

  1. Small
  2. Easy to (re)image using windisk32, dd or Etcher
  3. Various storage sizes to choose from
  4. Various speed classes to choose from
  5. Portable
  6. Everyone is doing it (Raspberry Pi, etc)

Cons:

  1. Faster Speed class equates to more money
  2. Seating, sometimes hard to get in/out of sd card slot in a laptop
  3. Sdcard slot access could be slower than say a USB3 sd card reader
  4. BIOS may want USB card reader vs installed SD Card Reader
  5. Virtual Machines have a hard time reading from an SD Card reader and prefer a USB SD Card reader at times. See this long post on issues: https://superuser.com/questions/373463/how-to-access-an-sd-card-from-a-virtual-machine
  6. Need OS to be sd card aware to avoid wear leveling issues. Look at these file system alternatives to help maximize your experience.

Lastly, I like the Sandisk Pro sd card family for my Linux distros.

1

I'm a Xubuntu user (formerly Ubuntu) who has been running its OS on a 16 GB microSD card for about one and a half year, so I'll relate my experience.

Speed

The general experience is indeed slower than having the OS on a HDD, but not that slow. While I don't recommend it if you need top performance, I'd say the difference is negligible for the average use (web browsing, music, videos, office suite, basic multimedia edition). In fact, I switched from Ubuntu to Xubuntu to make the most of the limited hardware (XFCE is faster than Unity and GNOME).

Reliability

In all this time the only reliability issue I have faced is when I accidentally move the microSD card and I/O errors show up. It frequently happened to me until I get used to have a microSD card near of my hand when typing, but it still ocassionally happens for external factors. The filesystem gets corrupted and I'm unable to boot normally as fsck needs to be run manually, but such command has never failed me so I can use the system again in a couple of minutes. The worst part is to lose unsaved work, but it is not a big issue if you are used to constantly save the important things (and Firefox is really good when it comes to restore my tabs :'D). Please note that this issue may damage the card in the long term.

Storing

16 GB of storage capacity. The installation process left me with about 5-7 free GB. I only need a few more programs of what comes by default and I store most of my files on the cloud and external devices, so this free space is enough for my needs (but it may not be the same for you).

Conclusion

Install the OS on a HDD/SSD if you have the possibility or if you actually need top performance. Otherwise, installing it on a microSD card is a good choice.

nxnev
  • 341
0

In addition to slowness, the Linux drivers for SD cards are notoriously buggy and produce data corruption from time to time. This affects even laptops with "eMMC" SSDs (essentially, a high-speed SD card soldered onto the motherboard). I have one of these and every week or so the kernel reports a spurious error due to the card not finishing an operation within an arbitrary 1-second allowance the kernel gives it, and forcibly switches the drive to read-only, requiring a reboot. Sometimes this also leaves corruption that requires a fsck, and (thankfully rarely) actual data loss.

You don't want to run from an actual slow SD card along with these problems. A good alternative would be a low-profile USB 3 flash drive that fits mostly inside the USB port. These are available in huge sizes now, at least 128 GB and probably 256-512 GB.

  • 1
    "In addition to slowness, the Linux drivers for SD cards are notoriously buggy" - Do you have a reference for that? I believe you if you say you're having troubles, but that doesn't mean it's universal. I don't recall ever experiencing those problems (and I have a laptop with eMMC storage). Also note that Raspberry Pi's are essentially Linux PCs with an SD card as the only storage. – marcelm Nov 08 '18 at 18:09
  • 1
    @marcelm: I diagnosed (leading to a fix upstream) a longstanding bug in the Linux SPI subsystem that was causing significant corruption on SD cards a couple years ago. The issue ended up being essentially no locking around certain critical sections due to undocumented and misused protocol for ownership of a certain lock. And RPis( which you mention) are notorious for SD card corruption still. The specific problem I'm still experiencing frequently on my laptop might be specific to my particular hardware, but these subsystems being incredibly buggy is an ongoing pattern. – R.. GitHub STOP HELPING ICE Nov 08 '18 at 18:17