General notes that worked for me
Unmount the device. sudo umount /dev/sda1Delete existing partitions and create a new primary partition.
sudo fdisk /dev/sda1Format and check the device.
sudo mkfs.ext4 /dev/sda1 sudo e2fsck /dev/sda1Mount and copy the OS from the SD card.
sudo mount /dev/sda1 /media/hdd sudo dd if=/dev/root of=/dev/sda1 bs=4MDelete and add the partion (with same settings as previous partitioning).
sudo fdisk /dev/sda1Resize the device
sudo resize2fs /dev/sda1Edit FSTAB on the device.
sudo nano /media/hdd/etc/fstab proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 /dev/sda1 / ext4 defaults,noatime 0 1Change boot parameters on the SD card so that the USB HDD is used as main device for OS.
sudo nano /boot/cmdline.txt dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline rootwaitReboot :)
sudo reboot
Reference: http://c-mobberley.com/wordpress/index.php/2013/04/13/moving-raspberry-pi-root-folders-from-sd-card-to-usb-hdd/
No comments:
Post a Comment