summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2011-December/010126.html
blob: c93090186436ee4fe699c114b5b16de6511fe1b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20RFC%3A%20Drop%20mkinitrd%20completely%20in%20favour%20of%20dracut.&In-Reply-To=%3Cop.v5wplxqen7mcit%40hodgins.homeip.net%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="010120.html">
   <LINK REL="Next"  HREF="010128.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.</H1>
    <B>David W. Hodgins</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20RFC%3A%20Drop%20mkinitrd%20completely%20in%20favour%20of%20dracut.&In-Reply-To=%3Cop.v5wplxqen7mcit%40hodgins.homeip.net%3E"
       TITLE="[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.">davidwhodgins at gmail.com
       </A><BR>
    <I>Sat Dec  3 10:21:23 CET 2011</I>
    <P><UL>
        <LI>Previous message: <A HREF="010120.html">[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.
</A></li>
        <LI>Next message: <A HREF="010128.html">[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#10126">[ date ]</a>
              <a href="thread.html#10126">[ thread ]</a>
              <a href="subject.html#10126">[ subject ]</a>
              <a href="author.html#10126">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On Sat, 03 Dec 2011 01:05:31 -0500, Thomas Backlund &lt;<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">tmb at mageia.org</A>&gt; wrote:

Fyi. On one of my cauldron installs, I have /usr in a lvm
logical volume.  In order to get this to be bootable, I
modified /etc/dracut.conf to have
add_drivers+=&quot;dm_mod dm_crypt&quot;
and
install_items+=(/bin/grep /lib/libpcre.so.0.0.1 /lib/libpcre.so.0 /lib/libdevmapper-event.so.1.02 /lib/libdevmapper.so.1.02 /lib/libreadline.so.6 /lib/libncurses.so.5 /sbin/lvm /lib/modules/3.1.4-server-1.mga2/kernel/drivers/md/dm-crypt.ko.gz /lib/modules/3.1.4-server-1.mga2/kernel/drivers/md/dm-mod.ko.gz /sbin/dmsetup /sbin/lsmod )

I modified /usr/share/dracut/modules.d/98usrmount/mount-usr.sh to have ...
#!/bin/sh
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

type info &gt;/dev/null 2&gt;&amp;1 || . /lib/dracut-lib.sh
type fsck_single &gt;/dev/null 2&gt;&amp;1 || . /lib/fs-lib.sh

mount_usr()
{
     local _dev _mp _fs _opts _rest _fs_found _ret _mount_point
     if ! __fgrep &quot;device-mapper&quot; /proc/devices &gt;/dev/null 2&gt;&amp;1 ; then
        modprobe dm-mod &gt;/dev/null 2&gt;&amp;1
     fi
     /sbin/lvm vgchange -a y --sysinit
fsck_mount()
(
     # check, if we have to mount the filesystem
     _fs_found=&quot;&quot;
     while read _dev _mp _fs _opts _rest; do
         if [ &quot;$_mp&quot; = &quot;/$_mount_point&quot; ]; then
             echo &quot;$_dev $NEWROOT/$_mp $_fs ${_opts} $_rest&quot;
             _fs_found=&quot;1&quot;
             break
         fi
     done &lt; &quot;$NEWROOT/etc/fstab&quot; &gt;&gt; /etc/fstab
     if [ &quot;x$_fs_found&quot; != &quot;x&quot; ]; then
         # we have to mount it
         fsck_single &quot;$_dev&quot; &quot;$_fs&quot;
         _ret=$?
         echo $_ret &gt;/run/initramfs/$_mount_point-fsck
         if [ $_ret -ne 255 ]; then
             info &quot;Mounting /$_mount_point&quot;
             mount &quot;$NEWROOT/$_mount_point&quot; 2&gt;&amp;1 | vinfo
         fi
     fi
)
     _mount_point=&quot;usr&quot;; fsck_mount
     _mount_point=&quot;var&quot;; fsck_mount
     _mount_point=&quot;var/mnt&quot;; fsck_mount
     _mount_point=&quot;opt&quot;; fsck_mount
     _mount_point=&quot;tmp&quot;; fsck_mount
     _mount_point=&quot;home&quot;; fsck_mount
}

mount_usr

I initially only had the /usr being mounted, but found that when it
got around to trying to mount the next lv, it would report that the
mount timed out due to a dependency failure, but with no indication
of why.  I ended up modifying the script to mount all of my lvm
partitions, in the initramfs, to get it to work.

Regards, Dave Hodgins

</PRE>











<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="010120.html">[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.
</A></li>
	<LI>Next message: <A HREF="010128.html">[Mageia-dev] RFC: Drop mkinitrd completely in favour of dracut.
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#10126">[ date ]</a>
              <a href="thread.html#10126">[ thread ]</a>
              <a href="subject.html#10126">[ subject ]</a>
              <a href="author.html#10126">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>