mirror of
https://salsa.debian.org/kernel-team/initramfs-tools.git
synced 2026-01-27 01:44:25 +00:00
"This suspense is terrible. I hope it will last."
- Oscar Wilde
* scripts/local: Quote ${ROOT} so that an empty value causes us
to drop to a shell.
Thanks to Matt Zimmerman for this fix!
- hook-functions (auto_add_modules): Add atiixp and opti621 to
the IDE set.
- hook-functions (dep_add_modules): Detect i2o and add i2o_block
(auto_add_modules): Include i2o_block.
- scripts/functions (i2o_boot_events): New function
(load_modules): Call it. (Ubuntu# 13806)
Thanks to Tollef Fog Heen for the i2o patch!
- debian/control: Depend on udev.
Thanks to Alexander Butenko for troubleshooting this with me.
- init: Move the /dev directory to the root filesystem.
Handle all the udev bind mounts as needed.
Make sure input and output is associated with dev/console.
- scripts/functions (parse_numeric): Exit if we're refering to a path.
Otherwise override root setting to be /dev/root.
- init: Call parse_numeric when setting the root variable.
- scripts/local-top/lvm: When using a numeric root, call vgchange -ay
Don't attempt to start LVM on regular partitions.
(Ubuntu #13365, #13778, and some of #13399)
- scripts/local-top/lvm: Cope with -'s in the Volume Group and
logical volume names. (Ubuntu #13387)
Thanks to Stephen Shirley for the patch!
-- Jeff Bailey <jbailey@ubuntu.com> Thu, 25 Aug 2005 11:48:15 -0400
initramfs-tools (0.22) breezy; urgency=low
* Fix argument handling in force_load hook-function
* Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942
-- Matt Zimmerman <mdz@ubuntu.com> Fri, 19 Aug 2005 23:50:16 -0700
98 lines
1.6 KiB
Bash
98 lines
1.6 KiB
Bash
#!/bin/sh
|
|
|
|
mkdir /sys
|
|
mkdir /proc
|
|
mkdir /tmp
|
|
mount -t sysfs sysfs /sys
|
|
mount -t proc proc /proc
|
|
|
|
. /conf/initramfs.conf
|
|
. /scripts/functions
|
|
|
|
# Parse command line options
|
|
export break=
|
|
export init=/sbin/init
|
|
export quiet=n
|
|
export readonly=y
|
|
export ROOT=
|
|
export resume=${RESUME}
|
|
export rootmnt=/root
|
|
for x in $(cat /proc/cmdline); do
|
|
case $x in
|
|
init=*)
|
|
init=${x#init=}
|
|
;;
|
|
root=*)
|
|
ROOT=${x#root=}
|
|
;;
|
|
nfsroot=*)
|
|
NFSROOT=${x#nfsroot=}
|
|
;;
|
|
boot=*)
|
|
BOOT=${x#boot=}
|
|
;;
|
|
resume=*)
|
|
resume=${x#resume=}
|
|
;;
|
|
quiet)
|
|
quiet=y
|
|
;;
|
|
ro)
|
|
readonly=y
|
|
;;
|
|
rw)
|
|
readonly=n
|
|
;;
|
|
break)
|
|
break=yes
|
|
;;
|
|
esac
|
|
done
|
|
|
|
log_begin_msg "Running /script/init-top"
|
|
run_scripts /scripts/init-top
|
|
log_end_msg
|
|
|
|
. /scripts/${BOOT}
|
|
|
|
log_begin_msg "Loading modules"
|
|
load_modules
|
|
log_end_msg
|
|
|
|
# Populate /dev tree
|
|
log_begin_msg "Initializing /dev"
|
|
mount -t ramfs none /dev
|
|
touch /dev/.initramfs-tools
|
|
parse_numeric ${ROOT}
|
|
udevstart
|
|
log_end_msg
|
|
|
|
if [ x${break} = xyes ]; then
|
|
panic "Spawning shell within the initramfs"
|
|
fi
|
|
|
|
log_begin_msg "Running /scripts/init-premount"
|
|
run_scripts /scripts/init-premount
|
|
log_end_msg
|
|
|
|
log_begin_msg "Mounting root file system"
|
|
mountroot
|
|
log_end_msg
|
|
|
|
log_begin_msg "Running /scripts/init-bottom"
|
|
run_scripts /scripts/init-bottom
|
|
log_end_msg
|
|
|
|
# Move our /dev to the real filesystem. Do the setup that udev otherwise
|
|
# would.
|
|
mkdir -p /dev/.static/dev
|
|
chmod 700 /dev/.static/
|
|
mount -o bind /root/dev /dev/.static/dev
|
|
mount -o move /dev /root/dev
|
|
|
|
umount /sys
|
|
umount /proc
|
|
|
|
# Chain to real filesystem
|
|
exec run-init ${rootmnt} ${init} "$@" </root/dev/console >/root/dev/console
|