Hi. I’m using a headless Raspberry PI B model with the RPI image of yunohost, and i have a Hard Drive of 1 TB and I want to use it as a root partition and leave the SD card as a /boot partittion.
What I usually do is the following (supposing that /dev/sda1 is the hard disk)
- sudo dd if=/dev/mmcblk0p2 of=/dev/sda1 bs=4M (for copying the contents of the sdcard to the hdd)
- sudo e2fsck /dev/sda1 (checking for errors)
- sudo resize2fs /dev/sda1 (resize the partition to fill the hard disk)
- sudo mount /dev/sda1 /mnt (to edit the fstab)
- sudo nano /mnt/etc/fstab
- replace /dev/mmcblk0p2 with /dev/sda1 and save
- sudo umount /dev/sda1
- sudo nano /boot/cmdline.txt
- replace root=/dev/mmcblk0p2 with root=/dev/sda1 and save
- sudo reboot
my problem is that after the reboot, i can’t log in. Maybe because it didn’t boot properly.