0

When I write the Raspberry Pi image to the SD card on Ubuntu using dd, I need to remove the card and plug it in again in order for it's images to be automatically mounted to e.g. /media/$(whoami)/boot/. So that I can touch /media/$(whoami)/boot/ssh to enable SSH.

Is there a way to force this auto-mounting of the partitions after dd?

Janos
  • 457
  • 1
  • 5
  • 12
  • https://askubuntu.com/questions/397190/usb-drive-are-not-mounted-automatically check here – sarru1291 Jun 12 '20 at 17:09
  • You can try with sudo partprobe from a terminal window. – sudodus Jun 12 '20 at 18:56
  • @sarru1291 what exactly are you suggesting to check in the referenced question? – Janos Jun 14 '20 at 12:30
  • @sudodus partprobe doesn't do it for me. – Janos Jun 14 '20 at 12:32
  • 1
    @Janos, Unfortunately, sometimes with memory cards it seems that the only way is to unplug and plug back in order to make the kernel recognize the new partition table in the card and mount the partition(s) found. – sudodus Jun 14 '20 at 14:48

1 Answers1

0

I figured out that using eject -t re-mounts everything, as if the card has been ejected and re-inserted:

sudo eject -t /dev/sdc
Janos
  • 457
  • 1
  • 5
  • 12