Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-ramdisk images with data persistence across power cycles #48

Open
benhylau opened this issue May 8, 2018 · 5 comments
Open

Non-ramdisk images with data persistence across power cycles #48

benhylau opened this issue May 8, 2018 · 5 comments
Labels
ssbc Supported by ssbc grant

Comments

@benhylau
Copy link
Member

benhylau commented May 8, 2018

Building both a ramdisk and non-ramdisk .img has been discussed between @hamishcoleman @darkdrgn2k and I.

@benhylau benhylau added the ssbc Supported by ssbc grant label May 8, 2018
@benhylau
Copy link
Member Author

benhylau commented Jun 28, 2018

@hamishcoleman Would like some clarification to how you envision the partitioning to work. In previous conversations we discussed building two .img artifacts, one with ramdisk as it is now, and a new one that has a sdcard root.

From boards/common-partitions.mk it seems we will have three partitions:

PART1_SIZE_MEGS ?= 1000
#PART2_SIZE_MEGS ?= 1000 # reserved for swap
#PART3_SIZE_MEGS ?= 1000 # ext2 root

How will these be set for ramdisk and sdcard root?

Am I correct to assume that having PART2_SIZE_MEGS enabled, replacing this conf.d script will solve the space problem we have in #52? Since the debian packages will now be expanded into a ramdisk that is backed by the swap space? Or does debian.stretch.armhf.cpio expansion occur before the swap space is enabled which means we'd be out of space before PART2 kicks in?

@hamishcoleman
Copy link
Contributor

The cpio expansion happens way before anything else. It happens before the kernel has even finished booting. There is no way to run any scripts or mount any swapspace before the expansion happens.

As stated, I dont know that I can answer your question about partitions - I have not finished writing the code, so it might change that file completely, it would probably not be a simple case of uncommenting those lines (as that would force building one or the other style of image on any given build invocation - which is not ideal)

However, yes, I expect there to be three partitions, one for boot, one for swap and one for root.

@darkdrgn2k
Copy link
Contributor

The cpio expansion happens way before anything else. It happens before the kernel has even finished booting. There is no way to run any scripts or mount any swapspace before the expansion happens.

Unless you rip out all the packages, and the install them at boot time....

@benhylau
Copy link
Member Author

@darkdrgn2k but that's all the stuff in the conf.d directory right? That's not part of the cpio I think?

@darkdrgn2k
Copy link
Contributor

yes, but then you are also risking running out of room on the fat partition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ssbc Supported by ssbc grant
Projects
None yet
Development

No branches or pull requests

3 participants