Now that you have your Pi booting from SD it is time to convert it to use the SSD (Solid State Drive)
There are other methods to boot but after experimentation I have found this method to be the most reliable. Boot will be handled by the SD card and the OS will be loaded from the SSD. The root folder will be copied from the SD card to the SSD.
This guide assumes that you are using a new SSD i.e. no partitions yet. If it already has partitions then you will need to remove them or use existing. This however will not be covered here. Partition management can be done from the Pi using parted. Google for more.
Open a Terminal and do the following (Type or Copy and Paste):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
sudo parted /dev/sda (parted) mktable msdos Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? yes (parted) mkpart primary ext4 0% 8G (parted) mkpart primary fat32 8G 100% (parted) print ============================================================ Example print output. ============================================================ Model: MTFDBAK1 28MAG-1G1 (scsi) Disk /dev/sda: 128GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 8000MB 7999MB primary ext4 lba 2 8000MB 128GB 120GB primary fat32 lba =========================================================== (parted) quit |
1 2 |
sudo mkfs.ext4 /dev/sda1 sudo mkfs.vfat -n pp_home -F 32 /dev/sda2 |
1 2 3 4 |
sudo mkdir /mnt/target sudo mount /dev/sda1 /mnt/target/ sudo apt-get update; sudo apt-get install rsync sudo rsync -ax --progress / /mnt/target |
1 2 3 4 5 6 7 8 9 10 11 |
cd /mnt/target sudo mount --bind /dev dev sudo mount --bind /sys sys sudo mount --bind /proc proc sudo chroot /mnt/target rm /etc/ssh/ssh_host* dpkg-reconfigure openssh-server exit sudo umount dev sudo umount sys sudo umount proc |
1 2 |
sudo sed -i 's,mmcblk0p2,sda1,' /mnt/target/etc/fstab sudo sed -i '/sda1/a\/dev\/sda2 \/home\/pi\/pp_home vfat umask=002,gid=users 0 0' /mnt/target/etc/fstab |
1 2 3 4 |
cd ~ sudo umount /mnt/target sudo sed -i "s,mmcblk0p2,sda1," /boot/cmdline.txt sudo reboot |
If all has gone well, the Pi should reboot after a few seconds.
After reboot set for reliable drive order. Go here.
Now we can Prepare for & Install PiPresents.