Menu

Using USB harddrives on RaspberryPi

13. juni 2015 - Linux, Notater
Using USB harddrives on RaspberryPi

This is surprisingly easy.

mount /dev/sdxY /your/sdcard/mountfolder
mount /dev/sdxY /your/usb/mountfolder
cp -r /your/sdcard/mountfolder/* /your/usb/mountfolder
sync

On the boot partition of the sdcard copy the file cmdline.txt -> cmdline.txt.bak.

cp /boot/cmdline.txt /boot/cmdline.txt.bak

Open cmdline.txt and find where it reads

root=/dev/mmcblk0p6

Change it to

root=/dev/sda1

Save your file.

Attach your USB drive to your PI, insert your SD card and plugin power. Your PI will boot faster and you dont wear your SD card down.