Coder Social home page Coder Social logo

flimage's People

Contributors

johnsonm avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ermo

flimage's Issues

host system conary configuration inherited

It does nothing to avoid using the conary configuration from the
host system. This means that if, for example, you have different
excludeTroves in the system on which you run it from excludeTroves
in the configuration within the image, running conary sync in the
images might add/remove components. (I tend to see this with
:supdoc components. when I build a non-devel system on a
devel system)

Prefer using py3 compatible syntax over 2.x-only syntax

If one day we decide to port flimage to python3, it will probably make the porting process less painful if we have the foresight to begin adopting forward compatible py2.x syntax and idioms.

A simple example would be print() and string substitution:

# forward compatible from 2.6 -> 3.x (note the extra parentheses)
print("There are %s types of people in the world; those who understand binary and those who don't." %
      (bin(2)[2:]))

Additional resources:

images that clean up process properly no longer build

66fb782 introduced a regression where if there is no process left over to kill from tag/script troves the image generation fails and jumps to the inspection shell.

the simple test model bellow triggers it.

search group-world=foresight.rpath.org@fl:2-devel
install group-core
update foresight-conary-config=foresight.rpath.org@fl:2-devel/2-0.3-1
erase libata-migrate

partitioned loopback devices not cleaned up

When flimage was originally written, kpartx -d was successfully removing the device-mapper targets for the partitions when building a hard drive image.

Recently, it is at least sometimes failing doing so, which is leaving loop devices allocated.

It does work to run dmsetup remove /dev/mapper/loopNp1 and losetup -d /dev/loopN so we can do that if kpartx fails.

cleanup fails when tag or trove scripts leave running processes

If tag or trove scripts leave running processes, or possibly in other situations, you will be left with a partitioned loopback-mounted image file and will have to clean up by hand.

You will need to look at the output to know which loopback devices need to be cleaned up. Cleanup will have to be done as root. This example assumes loop0 is the base:

fuser -mkv path/to/mki.something
fuser -k 9 -mv path/to/mki.something
umount path/to/mki.something
dmsetup remove /dev/mapper/loop0p1
losetup -d /dev/loop0

unset root password does not work

When the root password is not set, a literal empty string "" is written to the /etc/passwd file (and thence put in the /etc/shadow file), which does not match any real password.

no swap partition or file created

There should be an option (off by default) for the size of swap to allocate.

If it is a swap file, it should be /var/swap and should have 0600 permissions.

Image swap should never be used during the image build process. The data written to swap would both be extra data to compress and an information security vulnerability if the images are provided to others.

option to leave conarydb off images

For some use cases, there is no need to include the conary database on the installed system. We could add an option to skip copying the conary database into the installed image. We could even (mostly) separate whether to copy in the modelcache, conarydb/rollbacks, and manifest.

The modelcache is trivially rebuilt; including it makes an initial "conary install" operation faster.

The conarydb can be rebuilt from the manifest with recreatedb or from the system model (more expensively) with --just-db if the manifest is not included.

There is no point in the modelcache without the conarydb so eliminating the conarydb should also eliminate the modelcache.

overwriting progress makes steps unclear

Currently, "progress" output for some commands overwrites printing previous commands, but not others, making the steps taken to create the image less transparent (though they are all recorded in the log file).

The progress should simply be printed without hiding completed commands.

no support for multiple partitions on hard drive images

Hard drives images currently always have 2048 sectors reserved, and then a single ext4 partition which takes up all the rest of the disk. It would be good to be able to provide a list of partitions to use. Particularly useful would be putting swap at the front, since that's generally the fastest part of the disk.

enable mounted image inspection

When developing images, it would sometimes be convenient to drop into a shell session in the image chroot in order to inspect the contents of the image without separately mounting and booting it, especially when it's a partitioned image that takes a few extra steps to mount again.

Support creating images for native 4K sector harddrives (--4kn)?

When partitioning GPT disks, in the recent GPT-support commit we leave room for one default stride (64KiB) at the end of the disk. However, we do so with the assumption that one sector is always 512 bytes and that, hence, 128 sectors will equal 64KiB.

Would it make sense to be able to support creating images for modern high-capacity hard drives with native 4K sectors (firmware and physical media both use 4K sectors) by supplying a --4kn argument (implying that 512 byte sectors is the default)?

For 512e drives (firmware reports 512 bytes per sector, physical media uses 4K sectors), we already do the right thing.

See http://en.wikipedia.org/wiki/Advanced_Format for the nitty gritty details and references

sparse images should be the default

In multiple tests (all conducted with the image and logfile being written to an otherwise idle ext4 file system), sparse images were never measurably slower (even when the image was sized to have minimal empty space) and normally faster (whenever the amount of free space was significant).

Therefore, sparse images should be the default.

requires setting PYTHONPATH

The flimage script should probably modify sys.path based on the
executable path rather than assuming that the user has set
PYTHONPATH to point to the directory containing the
imagebuilder module.

add support for GPT partitions, as an option

needed to support larger than 2TB installs and / or 4k sector hdds.
afaict we 'd need to
a) create partition with parted or gdisk
b) flash syslinux' gptmbr.bin on the MBR instead of mbr.bin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.