summaryrefslogtreecommitdiff
path: root/src/gpt-auto-generator/gpt-auto-generator.c
Commit message (Collapse)AuthorAge
* stop complaining about unknown kernel cmdline optionsLennart Poettering2014-06-19
| | | | | Also stop warning about unknown kernel cmdline options in the various tools, not just in PID 1
* gpt-auto-generator: there's no point in looking for a superblock on raw ↵Lennart Poettering2014-03-13
| | | | disk, we only care for a partition table
* gpt-auto-generator: print debug messages when we ignore a block deviceLennart Poettering2014-03-13
|
* gpt-auto-generator: honour read-only and no-auto flag from GPT dataLennart Poettering2014-03-13
| | | | | | Similar to the read-only and no-automount flags of Microsoft Basic Data Partitions, introduce our own flags. We map them to the same flag bits as Microsoft's, to keep things simple.
* gpt-auto-generator: don't return OOM on parentless devicesTomasz Torcz2014-03-12
|
* gpt-auto-generator: rename root device node symlink to /dev/gpt-auto-rootLennart Poettering2014-03-11
| | | | | | Before it was placed in /dev/disk/by-id, which makes it a bit too much API. However, it's mostly an implementation detail for now, hence move it out of the stable block device dir.
* nspawn: add --image= switch to boot GPT disk images that follow the ↵Lennart Poettering2014-03-10
| | | | Discoverable Partitions Specification
* gpt-auto-generator: probe only partition table and partitions we are ↵Lennart Poettering2014-03-08
| | | | | | | | interested in Instead of iterating through the list of partitions and probing them all with blkid, simply probe the partition table and use that information to only probe the partitions we care for.
* gpt-auto-generator: automatically find the root disk of the systemLennart Poettering2014-03-07
| | | | | | | | | | | | | | | When run in an initrd and no root= argument is set (or is set to root=gpt-auto) we will automatically look for the root partition on the same disk the EFI ESP is located on. Since we look for swap, /home and /srv on the disk the root partition is located on, we hence have a fully discoverable chain: Firmware discovers the EFI ESP partition → the initrd discovers the root partition → the host OS discovers swap, /home, and /srv. Note that this requires an EFI boot loader that sets the LoaderDevicePartUUID EFI variable, such as Gummiboot.
* generators: make automatic discovery generators work correctly when reloadingLennart Poettering2014-03-06
| | | | | | | | In addition to checking whether the diestination mount point is populated, check whether it is already a mount point. If it is already a mount point, or if it is unpopulated, let's create the unit.
* generators: add Documentation= fields that point to the generator man pagesLennart Poettering2014-03-06
|
* gpt-auto-generation: set a pretty description stringLennart Poettering2014-03-06
|
* gpt-auto-generator: properly handle LUKS partitionsLennart Poettering2014-03-06
|
* update TODOLennart Poettering2014-03-06
|
* generators: rework mount generatorsLennart Poettering2014-03-06
| | | | | | | | | | | | | - Add support for finding and mounting /srv based on GPT data, similar to how we already handly /home. - Share the fsck logic between GPT, EFI and fstab generators - Make sure we never run the EFI generator inside containers - Drop DefaultDependencies=no from EFI mount units - Other fixes
* gpt-auto-generator: use EBADSLT code when unable to detect partition typeZbigniew Jędrzejewski-Szmek2014-01-11
| | | | | ENODEV suggests that something is missing, which is be misleading here.
* gpt-auto-generator: skip nonexistent devicesŁukasz Stelmach2014-01-11
| | | | | | | | | | | | The devices we work with have eMMC chips for storage. The chips provide four "hardware" partitions. The first is /dev/mmcblk0, it takes almost whole space and holds a GPT with several real partitions (/dev/mmcblk0p?). Then there are three block devices (mmcblk0boot0, mmcblk0boot1, rpmb) that are part of the same hardware as mmcblk0 that are presented by the kernel as children of the latter. That relationship makes gpt-auto-generator try to peek them but since they are not GPT partitions blkid_do_safeprobe() returns -2 making verify_gpt_parition() function return -ENODEV.
* fix scan-build issuesThomas Hindoe Paaboel Andersen2013-12-10
| | | | | | | | | | | | | | | | | | | | | The static analyzer scan-build had a few issues with analysing parts of systemd. gpt-auto-generator.c: scan-build could not find blkid.h. Whether it should be blkid.h or blkid/blkid.h seems to depend on the version used. We already use blkid/blkid.h in udev-builtin-blkid.c so it seems safe to use that here too. Makefile.am: Moved some -D's from CFLAGS to CPPFLAGS. I also simplified them a bit and got rid of a left over DBUS_CFLAGS. test-cgroup-mask.c/test-sched-prio.c A variable was added to store the replaced TEST_DIR. When wrapped in an assert_se TEST_DIR was not replaced in the logged error. While not an issue introduced in this patch we might as well fix it up while we are here.
* bus: add generator that turns old dbus1 activation files into .busname + ↵Lennart Poettering2013-12-03
| | | | .service units
* gpt-auto-generator: Generate explicit dependencies on systemd-fsck@.service ↵Thomas Bächler2013-10-19
| | | | | | instead of using FsckPassNo [tomegun: check for OOM]
* util: allow trailing semicolons on define_trivial_cleanup_func linesLennart Poettering2013-10-14
| | | | | | | | | | | | | | | | Emacs C indenting really gets confused by these lines if they carry no trailing semicolon, hence let's make this nicer for good old emacs. The other macros which define functions already do this too, so let's copy the scheme here. Also, let's use an uppercase name for the macro. So far our rough rule was that macros that are totally not function-like (like this ones, which define a function) are uppercase. (Well, admittedly it is a rough rule only, for example function and variable decorators are all lower-case SINCE THE CONSTANT YELLING IN THE SOURCES WOULD SUCK, and also they at least got underscore prefixes.) Also, the macros that define functions that we already have are all uppercase, so let's do the same here...
* Introduce udev object cleanup functionsZbigniew Jędrzejewski-Szmek2013-10-13
|
* ModernizationZbigniew Jędrzejewski-Szmek2013-10-13
| | | | Fixes minor leak in error path in device.c.
* gpt-auto-generator: exit immediately if in containerZbigniew Jędrzejewski-Szmek2013-10-03
| | | | | Otherwise we get an ugly warning when running systemd in a container.
* gpt-auto-generator: do not assume that /dev/block/%u:%u is useableLennart Poettering2013-09-17
| | | | | | The generator might run before udev, and udev sets up the /dev/block/ symlinks, hence we cannot use them from the gpt generator. Instead, manually translate a major/minor to a device node.
* Rename F_TYPE_CMP() to F_TYPE_EQUAL()Zbigniew Jędrzejewski-Szmek2013-08-20
|
* gpt-auto-generator: do not show error for non-GPT disksZbigniew Jędrzejewski-Szmek2013-08-20
|
* gpt-auto-generator: use _cleanup_ for blkid_free_probeZbigniew Jędrzejewski-Szmek2013-08-20
|
* gpt-auto-generator: include device name in error reportsZbigniew Jędrzejewski-Szmek2013-08-20
|
* build-sys: Add configure check for linux/btrfs.hMichael Marineau2013-08-16
| | | | | | | | | | | btrfs.h was added to uapi in Linux 3.9. To fix building with older header versions this adds a configure check for the header and re-adds btrfs definitions to missing.h which was removed in bed2e820 along with two other ioctls used by gpt-auto-generator. [ Apparently, btrfs.h was only added recently: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=55e301fd57a6239ec14b91a1cf2e70b3dd135194 let's re-add it for now -- kay ]
* gpt-auto-generator: fix swap unit generationLennart Poettering2013-08-13
|
* gpt-auto-generator: Skip /home mounting if /home is not emptyLennart Poettering2013-08-13
|
* gpt-auto-generator: add basic auto-discovery of GPT partitionsLennart Poettering2013-08-13
This adds a simple generator that is capable of automatically discovering certain GPT partitions by their type UUID and mount/enable them. This currently covers swap partitions and /home partitions, but is expected to grow more features soon. This currently doesn't handle LUKS encrypted /home. This enables all swap partitions of type 0657fd6da4ab43c484e50933c84b4f4f, if found. This mounts the first partition of type 933ac7e12eb44f13b8440e14e2aef915 as /home, if it is found.