ALT Linux Bugzilla
– Attachment 3418 Details for
Bug 19388
В текущем mkinitrd нет поддержки LVM
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
support booting from root partition located on lvm
mkinitrd_right.patch (text/plain), 2.54 KB, created by
Ilmir Mulyukov
on 2009-03-28 21:53:31 MSK
(
hide
)
Description:
support booting from root partition located on lvm
Filename:
MIME Type:
Creator:
Ilmir Mulyukov
Created:
2009-03-28 21:53:31 MSK
Size:
2.54 KB
patch
obsolete
>--- mkinitrd.orig 2009-03-29 00:03:20 +0600 >+++ mkinitrd_last 2009-03-29 00:03:20 +0600 >@@ -182,6 +182,12 @@ > loopFile= > uname_r=`uname -r` > >+# LVM constants >+HAVE_LVM= >+LVM_MODNAME="dm-mod" >+LVM=/sbin/lvm.static >+[ -x "$LVM" ] || LVM= >+ > ParseKernelVersion() > { > KERNEL_MAJOR="${KERNEL%%.*}" >@@ -953,6 +959,13 @@ > sed -e 's/^raid\([0-9]*\)$/\1/' > } > >+FindLVMModules() >+{ >+ if [ -n "$HAVE_LVM" ]; then >+ FindModule $LVM_MODNAME >+ fi >+} >+ > FindRaidModules() > { > [ -z "$noraid" ] || return >@@ -1085,6 +1098,22 @@ > done > } > >+ConfigInitramfsForLVM() >+{ >+# this is creating of script for init of LVM >+ cat >>"$MNTDIR"/scripts/local-top <<'EOF' >+# Preparing LVM -*- shell-script -*- >+ >+log_begin_msg "Starting up LVM" >+ >+vgscan >+vgchange -ay >+ >+log_end_msg >+EOF >+ >+} >+ > ConfigInitramfsForRaid() > { > # /scripts/local-top runs before swsusp resume - start RAID in >@@ -1181,6 +1210,17 @@ > Cp -aL "$f" "$MNTDIR"/etc/udev/rules.d/ > done > fi >+ >+ if [ -n "$HAVE_LVM" ]; then >+ if [ -z $LVM ]; then >+ Fatal "Couldn't find executable lvm.static " >+ fi >+ Cp -aL "$LVM" "$MNTDIR"/sbin/ >+ cd "$MNTDIR"/sbin/ >+ Ln -s lvm.static vgscan >+ Ln -s lvm.static vgchange >+ ConfigInitramfsForLVM >+ fi > > if [ -n "$HAVE_RAID" ]; then > ConfigInitramfsForRaid >@@ -1322,6 +1362,7 @@ > --with MODULES load MODULES after all found automatically. > --extra MODULES add MODULES to be loaded only if needed. > --with-raid enable software RAID (md) support. >+--with-lvm enable LVM support. > --omit-scsi-modules do not load any SCSI modules. > --omit-ide-modules do not load any IDE modules. > --omit-raid-modules do not load any raid modules. >@@ -1344,7 +1385,7 @@ > [ -n "$1" ] && Exit "$1" || Exit > } > >-TEMP=`getopt -n "$PROG" -o a:fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after:,extra:,type:,add: -- "$@"` || Usage 1 >+TEMP=`getopt -n "$PROG" -o a:fhvd -l help,version,verbose,debug,force,ifneeded,omit-scsi-modules,omit-ide-modules,omit-raid-modules,with-raid,with-lvm,pause,image-version,nocompress,nobootsplash,strict,fstab:,before:,preload:,with:,after:,extra:,type:,add: -- "$@"` || Usage 1 > eval set -- "$TEMP" > > img_vers= >@@ -1417,6 +1458,10 @@ > HAVE_RAID=1 > shift > ;; >+ --with-lvm) >+ HAVE_LVM=1 >+ shift >+ ;; > --pause) > pause=1 > shift >@@ -1531,6 +1576,8 @@ > > FindRaidModules > >+FindLVMModules >+ > FindRootModules > > FindLoopModules
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19388
:
3417
| 3418