Yes, you can hot swap the SD card in Raspbian *I think*.Franxois wrote:I think piCore is great and should have more visiblility.
I just try to unmount and remove the sdcard and the raspberry is still running. Is there other OS who allow that ??
Code: Select all
sudo nano /etc/udev/rules.d/98-tc.rulesCode: Select all
KERNEL=="ram*", SUBSYSTEM=="block", GOTO="tc.rules_end"
KERNEL=="loop*", SUBSYSTEM=="block", GOTO="tc.rules_end"
ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/sh -c '/usr/local/sbin/usbadd.sh %k'"
ACTION=="remove", SUBSYSTEM=="block", RUN+="/bin/sh -c '/usr/local/sbin/usbremove.sh %k'"
LABEL="tc.rules_end"
Code: Select all
sudo udevadm control --reload-rulesCode: Select all
sudo nano /usr/local/sbin/usbadd.shCode: Select all
#!/bin/sh
rebuildfstab
sleep 3
mount /dev/$1 /mnt/$1
Code: Select all
sudo nano /usr/local/sbin/usbremove.shCode: Select all
#!/bin/sh
umount /mnt/$1
sleep 1
rmdir /mnt/$1
rebuildfstab
Code: Select all
sudo chmod a+x /usr/local/sbin/usbadd.sh
sudo chmod a+x /usr/local/sbin/usbremove.sh
Code: Select all
sudo nano /opt/.filetool.lstCode: Select all
etc/udev/rules.d/98-tc.rules
usr/local/sbin/usbadd.sh
usr/local/sbin/usbremove.shCode: Select all
filetool.sh -b