2

I have a raspberry pi 2 which I've had booting off a USB SSD hard drive for some time. Now I have bought a raspberry pi 3 and was hoping that it would be as simple as swapping the hard drive and setting the appropriate cmdline.txt on the SD card of the new raspberry pi. Unfortunately, the pi 3 seems to start the boot process, but ultimately stops and reports a message starting with "Welcome to emergency mode!". The exact message is the same as the one shown in the image at the bottom of this post (but this is just an image from the internet, net what's actually shown on my screen)

Here is exactly what I have done. On the pi 2 I had a large format SD card (which doesn't physically fit in the new pi 3). On this card I have set cmndline.txt to the following:

dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=PARTUUID=712ae4a6-73d8-4aca-9ec6-b6e507c95f74 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait program_usb_timeout=1 max_usb_current=1

I have formatted my SSD USB drive and given the root partition the PARTUUID shown in the command line.

fstab on the SSD contains the following:

proc            /proc           proc    defaults          0       0
PARTUUID=d96b7723-01  /boot           vfat    defaults          0       2
#PARTUUID=d96b7723-02  /               ext4    defaults,noatime  0       1
PARTUUID=712ae4a6-73d8-4aca-9ec6-b6e507c95f74  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

To move to the pi 3, I have a new SD card with raspbian installed(pi 2 is also running raspbian, this is what is installed on the SSD), but have again edited the cmdline.txt to be the same as on the pi 2. Apart from that I have left everything the same.

In case it is relevant, during boot, I get a message:

a start job is running for dev-disk-by\x2dpartuuid-d96b7723\x2d01.device/start timed out

This runs for 90 seconds then the boot process continues. Looking through the systemd journal I see an entry like:

Timed out waiting for device dev-disk-by\x2dpartuuid-d96b7723\x2d01.device

There are other errors after this, but I guess this is the root cause?

So, can this work, and if so, how?

enter image description here

1 Answer 1

2

If you have formatted your drive you cannot simply copy the PARTUUID from the old cmdline.txt because it is very likely that PARTUUID has changed because of using disk management tool. You can show the current PARTUUID of a device with command (example my raspi)

rpi3 ~$ sudo blkid
/dev/mmcblk0p1: LABEL="BOOTFS" UUID="FD05-FCE6" TYPE="vfat" PARTUUID="fc106d89-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="fe203383-3df5-41a3-9234-c20da61a96fd" TYPE="ext4" PARTUUID="fc106d89-02"
/dev/mmcblk0: PTUUID="fc106d89" PTTYPE="dos"
rpi3 ~$

But for this you have to mount the drive anywhere. You can attach it to another running linux system and do the command or you can boot your current system with a fresh flashed SD Card with Raspbian Stretch Lite to execute blkid. The shown device names /dev/mmcblk0* depends on which system the drive ist mounted and can show e.g. /dev/sdd* or so.

You can also simply try to use the device names /dev/mmcblk0p1 for the boot partition instead of PARTUUID=d96b7723-01 and /dev/mmcblk0p2 instead of PARTUUID=712ae4a6-73d8-4aca-9ec6-b6e507c95f74 for the root partition (your SDD drive) in cmdline.txt and /etc/fstab. But this is a blind try. Maybe you have to use /dev/mmcblk0p3 for your drive or another number?

2
  • No, to be clear, I mean that I originally formatted the drive with that PARTUUID, it's still the same. However, the other thing in fstab, d96b7723-01 refers to the old SD card, which obviously is no longer right! I think this must be the culprit! I'l try the /dev/mmcblk0p1 for the boot partition to see if that gets things going.
    – crobar
    Commented Mar 22, 2018 at 14:38
  • I can confirm the answer was, obviously, that the old SD card referenced in fstab couldn't be found. I replaced with /dev/mmcblk0p1 and have now booted successfully.
    – crobar
    Commented Mar 22, 2018 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.