New Raspberry pi 3B, NOOBS, boots and runs fine out of the box. Now I want to mount an external drive and have everything happen there once boot is complete.
I tried to follow https://learn.adafruit.com/external-drive-as-raspberry-pi-root/overview but even after correcting for the place where it forgot to run a command with sudo, it fails to update the new /etc/fstab or /boot/commandline.txt - and after updating them manually, the pi wouldn't boot and I had to use Shift to get into the editor and put them back the way they were.
To be clear, I'm not trying to boot from the USB drive directly. I understand that's now somewhat possible but it's not what I want to do. I want the SD card to handle original boot, and then mount the external drive as / and have everything else happen there.
The script from Adafruit seemed to a good job of copying files over to the external drive. I think that part is fine. The drive itself works fine - if I leave things alone it shows up in /media/pi. But the goal is to all I/O happen to the external drive after boot - /tmp, /var, /home, everything. So just leaving the drive on /media is not the goal.
Note the drive is being connected to a powered hub; my problem isn't lack of power.
Can someone give exact steps to get this to work? It's a default NOOBs install; the SD came out of the box all set to go. I'm not competent in Linux config so be gentle.
Edit: as requested, fdisk -l output with ram stuff excluded
Disk /dev/mmcblk0: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000dbbe0
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 2855468 2847277 1.4G e W95 FAT16 (LBA)
/dev/mmcblk0p2 2855469 62521343 59665875 28.5G 5 Extended
/dev/mmcblk0p5 2859008 2924541 65534 32M 83 Linux
/dev/mmcblk0p6 2924544 3065855 141312 69M c W95 FAT32 (LBA)
/dev/mmcblk0p7 3072000 62521343 59449344 28.4G 83 Linux
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A2FE449B-F1D0-4121-A75D-C3D65CEBFC13
Device Start End Sectors Size Type
/dev/sda1 2048 976773119 976771072 465.8G Linux filesystem
Note: gparted reports the UUID of /dev/sda1 as 7443c13f-2c7c-4601-bdcb-5371d0587c26 I think the PARTUUID is 56f6bbee-de99-4b17-81a8-9c0dbb84053a
sudo fdisk -l /dev/mmcblk0
and the corresponding entry for your HDD into your Question you can get a more specific answer./dev/sda
as identifier. I have only used a MBR HDD. The PI can mount GPT once booted BUT the bootloader is VERY BASIC!