Commit Graph

36 Commits (a9c7dc74c40f11898d1096d03416caa06cfd975b)

Author SHA1 Message Date
Harald Hoyer a9c7dc74c4 base: in systemd mode parse-root-opts.sh is in the services 2013-03-06 17:29:12 +01:00
Harald Hoyer 64d144aece Add sosreport script and generate /run/initramfs/sosreport.txt 2012-11-21 14:17:43 +01:00
Harald Hoyer 600c876968 consistently lowercase "dracut" 2012-10-10 14:15:11 +02:00
Harald Hoyer 4211605000 fallback to old ismounted, if findmnt is not installed 2012-09-20 10:36:13 +02:00
Dave Young d9a7ea5b43 ismounted fix
ismounted handles both find-by-dev and find-by-mnt, but there's two issues:
1. for find-by-dev, it use readlink to get the canonical dev name, but
   lvm is different with other devices, the canonical name for lvm devices
   are symlinks like /dev/mapper/vg-lv00
2. for nfs mounting, just use [ -b $dev ] is not enough, it need being handled
   seperately.

Per Karel Zak's suggestion, findmnt util is suitable for this purpose, it
handles these cases well, so just use findmnt instead of implement all the
logic by ourselves. Thanks, Karel.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-09-19 18:37:07 +02:00
Dave Young ff0636635a move get_persistent_dev to dracut-functions.sh
kdump module also need to convert dev name to udev symlinks.
So better to move function get_persistent_dev() to dracut-functions.sh

Also in this patch improvement and fix the original function:
a) use udevadm info --query=name to get the kernel name.
   This will fix the issue caused by passing symbolic link of a device.
b) fix a bug to compare $_tmp instead of $i with $_dev. Really sorry,
   should have tested more carefully.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-09-10 15:50:36 +02:00
Harald Hoyer 73088e46f7 moved the /etc/host_devs write out to 99base
also removed some left-over debugging code
2012-08-23 12:13:02 +02:00
dyoung@redhat.com c4bb88715c wait host devs in base module
each dev in host_devs[] should be waited in initqueue to make sure they
are oneline before initqueue finish.

Add a new wait_host_devs.sh in base module to make this a generic thing.
Because all the devs in fstab lines are also added to host_devs, so no need
do same wait in fstab-sys module anymore.

[v2->v3]: do not add slave devices to host_devs
          wait for persistent dev name in initramfs

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-08-23 10:15:09 +02:00
Harald Hoyer 24a38bc1cb fixed install locations for udev rules and change to IMPORT{builtin} 2012-07-27 11:55:31 +02:00
Harald Hoyer 96c6fa9202 base/module-setup.sh: removed mount-hook 2012-07-26 17:35:25 +02:00
Amadeusz Żołnowski ff3953efe1 ro_mnt - option at build time to force ro mount of / and /usr 2012-07-26 17:16:56 +02:00
Harald Hoyer 53fe81e752 modules.d/*/module-setup.sh: combine and specify type for installs
To speedup image creation, combine dracut_install calls and specify the exact type.
E.g. inst_script instead of the generic inst.
2012-06-29 12:41:27 +02:00
Harald Hoyer 44cf581732 base/module-setup.sh: use --force for ln 2012-06-29 12:41:25 +02:00
Harald Hoyer 982d59afea drop 10rpmversion module and introduce /etc/initrd-release 2012-05-22 15:22:35 +02:00
Harald Hoyer 832d85cbbc base/module-setup.sh: link /proc/self/mounts to $initdir/etc/mtab 2012-05-15 19:03:50 +02:00
Harald Hoyer c3d81de59b remove openvt and use "setsid -c", if possible 2012-03-14 16:19:53 +01:00
Harald Hoyer 02aa795514 remove --ctty 2012-03-14 16:15:11 +01:00
Harald Hoyer 4fed3ddf16 add "initqueue/*" to hookdirs and create them in dracut itsself
now we can just use
    inst_hook initqueue/settled 99 "$moddir/pollcdrom.sh"
2012-03-08 11:00:29 +01:00
Harald Hoyer 552ecca6db Renamed all shell scripts to *.sh 2012-02-22 15:15:21 +01:00
Harald Hoyer 4951a1199d 99base/init: predefine path to init
if you add realinitpath="<path1> <path2>" to dracut.conf, then it will
be written to $initdir/etc/cmdline.d/distroinit.conf with
"rd.distroinit=<path1> rd.distroinit=<path2>" and evaluated by
99base/init, when it searches for init.
2012-02-07 18:48:03 +01:00
Dave Young 85bb744dfe change root home dir to /root
ssh need to read knownhosts from home directory, so change root home to /root

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-01-23 09:48:35 +01:00
Michal Soltys 4401925c82 Add job control support to emergency shell
Option --ctty will optionally add setsid binary to dracut's image.

During runtime, if rd.ctty is set and is a character device,
emergency shells will be spawned with job control.

in case no ctty was provided, shell was spawned without caring about
/dev/console. Also, the ctty is more opportunistic. If the image was
generated with --ctty, we will fallback to /dev/tty1 if rc.ctty is
invalid or missing. Otherwise we spawn standard shell on /dev/console

[dyoung@redhat.com: Rebased to usrmove branch]

Signed-off-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Dave Young <dyoung@redhat.com>
2012-01-23 09:48:35 +01:00
Dave Young 59ee80764e deal common part of etc passwd in 99base
ssh module will need root user in /etc/passwd, so add root and nobody
to /etc/passwd in 99base instead of nfs module

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-01-23 09:48:35 +01:00
Harald Hoyer 480d772f22 */module-setup.sh: use host_fs_types host_devs
For the $hostonly case, use $host_fs_types and $host_devs to determine,
if a module has to be included in the initramfs.
2011-12-15 14:49:03 +01:00
Harald Hoyer 6b592c1487 99base: add timeout queue
timeout queue is executed after half of the maximum retry count and if
jobs are found there, the counter is reset to zero.
2011-08-11 14:27:25 +02:00
Harald Hoyer 40ee8c1814 99base/init: try to mount /usr, if init lives on /usr 2011-07-22 15:17:00 +02:00
Harald Hoyer 683db19a7d base/module-setup.sh: only mkdir /lib, if it does not exist 2011-05-20 15:17:31 +02:00
Harald Hoyer 29b10e65b1 dracut-functions: make local vars local and prefix with "_" 2011-05-12 11:06:47 +02:00
Harald Hoyer 3b403b32fc removed trailing whitespaces 2011-05-10 11:56:09 +02:00
Harald Hoyer f024bf0dcd base, crypt: install umount, because it is used 2011-04-20 16:51:39 +02:00
Harald Hoyer e365864bbc removed switch_root.c 2011-04-11 13:12:30 +02:00
Amadeusz Żołnowski d1ef3951f3 modules.d: logging functions adjusted to dracut-logger 2011-03-25 16:22:05 +01:00
Harald Hoyer 0b53ca70b6 Move all hooks to "$hookdir"
hookdir=/lib/dracut/hooks for now, to keep the root directory clean
2011-03-25 16:10:46 +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 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
Harald Hoyer 71df3c4329 renamed module-info.sh to module-setup.sh 2011-02-02 16:35:18 +01:00