Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Jeremy Blosser (d799c9f7d0863829c5fb7c701be785216314090c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jeremy Blosser <jblosser-smgl AT firinn.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Jeremy Blosser (d799c9f7d0863829c5fb7c701be785216314090c)
  • Date: Thu, 18 Jan 2007 21:06:55 -0600

Please try this on your systems; reboot and let us know if anything fails
to boot. Whether you use LVM or not. I don't expect it to break anyone
but this stuff has been touchy.

Also note that this change moves all the /proc mounting to init.d/devices.
Previously this was only done in devices if using udev and in mountall
otherwise. In consolidating I replaced the explicit 'mount -n -t proc none
/proc' with 'mount -a -n -t proc'. This is more flexible as it will use
whatever is defined in fstab, including nothing if the proc fs isn't being
used. If anyone sees a case where this will break, yell (other than
someone doing something odd and not listing their proc in fstab and
therefore being on their own anyway).

On Jan 18, Jeremy Blosser [scm AT mail.sourcemage.org] wrote:
> GIT changes to master grimoire by Jeremy Blosser <jblosser-smgl AT firinn.org>:
>
> smgl/init.d/DETAILS | 2 +-
> smgl/init.d/HISTORY | 6 ++++++
> smgl/init.d/init.d/devices | 6 +++---
> smgl/init.d/init.d/mountall.sh | 23 ++++++++++++-----------
> smgl/init.d/init.d/mountroot.sh | 20 ++++++++++++++++++++
> 5 files changed, 42 insertions(+), 15 deletions(-)
>
> New commits:
> commit d799c9f7d0863829c5fb7c701be785216314090c
> Author: Jeremy Blosser <jblosser-smgl AT firinn.org>
> Commit: Jeremy Blosser <jblosser-smgl AT firinn.org>
>
> init.d: Try to fix bug 9177 some more; this isn't final but should
> get us past breaking things. This tries to do LVM setup multiple
> times; ideally it should only do it when it will work.
>
> diff --git a/smgl/init.d/DETAILS b/smgl/init.d/DETAILS
> index ed0f714..c66e268 100755
> --- a/smgl/init.d/DETAILS
> +++ b/smgl/init.d/DETAILS
> @@ -1,7 +1,7 @@
> SPELL=init.d
> VERSION=2.2.0
> LICENSE[0]=GPL
> - PATCHLEVEL=16
> + PATCHLEVEL=17
> KEYWORDS="smgl"
> ENTERED=20030505
> SHORT="This is the basic initalization system of SMGL"
> diff --git a/smgl/init.d/HISTORY b/smgl/init.d/HISTORY
> index f5e43f8..01bba57 100644
> --- a/smgl/init.d/HISTORY
> +++ b/smgl/init.d/HISTORY
> @@ -1,3 +1,9 @@
> +2007-01-18 Jeremy Blosser <jblosser-smgl AT firinn.org>
> + * init.d/devices: Centralize /proc mounting.
> + * init.d{mountroot.sh,mountall.sh}: Try to not break systems that use
> + an initrd and root LVM (bug 9177).
> + * DETAILS: PATCHLEVEL++.
> +
> 2007-01-10 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
> * CONFIGURE: added check before sourcing devices
>
> diff --git a/smgl/init.d/init.d/devices b/smgl/init.d/init.d/devices
> index e69c318..a2db4b1 100755
> --- a/smgl/init.d/init.d/devices
> +++ b/smgl/init.d/init.d/devices
> @@ -32,9 +32,6 @@ start_udev()
> # mount sysfs
> echo "Mounting sysfs at /sys"
> mount -n -t sysfs none /sys
> - # mount proc
> - echo "Mounting /proc"
> - mount -n -t proc none /proc
> echo "Mounting ramfs at $udev_root"
> mount -n -t ramfs none $udev_root
> # create some needed stuff
> @@ -94,6 +91,9 @@ start_static()
>
> start()
> {
> + # mount proc
> + echo "Mounting /proc"
> + mount -a -n -t proc
> eval "start_$DEVICES"
> }
>
> diff --git a/smgl/init.d/init.d/mountall.sh b/smgl/init.d/init.d/mountall.sh
> index 89b7b84..55bf15d 100755
> --- a/smgl/init.d/init.d/mountall.sh
> +++ b/smgl/init.d/init.d/mountall.sh
> @@ -51,29 +51,30 @@ checkfs()
> rm -f /fastboot /forcefsck
> }
>
> -start()
> +scanlvm()
> {
> - required_executable /bin/mount
> - required_executable /sbin/fsck
> -
> - echo "Mounting proc file system..."
> - mount -a -t /proc
> - evaluate_retval
> -
> # find devices that were set up in initramfs/rd
> if optional_executable /sbin/dmsetup
> then
> - echo "(re)creating device mapper nodes"
> + echo "(re)Creating device mapper nodes..."
> # won't check retval because kernel just may lack device mapper
> /sbin/dmsetup mknodes
> fi
>
> if optional_executable /sbin/vgscan && optional_executable
> /sbin/vgchange ; then
> - echo -n "Scanning for and initializing all available LVM volume
> groups..."
> + echo "Scanning for and initializing all available LVM volume groups..."
> /sbin/vgscan --ignorelockingfailure --mknodes &&
> /sbin/vgchange -ay --ignorelockingfailure
> - evaluate_retval
> fi
> +}
> +
> +start()
> +{
> + required_executable /bin/mount
> + required_executable /sbin/fsck
> +
> + scanlvm
> + evaluate_retval
>
> checkfs
>
> diff --git a/smgl/init.d/init.d/mountroot.sh
> b/smgl/init.d/init.d/mountroot.sh
> index 4331972..50afe65 100755
> --- a/smgl/init.d/init.d/mountroot.sh
> +++ b/smgl/init.d/init.d/mountroot.sh
> @@ -36,6 +36,23 @@ checkrootfs()
> rm -f /fastboot /forcefsck
> }
>
> +scanlvm()
> +{
> + # find devices that were set up in initramfs/rd
> + if optional_executable /sbin/dmsetup
> + then
> + echo "(re)Creating device mapper nodes..."
> + # won't check retval because kernel just may lack device mapper
> + /sbin/dmsetup mknodes
> + fi
> +
> + if optional_executable /sbin/vgscan && optional_executable
> /sbin/vgchange ; then
> + echo "Scanning for and initializing all available LVM volume groups..."
> + /sbin/vgscan --ignorelockingfailure --mknodes &&
> + /sbin/vgchange -ay --ignorelockingfailure
> + fi
> +}
> +
> start()
> {
> required_executable /bin/mount
> @@ -51,6 +68,9 @@ start()
> raidstart --all
> fi
>
> + scanlvm
> + evaluate_retval
> +
> echo "Mounting root file system read only..."
> mount -n -o remount,ro /
> evaluate_retval || exit 1

Attachment: pgpsILJvZvlc7.pgp
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page