2

I have configured a Pi 3 with a gungho pidrive USB-connected 128GB SSD. I started with a 16GB microSD card and used the latest Raspbian Jesse image. All works well once I followed the adafruit guide to switching root to be mounted on the SSD. On boot, root shows 101G available and all is well.

(As others have noted the install procedure provided by the manufacturer does not work which is why I'm doing this method.)

But the pidrive came with a no-label, smaller microSD card to use as boot drive. No need to waste my 16GB card if all it ever reads is a FAT32 boot partition, I could use that in another Pi. So I formatted the small drive as FAT32, copied all of the contents of the FAT32 from the original drive to the small drive and switched them.

On boot everything broke. And I think it is because /etc/fstab refers to the boot drive by UUID and obviously that is different with a different microSD. I understand this is to stop the Pi assigning something else as /dev/mmcblk0p1 and screwing everything up... but there is only one microSD card slot and I am unlikely to ever add another.

What is going to break if I boot the 16GB original microSD, change /etc/fstab (which is actually on the SSD so this will persist once cards are swapped) to refer to /dev/mmcblk0p1, and then put the smaller card back in? I was going to do this at the root prompt when it booted with problems after the first swap attempt. And if that boots, is it important to put the correct UUID of the microSD back in there or just leave it as the device?

I don't know enough Linux to know if there is anything else that could need changing or if this will cause any other problems.

cmdline.txt (manually edited, cut & pasted the UUID from gdisk):

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=8E6F279C-5B82-4069-AE49-94B6BCA57424 rootdelay=5 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

/etc/fstab

proc            /proc           proc    defaults          0       0
PARTUUID=955146da-01    /boot           vfat    defaults          0       2
PARTUUID=955146da-02    /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

With /etc/fstab changed to

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/sda1   /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

everything seems to work fine with no boot complaints. I am a little uneasy about the /dev/sda1 entry still. Is this going to be OK in the long run?

  • 1
    Post /boot/cmdline.txt and etc/fstab – Milliways May 21 '17 at 11:52
  • I should have been more explicit. Is the fstab etc from the working Pi installation? (I haven't used any of the new images, mine still dates from 2105 with updates) sudo blkid should show something like /dev/mmcblk0p2: UUID="0eab6758-022f-40db-8a08-598030a151ba" TYPE="ext4" PARTUUID="e2bce4bf-02" (this is from a SD Card) and you should use the PARTUUID entry. – Milliways May 21 '17 at 12:23
  • To clarify, that is very close to what the original install created. I added another comment over what I changed it to. – Adam Eberbach May 22 '17 at 23:16
  • 1
    I am a little confused about your cmdline.txt where you have root=PARTUUID=8E6F279C-5B82-4069-AE49-94B6BCA57424. That looks more like a UUID than a PARTUUID. Anyway, your fstab of /dev/sda1 / is fine as long as you don't use any other USB key as boot may assign the other USB key as /dev/sda. A better solution would be to use UUID=8E6F279C-5B82-4069-AE49-94B6BCA57424 / or PARTUUID=????????-02 / (your PARTUUID) as found by Milliways command of sudo blkid. – bstipe May 23 '17 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.