[systemd-devel] Unit swap.target & Unit boot.mount

poma pomidorabelisima at gmail.com
Mon May 19 04:28:02 PDT 2014


When already dealing with the boot problem, why not simplify more!


dracut-037-11.git20140402.fc21.x86_64

$ ls /usr/lib/dracut/modules.d/
...


/etc/dracut.conf.d/omit_dracut-modules.conf
# man 5 dracut.conf
# turn off modules
omit_dracutmodules+=" bash biosdevname btrfs busybox caps cifs cms convertfs crypt crypt-gpg crypt-loop dasd dasd_mod dasd_rules debug dm dmraid dmsquash-live drm ecryptfs fcoe fcoe-uefi fstab-sys i18n ifcfg img-lib iscsi kdumpbase kernel-modules livenet lvm mdraid modsign multipath nbd network nfs plymouth pollcdrom qemu qemu-net rescue resume selinux shutdown ssh-client syslog systemd systemd-bootchart system-upgrade system-upgrade-fedora terminfo uefi-lib url-lib usrmount virtfs watchdog zfcp zfcp_rules znet "


if omitted:
base         - no root device
fs-lib       - drop to a shell
rootfs-block - drop to a shell
udev-rules   - no root device

Besides if some of the modules are really needed, do not omit them!
e.g. if the Linux MD (software RAID) is used, do not omit the 'mdraid' module.


# dracut --kver 3.15.0-0.rc5.git2.9.fc21.x86_64 -fv
Executing: /sbin/dracut --kver 3.15.0-0.rc5.git2.9.fc21.x86_64 -vf
dracut module 'bash' will not be installed, because it's in the list to be omitted!
dracut module 'systemd-bootchart' will not be installed, because it's in the list to be omitted!
dracut module 'modsign' will not be installed, because it's in the list to be omitted!
dracut module 'rescue' will not be installed, because it's in the list to be omitted!
dracut module 'watchdog' will not be installed, because it's in the list to be omitted!
dracut module 'busybox' will not be installed, because it's in the list to be omitted!
dracut module 'i18n' will not be installed, because it's in the list to be omitted!
dracut module 'convertfs' will not be installed, because it's in the list to be omitted!
dracut module 'network' will not be installed, because it's in the list to be omitted!
dracut module 'ifcfg' will not be installed, because it's in the list to be omitted!
dracut module 'url-lib' will not be installed, because it's in the list to be omitted!
dracut module 'drm' will not be installed, because it's in the list to be omitted!
dracut module 'plymouth' will not be installed, because it's in the list to be omitted!
dracut module 'cms' will not be installed, because it's in the list to be omitted!
dracut module 'system-upgrade-fedora' will not be installed, because it's in the list to be omitted!
dracut module 'btrfs' will not be installed, because it's in the list to be omitted!
dracut module 'crypt' will not be installed, because it's in the list to be omitted!
dracut module 'dm' will not be installed, because it's in the list to be omitted!
dracut module 'dmraid' will not be installed, because it's in the list to be omitted!
dracut module 'dmsquash-live' will not be installed, because it's in the list to be omitted!
dracut module 'kernel-modules' will not be installed, because it's in the list to be omitted!
dracut module 'livenet' will not be installed, because it's in the list to be omitted!
dracut module 'lvm' will not be installed, because it's in the list to be omitted!
dracut module 'mdraid' will not be installed, because it's in the list to be omitted!
dracut module 'multipath' will not be installed, because it's in the list to be omitted!
dracut module 'qemu' will not be installed, because it's in the list to be omitted!
dracut module 'qemu-net' will not be installed, because it's in the list to be omitted!
dracut module 'system-upgrade' will not be installed, because it's in the list to be omitted!
dracut module 'crypt-gpg' will not be installed, because it's in the list to be omitted!
dracut module 'crypt-loop' will not be installed, because it's in the list to be omitted!
dracut module 'cifs' will not be installed, because it's in the list to be omitted!
dracut module 'dasd' will not be installed, because it's in the list to be omitted!
dracut module 'dasd_mod' will not be installed, because it's in the list to be omitted!
dracut module 'dasd_rules' will not be installed, because it's in the list to be omitted!
dracut module 'debug' will not be installed, because it's in the list to be omitted!
dracut module 'fcoe' will not be installed, because it's in the list to be omitted!
dracut module 'fcoe-uefi' will not be installed, because it's in the list to be omitted!
dracut module 'fstab-sys' will not be installed, because it's in the list to be omitted!
dracut module 'iscsi' will not be installed, because it's in the list to be omitted!
dracut module 'nbd' will not be installed, because it's in the list to be omitted!
dracut module 'nfs' will not be installed, because it's in the list to be omitted!
dracut module 'resume' will not be installed, because it's in the list to be omitted!
dracut module 'ssh-client' will not be installed, because it's in the list to be omitted!
dracut module 'terminfo' will not be installed, because it's in the list to be omitted!
dracut module 'virtfs' will not be installed, because it's in the list to be omitted!
dracut module 'zfcp' will not be installed, because it's in the list to be omitted!
dracut module 'zfcp_rules' will not be installed, because it's in the list to be omitted!
dracut module 'znet' will not be installed, because it's in the list to be omitted!
dracut module 'biosdevname' will not be installed, because it's in the list to be omitted!
dracut module 'ecryptfs' will not be installed, because it's in the list to be omitted!
dracut module 'pollcdrom' will not be installed, because it's in the list to be omitted!
dracut module 'selinux' will not be installed, because it's in the list to be omitted!
dracut module 'syslog' will not be installed, because it's in the list to be omitted!
dracut module 'systemd' will not be installed, because it's in the list to be omitted!
dracut module 'usrmount' will not be installed, because it's in the list to be omitted!
dracut module 'img-lib' will not be installed, because it's in the list to be omitted!
dracut module 'kdumpbase' will not be installed, because it's in the list to be omitted!
dracut module 'shutdown' will not be installed, because it's in the list to be omitted!
dracut module 'uefi-lib' will not be installed, because it's in the list to be omitted!
*** Including module: rootfs-block ***
*** Including module: udev-rules ***
Skipping udev rule: 91-permissions.rules
Skipping udev rule: 80-drivers-modprobe.rules
*** Including module: base ***
*** Including module: fs-lib ***
*** Including modules done ***
*** Installing kernel module dependencies and firmware ***
*** Installing kernel module dependencies and firmware done ***
*** Resolving executable dependencies ***
*** Resolving executable dependencies done***
*** Pre-linking files ***
*** Pre-linking files done ***
*** Hardlinking files ***
*** Hardlinking files done ***
*** Stripping files ***
*** Stripping files done ***
*** Store current command line parameters ***
*** Creating image file ***
*** Creating image file done ***


# ll -h /boot/initramfs*64*
...  16M ... /boot/initramfs-3.15.0-0.rc5.git2.1.fc21.x86_64.img
...  16M ... /boot/initramfs-3.15.0-0.rc5.git2.8.fc21.x86_64.img
... 5.0M ... /boot/initramfs-3.15.0-0.rc5.git2.9.fc21.x86_64.img


systemd-212-14.gita077b66.20140519.fc21.x86_64

journal:
...
[    3.811724] systemd-fstab-generator[276]: Checking was requested for /dev/disk/by-uuid/c40ada21-740e-49d9-bbd1-2c2a7c10b028, but fsck.ext4 cannot be used: No such file or directory
[    5.263007] systemd[1]: Expecting device dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.device...
[    5.272376] systemd[1]: Expecting device dev-disk-by\x2duuid-c40ada21\x2d740e\x2d49d9\x2dbbd1\x2d2c2a7c10b028.device...
 -- Subject: Unit dev-disk-by\x2duuid-c40ada21\x2d740e\x2d49d9\x2dbbd1\x2d2c2a7c10b028.device has finished start-up
 -- Unit dev-disk-by\x2duuid-c40ada21\x2d740e\x2d49d9\x2dbbd1\x2d2c2a7c10b028.device has finished starting up.
[   10.250753] systemd[1]: Mounting /boot...
 -- Subject: Unit boot.mount has begun with start-up
 -- Unit boot.mount has begun starting up.
 -- Subject: Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.device has finished start-up
 -- Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.device has finished starting up.
[   10.533682] systemd[1]: Activating swap /dev/disk/by-uuid/85e74fda-7354-4384-8baf-4338e84b9ebe...
 -- Subject: Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.swap has begun with start-up
 -- Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.swap has begun starting up.
[   10.815174] systemd[1]: Mounted /boot.
 -- Subject: Unit boot.mount has finished start-up
 -- Unit boot.mount has finished starting up.
[   10.938026] kernel: Adding 8393924k swap on /dev/sda1.  Priority:-1 extents:1 across:8393924k FS
[   10.828192] systemd[1]: Activated swap /dev/disk/by-uuid/85e74fda-7354-4384-8baf-4338e84b9ebe.
 -- Subject: Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.swap has finished start-up
 -- Unit dev-disk-by\x2duuid-85e74fda\x2d7354\x2d4384\x2d8baf\x2d4338e84b9ebe.swap has finished starting up.
[   10.828638] systemd[1]: Starting Swap.
 -- Subject: Unit swap.target has begun with start-up
 -- Unit swap.target has begun starting up.
[   10.828969] systemd[1]: Reached target Swap.
 -- Subject: Unit swap.target has finished start-up
 -- Unit swap.target has finished starting up.
...


To conclude, dracut tends to provide certain level of extra functionality, but also because of its complexity can cause various problems, such as in this case with breaking the boot.


OK, that's all folks.

poma




More information about the systemd-devel mailing list