Commit Graph

4000 Commits (033-502)

Author SHA1 Message Date
Harald Hoyer 2d7fe72bbb base/init: copy /init.log with rd.copystate=1 2011-03-10 19:16:29 +01:00
Harald Hoyer 661f9a3451 dracut: let some parameters be specified multiple times
These parameters can now be specified multiple times:
-a|--add
--add-drivers
-m|--modules
-o|--omit
-d|--drivers
--filesystems
-I|--install
--fwdir
-i|--include
2011-03-10 17:22:56 +01:00
Harald Hoyer 8466db967e dracut-functions: add pop() and push() 2011-03-10 17:22:56 +01:00
Harald Hoyer 486a1b9324 dracut: make options position independent
now this is possible:
$ dracut test.img -f
$ dracut test.img '' -f
2011-03-10 17:22:56 +01:00
Harald Hoyer 4fea3ea6f1 dracut: make "-i, --include SOURCE TARGET" work for files, too 2011-03-10 17:22:56 +01:00
Harald Hoyer 529349c66d add caps module, to drop capabilities
This adds the following parameters:
rd.caps=1
	turn the caps module on/off
rd.caps.initdrop=cap_sys_module,cap_sys_rawio
	drop the specified comma seperated capabilities
rd.caps.disablemodules=1
	turn off module loading
rd.caps.disablekexec=1
	turn off the kexec functionality

If module loading is turned off, all modules have to be loaded in the
initramfs, which are used later on. This can be done with
"rd.driver.pre="
rd.driver.pre=autofs4,sunrpc,ipt_REJECT,nf_conntrack_ipv4,....

Because the kernel command line would get huge with all those drivers, I
recommend to make use of $initramfs/etc/cmdline.

So, all rd.caps.* and rd.driver.pre arguments are in caps.conf can be
copied to $initramfs/etc/cmdline with "-i caps.conf /etc/cmdline".

Also all modules have to be loaded in the initramfs via "--add-drivers".

The resulting initramfs creation would look like this:

  --add-drivers "autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 \
  nf_defrag_ipv4 iptable_filter ip_tables
  ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack
  ip6table_filter ip6_tables dm_mirror dm_region_hash dm_log uinput ppdev
  parport_pc parport ipv6 sg 8139too 8139cp mii i2c_piix4 i2c_core ext3
  jbd mbcache sd_mod crc_t10dif sr_mod cdrom ata_generic pata_acpi ata_piix
  dm_mod" \
  /boot/initramfs-caps.img
2011-03-10 17:22:56 +01:00
Vadim Kuznetsov 80bafe6d36 mkinitrd: fix incorrect basename in mkinitrd usage message
Steps to Reproduce:
1. run mkinitrd -h

Actual results:
$ mkinitrd
usage: /usr/sbin [--version] [--help] [-v] [-f] [--preload <module>]
       [--image-version] [--with=<module>]
        <initrd-image> <kernel-version>

Expected results:
$ mkinitrd
usage: mkinitrd [--version] [--help] [-v] [-f] [--preload <module>]
       [--image-version] [--with=<module>]
       <initrd-image> <kernel-version>
2011-03-10 17:22:55 +01:00
Harald Hoyer 7838ab5010 kernel-modules/module-setup.sh: fix instmods $filesystems
especially in host_only mode, $filesystems was not honored
2011-03-10 17:22:55 +01:00
Harald Hoyer 5078c98abe move insmodpost and blacklisting to 90kernel-modules
also correctly parse rd.driver.{blacklist,pre,post}
2011-03-10 17:22:25 +01:00
Harald Hoyer 4c4c8b7239 rd.driver.*: accept comma separated list
accept a comma seperated list of kernel drivers for
rd.driver.blacklist
rd.driver.pre
rd.driver.post
2011-03-10 14:11:42 +01:00
Harald Hoyer b177e9133e move all /dev/.initramfs to /dev/.run/initramfs
We want all "/var/run" information to live in /dev/.run, until the real
root is mounted.
Therefore we mount a tmpfs on /dev/.run, which can/will be bind/move mounted
on /var/run later on.
2011-03-10 12:40:47 +01:00
Amadeusz Żołnowski 9fe4f5ff25 crypt: installing all crypto kernel modules instead of few selected 2011-03-09 18:09:23 +01:00
Will Woods 0ddd68f7e6 Add support for in-initramfs live images with "root=live:/path/name.img"
This allows creation of initramfs images which contain a Live system.
The primary use for this is keeping very large initramfs-based systems
(e.g. anaconda, the Fedora installer) compressed in-memory, by using a
compressed filesystem image like squashfs or btrfs.

dmsquash-live-genrules.sh will initqueue dmsquash-live-root itself
(rather than making udev rules) if the given live "device" is actually
an existing, plain file.

parse-dmsquash-live.sh will only accept paths that end in ".img".
dmsquash-live-root will only handle images named "*squashfs.img",
"*ext3fs.img", or "*btrfs.img".
2011-03-09 12:10:22 +01:00
Will Woods 533318113b Look for btrfs.img in dmsquash-live-root
Btrfs is an excellent option for the root fs image for live systems,
especially since it does its own transparent compression.
2011-03-09 12:09:34 +01:00
Will Woods a5e33c7d6f Use 'btrfs' command rather than 'btrfsctl', and install btrfs driver
btrfsctl is being replaced by the btrfs command in the upstream
tools, so change accordingly. Also, if we're using the btrfs module
we should probably make sure the btrfs driver gets installed.
2011-03-09 12:09:29 +01:00
Will Woods dfec8467b9 Change EXT3FS to FSIMG
Change the EXT3FS variable to FSIMG, since we might want to use other
filesystems as our live root. Change comments to reflect this fact.
2011-03-09 12:09:24 +01:00
Will Woods 44159d0598 Make dmsquash-live install the squashfs driver
dmsquash-live uses squashfs, so let's make sure the driver is installed
2011-03-09 12:09:20 +01:00
Will Woods fe9cdf741f inst_dir: fix handling of relative symlinks outside the current dir
inst_dir used the following to try to resolve a relative path:
  [[ $target = ${target##*/} ]] && target="${file%/*}/$target"
  inst_dir $target

This will only match if $target has no slashes, so something like
/usr/bin -> ../sbin would result in: inst_dir ../sbin, or
/usr/share -> local/share would result in: inst_dir local/share
which is not going to do the right thing.

Instead, we resolve any non-absolute link, like so:
  [[ $target == ${target#/} ]] && target=$(dirname "$file")/$target
Thus /usr/bin -> ../sbin results in: inst_dir /usr/../sbin, and
/usr/share -> local/share results in: inst_dir /usr/local/share
which is what you would expect.
2011-03-09 12:09:10 +01:00
Will Woods 3d88d27810 Fix bash logic typo/buglet ([ condition ] & expression) 2011-03-09 12:08:59 +01:00
Amadeusz Żołnowski d8e8e14e0b listing modules fixed
Modules were not listed because code relied only on deprecated 'install'
and 'installkernel' scripts. Check for 'module-setup.sh' script was
added.
2011-03-09 12:08:58 +01:00
Harald Hoyer fa79f00803 test/*/test.sh: mv 01hard-off.sh 000-hard-off.sh
otherwise "die" will let the kernel panic
2011-03-07 16:22:42 +01:00
Amadeusz Żołnowski b20ff981c4 crypt-lib.sh: moved IFS=: from before 'read' to before 'while'
Some versions of dash don't behave as expected with code like this:

while IFS=: read a b c; do
    blah
done

Thanks to Eric Mertens who identified the issue.
2011-03-07 13:56:41 +01:00
Harald Hoyer 535ad9d1fb dracut-lib: improve die() logging 2011-03-07 13:37:22 +01:00
Harald Hoyer a382492bf3 init: improve emergency logging 2011-03-07 13:37:22 +01:00
Harald Hoyer 8be12be16a biosdevname: be verbose about biosdevname activation 2011-03-07 13:37:22 +01:00
Harald Hoyer 6fecffaab5 fcoe: add EDD parsing
[backport of 70dfe537]
2011-03-07 13:37:21 +01:00
Harald Hoyer 6767fdaaed lvm: move emergency script from 00 to 90
[forward port of cfb4747e]
2011-03-07 13:37:21 +01:00
Harald Hoyer fcbcc89bb2 crypt: fix emergency script generation
[ forward port of e45a2dba]
2011-03-07 13:37:20 +01:00
Harald Hoyer 38ba0d7a62 network: add iBFT interface configuration
[forward port of 0828d4c3574693ae80c217229e1bba6948dc9509]
2011-03-07 13:37:20 +01:00
Harald Hoyer 10b5dca0f7 fips/fips.sh: do not load tcrypt with "noexit" parameter
"noexit=1" is the default mode for the tcrypt module now.

[forward ported 7e7308158c9149c33309c0d36a6e1126e690fb58]
2011-03-07 13:37:20 +01:00
Harald Hoyer b60d5e90a5 fips/fips.sh: die(), if boot=<device> is not present or has wrong format 2011-03-07 13:37:19 +01:00
Harald Hoyer 674bdee804 fips/fips.sh: only trigger udev, if device node of boot is not present 2011-03-07 13:37:19 +01:00
Harald Hoyer 62d0c4e7c1 dracut.spec: add dracut logrotate 2011-03-07 13:37:19 +01:00
Harald Hoyer 0b440844bd dracut-functions: fixed instmods() return value
The FIPS installkernel() relies on the instmods() return value. So only
return 0, if the module and its dependencies were actually installed
correctly.
2011-03-07 13:37:18 +01:00
Harald Hoyer 724b87a6f8 dracut-functions: check for missing dracut modules
If the user explicitly specified "-a <modules>" or "-m <modules>",
   warn him about possible missing modules.
2011-03-07 13:37:18 +01:00
Harald Hoyer 5242d8fb57 dracut-functions: if .hmac files are present, install them also
For FIPS mode, we need all checksum files, called .<filename>.hmac. So,
if we find one, we install it.
2011-03-07 13:37:18 +01:00
Harald Hoyer 1a0d82a3dd dracut-functions: space 2011-03-07 13:37:17 +01:00
Harald Hoyer ebaee770ac dracut-functions: more verbose logging message format 2011-03-07 13:37:17 +01:00
Harald Hoyer ee89f47453 dracut-functions: check if directory of logfile is writable
Do not check, if the logfile itsself is writable. Check the directory
instead.
2011-03-07 13:37:11 +01:00
Harald Hoyer 58dad7025b dracut: more verbose logging 2011-03-07 12:54:47 +01:00
Amadeusz Żołnowski 5d72984a01 Gentoo ebuild for LVM2 prior to 2.02.63-r1 doesn't install rules:
10-dm.rules
  11-dm-lvm.rules
  13-dm-disk.rules
  95-dm-notify.rules

but provides only 64-device-mapper.rules combining more or less the
above rules files.
2011-03-04 13:07:28 +01:00
Amadeusz Żołnowski f90fd5b34b dracut-functions: fixed doubled $initdir prefix inst_library()
Commit 172d85b9c9 caused following error:

./dracut-functions: line 307: cd: /tmp/initramfs.mP7cPY/tmp/initramfs.mP7cPY/lib64: No such file or directory

Patch removes beginning $initdir for symlink case.
2011-02-25 10:06:35 +01:00
Harald Hoyer 9d49507f80 kernel-modules: add hid-cherry hid-logitech hid-microsoft kbd drivers 2011-02-23 16:34:23 +01:00
Harald Hoyer e38e9e3f5e AUTHORS: update 2011-02-23 13:35:46 +01:00
Harald Hoyer 6f590cd1c5 dracut: do not use "derror", when we cannot find dracut-functions 2011-02-23 13:32:31 +01:00
Harald Hoyer 41f90cbe50 dracut.spec: add /var/lib/initramfs 2011-02-23 13:21:07 +01:00
Harald Hoyer 7d4f1101bc add missing editor format commands 2011-02-23 09:41:08 +01:00
Harald Hoyer 8ce58f1f42 add missing shebang 2011-02-23 09:38:25 +01:00
Harald Hoyer 2826a877af 90lvm/lvm_scan.sh: removed garbage line 2011-02-22 18:40:40 +01:00
Harald Hoyer 53570e16c3 90lvm/lvm_scan.sh: fixed lvm version parsing 2011-02-22 17:45:11 +01:00