Software > Firmware

Mount USB drive in petitboot to write pb-sos files

(1/1)

FlyingBlackbird:
How can I mount a writable USB drive? I have tried many ways (where mount is even showing rw) but the files are not stored on the drive once I plug it into another machine.

It looks like there is an transient overlay file system...


--- Code: ---# show available devices
ls /var/petitboot/mnt/dev/
# create a mount point
mkdir /mnt/usb
# mount your usb drive
mount /var/petitboot/mnt/dev/sdb /mnt/usb-stick  # is mounted read-only
--- End code ---

I have tried various remounts, device paths, options etc. but with no success...

FlyingBlackbird:
It seems I have found a solution:

https://sthbrx.github.io/blog/2016/08/17/getting-in-sync/

The reason is a "snapshot" layer that intecepts writes into a temporary in-memory file system to support changes of mounted devices without the danger of changing them physically/permanently.

Assuming your USB drive is sda you can remount as read-write, copy files and sync the changes to the physical device like this:


--- Code: ---mount -o remount,rw /var/petitboot/mnt/dev/sda1
cp /var/log/messages /var/petitboot/mnt/dev/sda1/
pb-event sync@sda1
--- End code ---


TODO: I must add this to the wiki somewhere (found no good place for that ATM)

Navigation

[0] Message Index

Go to full version