Can you auto mount a device over a previous mount? - Raspberry Pi Forums


so here's want accomplish:
have sd card in 2 partitions - root (/) , remaining 4gb or partition disk images (/tools/images/). in fstab have second partition mounting /tools/images automatically @ boot. want leave there, when insert usb drive have mount on top of/in place of/over - @ /tools/images. if manually mount usb device, works want - ie: /tools/images contains data usb drive, , if umount usb drive returns containing data second partition of sd card. there way automate @ boot time using fstab or .mount units? every attempt i've made mount first device, , throws error along lines of

code: select all

systemd-fstab-generator[54]: failed create mount unit file /run/systemd/generator/tools-images.mount, exists. duplicate entry in /etc/fstab?
i'm sure script mount using either cron or system service, thought fstab etc cleaner solution, , allow me plug in usb drive post boot if forget.

here's why want accomplish this:
pi set headless pxe server, use creating images clonezilla (all need carry micro usb, , network cable in addition pi). have somewhere else stick image not on pi, have /tools/images set on pi home repository in case that's not option. in general, 4gb enough purposes, there occasions need considerably larger, , doesn't easier popping in usb drive big need on rare occasions.

google's been little on specific issue, , head getting sore slamming wall.

can experiment change mount /media/tools?
label usb partition tools, plug in , see automount does.
automount works when plugged in only, fstab on boot only


raspberrypi



Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial