Re: Pre-made live image with actual functioning persistent storage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/11/20 1:48 PM, Matthew Miller wrote:
We're going to spend some of our remaining budget on a swag refresh, and as
part of that, we're getting some shiny new USB sticks, and partly
considering the recent discussion about making it easy for new users to try
without committing, we're getting ones with decent speed and quality and
room for a persistent overlay.

It has been approximately a decade since I made such an image. Does anyone
have a recipe for creating one with persistent storage (and possibly a
separate home filesystem, or however that should be set up on btrfs?)


I'm going to be less than helpful with specifics, but btrfs has this feature called "seed devices" that allows you to generate a btrfs device that is read only. The mechanical steps are here

https://btrfs.wiki.kernel.org/index.php/Seed-device

This is actually what we use for all of our network switches inside FB, we generate a seed image that is dd'ed onto the devices. On bootup they find the other partition on the device and add it to the boot up device (which is the seed device) before the remount rw step, which gives you the scratch space. This scratch space is cleared on reboot because the seed device is the boot target and since it's RO it can't be modified to know anything about the scratch device.

This provides a kind neat/clean way to make the live environment permanent. Simply btrfs device add /dev/whatever /, btrfs device delete /dev/seed /, btrfs device delete /dev/scratch-partition /. This copies all of the data we need from the seed device to the local drive and then you're good to go. Obviously the boot loader needs to do its boot loader thing and such, but the copy is nice and efficient.

There's no tooling for this, but if one wanted to build tooling around it then this would be the way to do it generally. Not super helpful for you right now, but in case anybody is bored and looking for something to do, this is how I would do it. Thanks,

Josef
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux