Harald Hoyer
b0692d0311
add wait_for_dev() and wait_for_mount()
2011-11-15 09:47:16 +01:00
Harald Hoyer
ca8d4e8933
Do not use /run/udev/rules.d for udev rules
...
for rules, which should not be called in the real root.
Stale rules can cause this:
https://bugzilla.redhat.com/show_bug.cgi?id=734096
2011-09-19 12:21:51 +02:00
Harald Hoyer
459bfe02f9
95rootfs-block/mount-root.sh: also parse rootopts for "_netdev"
2011-08-11 15:36:29 +02:00
Michal Soltys
c60dbcc0aa
95rootfs-block/mount-root.sh: comment out fstab generation
...
fsck_single() operates directly on the device, so fstab is not
necessary. fs-lib functions make sure fscks don't complain.
Code is only commented out just in case I missed something.
2011-08-11 14:27:24 +02:00
Michal Soltys
21b691152c
95rootfs-block/mount-root.sh: squash rootopts into rflags
...
Small simplification - prepend rootopts to rflags before mount
operations. Shortens resulting command lines quite a bit.
2011-08-11 14:27:24 +02:00
Michal Soltys
fefab84fff
implement fs-lib, squash a few bugs that were part of det_fs/wrap_fsck
...
To not pollute dracut-lib.sh, all the fsck related functions were moved
to fs-lib.sh. The functions available are as follows:
- fsck_single
this will detect/verify filesystem, check if it has necessary tools and
check the filesystem respecting additional flags (if any), using
specific "driver" (or falling back to generic one). Currently
available: fsck_drv_{com,xfs,std}. 'com' is used for tools following
typical subset of options/return codes (e.g. ext, jfs), 'std' is used
for "unknown" fs and doesn't assume it can be run non-interactively.
Please see comments around the code for more info.
- fsck_batch
this will check provided list of the devices;
Both of the above functions will fake empty fstab, to make generic fsck
not complain too much (excact devices are always provided on the command
line).
"Known" filesystems currently: ext234, reiser, jfs, xfs
- det_fs
Small bug fixed - as this function is meant to be called in $(), it may
not be verbose.
Current behaviour is:
- if detection is successful, use its result
- if detection is not successful, and filesystem is provided, return
the provided one; otherwise use auto
2011-08-11 14:27:24 +02:00
Michal Soltys
1ddaffda88
95rootfs-block/mount-root.sh: '-a' for ext? is handled in fs-lib now
...
Previously, '-a' was added for ext[234] filesystems if other
conflicting flag were not present. It's being done automatically
in fsck_drv_com() now (also for jfs and reiser).
2011-08-11 14:27:23 +02:00
Harald Hoyer
7ed1de2f1d
mount-root.sh: fixed fsck and "-a" only for "ext*"
2011-05-31 14:56:30 +02:00
Michal Soltys
0d8c1d7fa1
95rootfs-block/block-genrules.sh: Use > instead of >>
...
trivial, blocksymlink.sh shouldn't exist at this point.
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Michal Soltys
0216d1cda3
95rootfs-block/mount-root.sh: Rely on det_fs and wrap_fsck
...
Use common fsck and det_fs code. Verify filesystem type more
aggressively, which has a chance to be more resistant to
accidental mistakes.
Also, there's no need to generate custom fstab for the sake of fsck
anymore.
Signed-off-by: Michal Soltys <soltys@ziu.info>
2011-05-20 17:16:51 +02:00
Harald Hoyer
3b403b32fc
removed trailing whitespaces
2011-05-10 11:56:09 +02: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
c9f1e3d1f4
check for getarg() function before sourcing dracut-lib.sh
...
make use of "type getarg" to check, if we really need to source
dracut-lib.sh
2011-03-25 16:10:46 +01:00
Harald Hoyer
19f3a804e7
s#/dev/.run#/run#g
...
Move things where they really belong to.
2011-03-18 18:23:44 +01:00
Harald Hoyer
77e607a3a7
prepare for future udev rules.d location
...
future udev will have rules.d in /dev/.run/udev/rules.d
Also remove compat symlinks, because we want to get rid of these files
anyway.
2011-03-10 19:19:09 +01:00
Harald Hoyer
1e2a167fe6
rootfs-block/mount-root.sh: rename flag file for fsck
...
/dev/.run/initramfs/fsck -> /dev/.run/initramfs/root-fsck
2011-03-10 19:17:23 +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
8ce58f1f42
add missing shebang
2011-02-23 09:38:25 +01:00
Harald Hoyer
71df3c4329
renamed module-info.sh to module-setup.sh
2011-02-02 16:35:18 +01:00
Harald Hoyer
95d2dabc25
replaced check,install,installkernel with module-info.sh
2011-02-02 13:56:03 +01:00
Harald Hoyer
e53fdd1c35
rootfs-block/mount-root.sh: remove $NEWROOT/.autofsck if possible
2010-11-10 22:10:54 +01:00
Harald Hoyer
d884af8077
rootfs-block/mount-root.sh: remove $NEWROOT/{.autofsck,forcefsck} if possible
2010-11-10 20:47:15 +01:00
Harald Hoyer
a4f88b8a49
rootfs-block/mount-root.sh: set prompt in emergency shell
2010-11-10 20:45:02 +01:00
Harald Hoyer
3d7c58ca1e
rootfs-block/mount-root.sh: echo fsck return code to
...
/dev/.initramfs/fsck
2010-11-10 20:43:22 +01:00
Harald Hoyer
ce51f3be11
rootfs-block/mount-root.sh: fixed filesystem type udev parsing
2010-11-10 20:12:05 +01:00
Harald Hoyer
4cba811f6c
rootfs-block/mount-root.sh: correctly printf to fstab
2010-11-10 20:11:31 +01:00
Harald Hoyer
85de3d281a
rootfs-block/mount-root.sh: only warn if fsck returned != 0
2010-11-10 20:06:34 +01:00
Harald Hoyer
3817c2f138
rootfs-block/mount-root.sh: default rootfs to auto, even without fstab
2010-11-10 20:01:30 +01:00
Harald Hoyer
13af399f65
rootfs-block/mount-root.sh: clear fsckoptions
2010-11-10 19:58:15 +01:00
Andrey Borzenkov
0e08f1de8d
95rootfs-block: fix missing root when label contains slash
...
It is not clearly documented, but apparently fsck
(or, probably, getmntent) is using backslash as
escape character.
Label containing slash is converted to \x2f but '\'
is eaten by fsck later. Escape '\' before writing
into fstab.
v2:
- fix sed expression
- use printf instead of echo because echo eats '\' as well
Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>
2010-11-10 16:03:14 +01:00
Harald Hoyer
9840eaade6
rootfs-block/install: install e2fsck for slackware
2010-11-10 15:00:30 +01:00
Harald Hoyer
c56e44a63a
rootfs-block/mount-root.sh: fixed fsck "-a" option
2010-11-03 13:40:42 -04:00
Harald Hoyer
3871942d13
rootfs-block:mount-root.sh add fsck
2010-10-29 19:00:35 +02:00
Harald Hoyer
fa7ada31d0
new parameter option names with "rd.*" namespace
...
Renamed Options
Here is a list of options, which were used in dracut prior to
version 008, and their new replacement.
rdbreak
rd.break
rd_CCW
rd.ccw
rdcopystate
rd.copystate
rd_DASD_MOD
rd.dasd_mod.dasd
rd_DASD
rd.dasd
rdinitdebug rdnetdebug
rd.debug
rd_NO_DM
rd.dm=0
rd_DM_UUID
rd.dm.uuid
rdblacklist
rd.driver.blacklist
rdinsmodpost
rd.driver.post
rdloaddriver
rd.driver.pre
rd_NO_FSTAB
rd.fstab=0
rdinfo
rd.info
check
rd.live.check
rdlivedebug
rd.live.debug
live_dir
rd.live.dir
liveimg
rd.live.image
overlay
rd.live.overlay
readonly_overlay
rd.live.overlay.readonly
reset_overlay
rd.live.overlay.reset
live_ram
rd.live.ram
rd_NO_CRYPTTAB
rd.luks.crypttab=0
rd_LUKS_KEYDEV_UUID
rd.luks.keydev.uuid
rd_LUKS_KEYPATH
rd.luks.keypath
rd_NO_LUKS
rd.luks=0
rd_LUKS_UUID
rd.luks.uuid
rd_LUKS_UUID
rd.luks.uuid
rd_NO_LVMCONF
rd.lvm.conf
rd_LVM_LV
rd.lvm.lv
rd_NO_LVM
rd.lvm=0
rd_LVM_SNAPSHOT
rd.lvm.snapshot
rd_LVM_SNAPSIZE
rd.lvm.snapsize
rd_LVM_VG
rd.lvm.vg
rd_NO_MDADMCONF
rd.md.conf=0
rd_NO_MDIMSM
rd.md.imsm=0
rd_NO_MD
rd.md=0
rd_MD_UUID
rd.md.uuid
rd_NFS_DOMAIN
rd.nfs.domain
rd_NO_PLYMOUTH
rd.plymouth=0
rd_retry
rd.retry
rdshell
rd.shell
rd_NO_SPLASH
rd.splash
rdudevdebug
rd.udev.debug
rdudevinfo
rd.udev.info
rd_NO_ZFCPCONF
rd.zfcp.conf=0
rd_ZFCP
rd.zfcp
2010-10-28 17:11:27 +02:00
Harald Hoyer
cc02093d69
reformat source code
...
removed tabs and set indention to 4 spaces
added emacs and vi format headers
2010-09-10 15:34:36 +02:00
Harald Hoyer
c492fe12c0
init: create /dev/.udev/rules.d with correct permissions
2010-08-02 15:58:48 +02:00
Harald Hoyer
e0c1d4e79f
mkdir /dev/.udev/rules.d with mode 0755
2010-08-02 15:26:55 +02:00
Harald Hoyer
ae5ec68355
Write rules for symlinks to /dev/.udev/rules.d for later usage
...
We want some symlinks to persist in the real root, so we write them to
/dev/.udev/rules.d, that they survive a retrigger.
2010-06-22 10:30:39 +02:00
Harald Hoyer
b6a7c09070
chmod 0755 *.sh
2010-05-19 09:40:48 +02:00
Harald Hoyer
0ec519f8a4
mount-root: also filter "defaults" from mount options
2010-02-18 18:05:51 +01:00
Harald Hoyer
d793fc2e8b
mount-root: skip comments
2010-02-18 17:46:01 +01:00
Harald Hoyer
9232cab470
fix IFS restoring
2010-02-18 09:46:19 +01:00
Harald Hoyer
11ce36d78e
mount-root: do not pollute init arguments
...
and do not remount if no new rootopts set in /etc/fstab
2010-02-17 20:18:10 +01:00
Harald Hoyer
d43036ffeb
rootfs-block: strip "ro|rw" options from fstab options
...
https://bugzilla.redhat.com/show_bug.cgi?id=560424
2010-02-03 17:24:51 +01:00
Luca Berra
506c7f2ab0
install umount for the modules, which use it
2010-01-13 15:57:32 +01:00
Harald Hoyer
57c6b805ce
rootfs-block/mount-root: remount root with /etc/fstab filesystem options
2009-11-26 19:12:10 +01:00
Harald Hoyer
c27ec060da
95rootfs-block/block-genrules.sh: beautify code
2009-09-15 15:00:24 +02:00
Harald Hoyer
e8cf498dcc
95rootfs-block/mount-root.sh: ignore /.resume
2009-09-15 11:17:28 +02:00
Harald Hoyer
5a8d8dfbb6
switch modules to initqueue-finished
2009-09-15 11:17:22 +02:00
Harald Hoyer
273b197d75
added initqueue-settled and refactored code
2009-09-07 19:12:01 +02:00