I just moved the / filesystem to an ssd and modified the /boot/cmdline.txt:
root=/dev/sda1 rootfstype=ext4 rootwait quiet osmcdev=rbp2
After a reboot it looks fine!
But the system is automatically mounting /dev/mmcblk0p2 to /media/xxxxxxxxx
How can I disable mounting the second partition from the sd-card?
You could move the FAT partition to the SSD and boot just from that (if your RPi is young enough) then you don’t need the SD at all.
Let me think about it…
Actually it would be ok to just boot from SD-card and keep the data on ssd.
Any chance to not mount /dev/mmcblk0p2 automatically?
I don’t understand what the downside is to having mmcblk0p2 mount, but the answer is you would have to dig in the udev rules I believe.
That’s why I don’t need mmcblk0p2 automatically mounted on system startup.
/dev/sda1 220G 2,2G 206G 2% /
/dev/mmcblk0p1 316M 30M 286M 10% /boot
/dev/mmcblk0p2 15G 2,2G 12G 17% /media/5b1a8e1f-334b-404c-b0ff-0a213e1c1f5b
Any ideas where exactly to look for disabling?
I can’t give give it to you on a plate but you might find a way to blacklist the partition based on its UUID. Here’s a USB flash drive I added to my Pi3:
osmc@osmc:~$ blkid -o udev -p /dev/sda1
A hacky workaround might simply be to include it in
/etc/fstab with the
noauto option. With a bit of luck udisks-glue won’t pick it up since it has the potential to be mounted. Haven’t tried it myself and am out of time for today. Good luck!
That was a complicated solution, for sure, but kudos to the poster for having the courage to deal with udisks-glue.
I managed to try out my hacky workaround in /etc/fstab – and it works. The classic one-liner!
osmc@osmc:~$ grep dummy /etc/fstab
UUID=c91adeb7-28d9-434a-99bf-b6aa283e2d9e /mnt/dummy ext2 noauto,nofail 0 0
/dev/mmcblk0p1: UUID="A269-73B7" TYPE="vfat" PARTUUID="a13c9b62-01"
/dev/sda1: UUID="c91adeb7-28d9-434a-99bf-b6aa283e2d9e" TYPE="ext2" PARTUUID="9fce7055-01"
/dev/mmcblk0: PTUUID="a13c9b62" PTTYPE="dos"
The /etc/fstab was my second choice, but Yes it works.
Thanks and take care!