1

I read here that SD cards can be worn, so I am looking for an alternative that I can use 7/24 for a web server. Is a simple usb stick good for this purpose? Can I boot from that?

1

You should use hight quality SD cards so it will not worn out too fast.

But if you are still worried, you could add a USB disk and only use the USB card to boot the machine and use the disk for all other things.

  1. Use the external USB disk as root partitions and other and only use SD card as a boot device, but store all data on USB disk.
  2. Use the external USB disk as data disk, but keep the root partition on SD card. So use USB disk with partitions for /var, /srv (created for servers storage) and others.

Basicly you can do those steps in this way:

  • I you want root file system on the hard disc, change the file cmdline.txt in the SD card to boot from a root (/) partition on the USB hard disk. Change the boot= part in the line with boot=/dev/sda1.
  • Create the partitions you need on the USB disk, like partitions for file systems for /var, /usr and /srv etc. If you changed cmdline.txt you need to create a new / partition and then copy all files from the SD card root file system. I reccomend the use of rsync to do that.
  • In the /etc/fstab in the root file system (on SD card or the USB disk) configure so the file systems on the USB disk is mounted. You should probably use partitions LABEL= or UUID= instead of device names because the device names can change between boot.

Try to reboot with the machines. Doing this from top of my head, so look at this like a out line of the procedure.

2

you should not worry about SD card replacement when using it in a web server, it should last a few years, if your usage patterns are not too extreme.

1

You can use the branded SanDisc Pro/Ultra cards or Samsung "waterproof" SD cards. USB can be used as a storage but. I don't know can you boot from USB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.