summaryrefslogtreecommitdiff
path: root/init
AgeCommit message (Collapse)Author
2010-08-06init: provide fastforward path for the common case when validating init binary.Michael Prokop
2010-08-06init: provide validate_init() wrapper to support absolute symlinks.Michael Prokop
If /sbin/init is an absolute symlink (e.g. to /bin/systemd) the readlink check doesn't work as $rootmnt is involved. The validate_init() shell function takes care of this fact, as well as when guessing the init binary points to a directory. For example Ubuntu's upstart has its configuration inside /etc/init whereas this is considered a valid run_init_process() binary by the Linux kernel and `test -x' returns true when checking for executables. Therefore be more conservative with providing full backwards compability as well as new added support for absolute symlinks at the same time. Closes: #590744
2010-06-16hook-functions/init/scripts/local: add support for ubifs.Martin Michlmayr
MODULES=dep fails when / is ubifs. This patch adds support for something like root=ubi0:rootfs when ubi is modular. Quoting Martin: It essentially does three things: - adds the correct modules to the ramdisk (for MODULES=dep and MODULES=most) - reads ubi.mtd= from the command line - loads ubi with the ubi.mtd info and ignores the "Waiting for root" check I've successfully tested this with a kernel with modular ubi and with the following boot variants: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs console=ttyS0,115200 ubi.mtd=2 root=ubi0_0 rootfstype=ubifs With console=ttyS0,115200 ubi.mtd=2 root=/dev/ubi0_0 rootfstype=ubifs I get an error that it cannot mount root but I suspect this is an ubifs error and has nothing to do with i-t (since at this point I can manually mount it with -t ubifs ubi0_0 whereas the /dev/ variant doesn't work). Tested with MODULES=dep and MODULES=most as well as with a kernel that has ubifs built in. Closes: #582858 Thanks: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Reviewed-by: Michael Prokop <mika@debian.org>
2010-06-15Merge branch 'mika/devtmpfs'Michael Prokop
2010-06-14code cleanup: drop trailing whitespaces.Michael Prokop
Signed-off-by: Michael Prokop <mika@debian.org>
2010-06-14init: display warning message if devtmpfs could not be mounted.Michael Prokop
Older kernel versions (like the one shipped with Lenny) don't support devtmpfs. Therefore display a warning message when falling back to tmpfs. See #501359. Thanks: Ferenc Wagner <wferi@niif.hu> Signed-off-by: Michael Prokop <mika@debian.org>
2010-04-10init: add BOOTIF bootargVagrant Cascadian
as mentioned by Christoph Bussenius in #535008, it does appear that setting BOOTIF from the value in /proc/cmdline is needed. at the time i wrote the patch, i'm not sure it was, but it definitely is now. with these patchese applied, it seems to work. at least for the moment. Signed-off-by: maximilian attems <maks@debian.org>
2010-04-08init: fix hardcoded resume handlingmaximilian attems
got confused in course of #572858, uppercase is for hardcoded device strings as here, pick up RESUME and not resume from config file. Closes: #576700 Signed-off-by: maximilian attems <maks@debian.org>
2010-04-05init: export BOOT for casper and friendsmaximilian attems
merge from 0.92bubuntu9 Signed-off-by: maximilian attems <maks@debian.org>
2010-04-05init: Silence "Loading essential drivers..." on quiet boot.maximilian attems
no point in spamming that for quiet boot. Signed-off-by: maximilian attems <maks@debian.org>
2010-03-27init: mount /dev/pts as well as /devScott James Remnant
Allows to redirect the console early. [ merge from 0.92bubuntu71 ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-27init: load the netconsole module with netconsole bootargScott James Remnant
[ merge from 0.92bubuntu71 ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-24mkinitramfs: Call depmod before packing the initramfs.Scott James Remnant
init: thus drop depmod call. Don't quote modules.*map, so we actually expand it. (closes: #465760, #562561) [ merge from 0.92bubuntu57 and 0.92bubuntu58 ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-24init: Mount devtmpfs on /devScott James Remnant
falling back to a tmpfs if not supported by the kernel. [ merge of 0.92bubuntu61 ] Signed-off-by: maximilian attems <maks@debian.org>
2010-03-08init: rexport resume to reallow it's hardcoded usagemaximilian attems
as bonus also simplify the noresume case, just unset it in that case. this should fix #572858 and friends, looks broken to me in Lenny too. Signed-off-by: maximilian attems <maks@debian.org>
2010-02-28init: export and unset BOOTIFmaximilian attems
enhances 673abb77821433a67add61ac79d739c6cee9eee0, to allow scripts to make use of the variable. Reported-by: Vagrant Cascadian <vagrant@freegeek.org> Signed-off-by: maximilian attems <maks@debian.org>
2009-04-03cleanup LABEL handling codemaximilian attems
make it more concise: * use POSIX ${parameter:+word} * replace *[/]*) by just */*) * test exit code of command -v rather then running test -x on it while we are at it fix another command -v usage in scripts/functions. Reviewed-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: maximilian attems <maks@debian.org>
2009-02-23init: export ip root param for configure_networking()maximilian attems
while at it cleanup the variable name that came due to legacy naming nfsopts in a very early initramfs-tools release. "The local-top/iscsi initramfs integration script uses the configure_networking function, which depends on the IPOPTS environmental variable set by the init script. However, this variable is not available, because it's not exported from init, and local-top/iscsi is not sourced but executed. Thus static IP configuration on the kernel command line is not communicated to the script." (closes: #516746) Reported-by: Ferenc Wagner <wferi@niif.hu>
2009-02-17init: slightly reword commentmaximilian attems
2009-02-17Fix boot with LABEL containting one or several '/'maximilian attems
As there is no /dev/disk/by-label//, we need to follow udev on escape the '/' character with \x2f don't rely on sed, as we might not have it in initramfs. (closes: #489008) Reported-by: Josh Triplett <josh@freedesktop.org> Tested-by: Andres Salomon <dilinger@debian.org> thanks for dilinger to pushing the first easy solution to a complete, so we don't have to revisit the case.
2009-01-09Revert "init: Try to use old style sda1 if no root cmldine got specified."maximilian attems
we have boot scripts that search for root if none is passed. usage by grml.org and debian-live. This reverts commit 90ad6ff31f66112e863ea86c9960b9770a0a245e. Reported-by: Michael Prokop <mika@grml.org>
2008-12-24init: variable `break' unset before `maybe_break init' is evaluatedKel Modderman
The cmdline parameter `break=init' failed to work. It looks like the variable `break' is unset before `maybe_break init' is evaluated. (closes: #509637)
2008-12-19init: Try to use old style sda1 if no root cmldine got specified.maximilian attems
with bad luck that might still be on hda1, but then you get a warning about missing root boot param.
2008-12-16init: Don't leak initramfs-tools exported variables.maximilian attems
no need to check if the string of the corresponding variable exists, just unset all of them, but 2 that we need to pass on for calling init.
2008-12-15Make debug option write to /dev/.initramfs/initramfs.debugColin Watson
rather than /tmp/initramfs.debug, so that it can be retrieved after boot.
2008-07-05add possible mountroot breakmaximilian attems
useful for debug cases closes: #488963
2008-07-03init: Remove extra ellipsesmartin f. krafft
log_begin_msg already puts ... at the end of the stuff it prints, so no need to have it in there explicitly. Signed-off-by: martin f. krafft <madduck@debian.org> Signed-off-by: maximilian attems <maks@debian.org>
2008-04-29Revert "init: Add 2>&1 to the run-init exec, fixes init without stderr."maximilian attems
This reverts commit 74be87d35841eae3c3febf00b568df5232c85f06. talked to hpa and he seemed quite unconvinced about that report. the run-init code doesn't also seem to backup that claim. so nuke it for now until better analysis shows up.
2008-04-29init: Fix hardcoded ROOT bootcase.maximilian attems
grave bug as makes a Debian slug unbootable. Thanks Kevin Price <kp@kevin-price.de> for report and Martin Michlmayr <tbm@cyrius.com> for debugging. The cause was the reordering of the ROOT export *after* it had been sourced in init. Fix it by allowing all exported variables to be ovverriden aka hardcoded.
2008-04-10init: Add 2>&1 to the run-init exec, fixes init without stderr.Luke Yelavich
long outstanding bug. [ note: seems fixed in fedora mkinitrd, but not in opensuse. they simply call run-init like anyone else. -maks]
2008-04-07resume: Add support for resume_offset swap file suspend to disk.maximilian attems
Parse cmdline for resume_offset, export it and pass it to the klibc resume binary. Based on a patch by Alan Jenkins <alan-jenkins@tuffmail.co.uk>. Bonus small codingstyle clean up of local-premount/resume.
2008-03-30init: Set proper permissions of /dev/console mknod fallback.maximilian attems
if /dev/console doesn't yet exist it should be created with proper permissions.
2008-03-30init: fix mkdir usage.maximilian attems
klibc mkdir has only the short option, use that.
2008-03-16init: export ROOTFLAGS + ROOTFSTYPE.maximilian attems
be more consistent on exporting *all* relevant ROOT* variables, thanks to Sten Spans <sten@blinkenlights.nl> for pointing that out.
2007-11-28init: Don't overwrite boot cmdline arg (closes: #453294)maximilian attems
root nfs needs to check that the boot is not set before setting it. Thanks Thomas Lange <lange@informatik.uni-koeln.de> for report!
2007-09-12init: fix RESUME hardcodingmaximilian attems
2007-09-08disable quiet on debug bootargMichael Prokop
If you have quiet in your /proc/cmdline you can never reach any debug bootoption anymore.
2007-09-08fix init error messageMichael Prokop
You’ll notice a strange error message due to an empty $init if the rootfs can’t be found.
2007-09-03init: fix typo from initial implementationmaximilian attems
2007-09-03init: search for valid initmaximilian attems
Fixes bootfailure on bogus init bootarg too. Plus there may be a rootfs without init, but with sh.
2007-09-03init: s/i/conf/maximilian attems
i is a bad name for a conf, rename.
2007-09-01init: export noresume fo uswsusp and kdumpmaximilian attems
2007-09-01init: call panic if run-init failsmaximilian attems
2007-08-21init: Fix mount options invocation for klibc mount.maximilian attems
2007-05-01init: ignore non-numeric rootdelay, panic bootargsmaximilian attems
they cause funny sleep error messages: aka you can't sleep "bar" time ;) take into account that subsecond sleeps are ok. thanks david for the idea, gone for the q&d regex check.
2007-05-01init: Remove cryptopts parsingDavid Härdeman
the cryptsetup scripts parse /proc/cmdline themselves (even in the Etch version).
2007-04-13Add support for a blacklist boot parameter.maximilian attems
disallows modules loading inside of the initramfs.
2007-04-02bootfixes: mount args don't like spacesmaximilian attems
restore_initramfs(): verbose output before action
2007-04-02first prerelease 0.86 + merge 0.85fmaximilian attems
* kick mdrun script * update control for lenny + ubuntu * add _all_ ide, block and drivers * use MODPROBE_OPTIONS and kill any modprobed arg * small doc + whitespace fixes
2006-10-13- add backup handling to initramfs-toolsmaximilian attems
- allow conservative settings for skipping updated initramfs. - debug output to screen - parse mbr for lilo + small fixes