[a32a241] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[5632009] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
[a42ba00] | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[5632009] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="initramfs">
|
---|
| 9 | <?dbhtml filename="initramfs.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info>
|
---|
| 12 | <othername>$LastChangedBy$</othername>
|
---|
| 13 | <date>$Date$</date>
|
---|
| 14 | </sect1info>
|
---|
| 15 |
|
---|
| 16 | <title>About initramfs</title>
|
---|
| 17 |
|
---|
| 18 | <para>The only purpose of an initramfs is to mount the root filesystem. The
|
---|
| 19 | initramfs is a complete set of directories that you would find on a normal
|
---|
| 20 | root filesystem. It is bundled into a single cpio archive and compressed
|
---|
| 21 | with one of several compression algorithms.</para>
|
---|
| 22 |
|
---|
| 23 | <para>At boot time, the boot loader loads the kernel and the initramfs image
|
---|
| 24 | into memory and starts the kernel. The kernel checks for the presence of the
|
---|
| 25 | initramfs and, if found, mounts it as / and runs /init. The init program is
|
---|
| 26 | typically a shell script. Note that the boot process takes longer, possibly
|
---|
[64cb61a] | 27 | significantly longer, if an initramfs is used.</para>
|
---|
[5632009] | 28 |
|
---|
| 29 | <para>For most distributions, kernel modules are the biggest reason to have an
|
---|
| 30 | initramfs. In a general distribution, there are many unknowns such as file
|
---|
| 31 | system types and disk layouts. In a way, this is the opposite of LFS where
|
---|
| 32 | the system capabilities and layout are known and a custom kernel is normally
|
---|
| 33 | built. In this situation, an initramfs is rarely needed.</para>
|
---|
| 34 |
|
---|
| 35 | <para>There are only four primary reasons to have an initramfs in the LFS
|
---|
| 36 | environment: loading the rootfs from a network, loading it from an LVM
|
---|
| 37 | logical volume, having an encrypted rootfs where a password is required, or
|
---|
| 38 | for the convenience of specifying the rootfs as a LABEL or UUID. Anything
|
---|
| 39 | else usually means that the kernel was not configured properly.</para>
|
---|
| 40 |
|
---|
| 41 | <sect2 id="initramfs-build">
|
---|
| 42 | <title>Building an initramfs</title>
|
---|
| 43 |
|
---|
[0d7900a] | 44 | <para>If you do decide to build an initramfs, the following scripts
|
---|
| 45 | will provide a basis to do it. The scripts will allow specifying a
|
---|
| 46 | rootfs via partition UUID or partition LABEL or a rootfs on an
|
---|
[5632009] | 47 | LVM logical volume. They do not support an encrypted root file system
|
---|
[0d7900a] | 48 | or mounting the rootfs over a network card. For a more complete
|
---|
[5632009] | 49 | capability see <ulink url="http://www.linuxfromscratch.org/hints/read.html">
|
---|
| 50 | the LFS Hints</ulink> or <ulink url="http://fedoraproject.org/wiki/Dracut">
|
---|
| 51 | dracut</ulink>.</para>
|
---|
| 52 |
|
---|
| 53 | <para>To install these scripts, run the following commands as the
|
---|
| 54 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 55 |
|
---|
| 56 | <screen role="root"><userinput>cat > /sbin/mkinitramfs << "EOF"
|
---|
| 57 | #!/bin/bash
|
---|
| 58 | # This file based in part on the mkinitrafms script for the LFS LiveCD
|
---|
| 59 | # written by Alexander E. Patrakov and Jeremy Huntwork.
|
---|
| 60 |
|
---|
| 61 | copy()
|
---|
| 62 | {
|
---|
| 63 | local file
|
---|
| 64 |
|
---|
| 65 | if [ "$2" == "lib" ]; then
|
---|
| 66 | file=$(PATH=/lib:/usr/lib type -p $1)
|
---|
| 67 | else
|
---|
| 68 | file=$(type -p $1)
|
---|
| 69 | fi
|
---|
| 70 |
|
---|
| 71 | if [ -n $file ] ; then
|
---|
| 72 | cp $file $WDIR/$2
|
---|
| 73 | else
|
---|
| 74 | echo "Missing required file: $1 for directory $2"
|
---|
| 75 | rm -rf $WDIR
|
---|
| 76 | exit 1
|
---|
| 77 | fi
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | if [ -z $1 ] ; then
|
---|
| 81 | INITRAMFS_FILE=initrd.img-no-kmods
|
---|
| 82 | else
|
---|
| 83 | KERNEL_VERSION=$1
|
---|
| 84 | INITRAMFS_FILE=initrd.img-$KERNEL_VERSION
|
---|
| 85 | fi
|
---|
| 86 |
|
---|
| 87 | if [ -n "$KERNEL_VERSION" ] && [ ! -d "/lib/modules/$1" ] ; then
|
---|
| 88 | echo "No modules directory named $1"
|
---|
| 89 | exit 1
|
---|
| 90 | fi
|
---|
| 91 |
|
---|
| 92 | printf "Creating $INITRAMFS_FILE... "
|
---|
| 93 |
|
---|
[90c6607] | 94 | binfiles="sh cat cp dd killall ls mkdir mknod mount "
|
---|
[5632009] | 95 | binfiles="$binfiles umount sed sleep ln rm uname"
|
---|
| 96 |
|
---|
[f350508] | 97 | # Systemd installs udevadm in /bin. Other udev implementations have it in /sbin
|
---|
| 98 | if [ -x /bin/udevadm ] ; then binfiles="$binfiles udevadm"; fi
|
---|
| 99 |
|
---|
| 100 | sbinfiles="modprobe blkid switch_root"
|
---|
[90c6607] | 101 |
|
---|
[8253f9fc] | 102 | #Optional files and locations
|
---|
[f350508] | 103 | for f in mdadm udevd udevadm; do
|
---|
[8253f9fc] | 104 | if [ -x /sbin/$f ] ; then sbinfiles="$sbinfiles $f"; fi
|
---|
| 105 | done
|
---|
[5632009] | 106 |
|
---|
| 107 | unsorted=$(mktemp /tmp/unsorted.XXXXXXXXXX)
|
---|
| 108 |
|
---|
| 109 | DATADIR=/usr/share/mkinitramfs
|
---|
| 110 | INITIN=init.in
|
---|
| 111 |
|
---|
| 112 | # Create a temporrary working directory
|
---|
| 113 | WDIR=$(mktemp -d /tmp/initrd-work.XXXXXXXXXX)
|
---|
| 114 |
|
---|
| 115 | # Create base directory structure
|
---|
| 116 | mkdir -p $WDIR/{bin,dev,lib/firmware,run,sbin,sys,proc}
|
---|
| 117 | mkdir -p $WDIR/etc/{modprobe.d,udev/rules.d}
|
---|
| 118 | touch $WDIR/etc/modprobe.d/modprobe.conf
|
---|
| 119 | ln -s lib $WDIR/lib64
|
---|
| 120 |
|
---|
| 121 | # Create necessary device nodes
|
---|
| 122 | mknod -m 640 $WDIR/dev/console c 5 1
|
---|
| 123 | mknod -m 664 $WDIR/dev/null c 1 3
|
---|
| 124 |
|
---|
| 125 | # Install the udev configuration files
|
---|
[50f410f] | 126 | if [ -f /etc/udev/udev.conf ]; then
|
---|
| 127 | cp /etc/udev/udev.conf $WDIR/etc/udev/udev.conf
|
---|
| 128 | fi
|
---|
[5632009] | 129 |
|
---|
| 130 | for file in $(find /etc/udev/rules.d/ -type f) ; do
|
---|
| 131 | cp $file $WDIR/etc/udev/rules.d
|
---|
| 132 | done
|
---|
| 133 |
|
---|
[a32a241] | 134 | # Install any firmware present
|
---|
| 135 | cp -a /lib/firmware $WDIR/lib
|
---|
| 136 |
|
---|
[f350508] | 137 | # Copy the RAID configuration file if present
|
---|
[5632009] | 138 | if [ -f /etc/mdadm.conf ] ; then
|
---|
| 139 | cp /etc/mdadm.conf $WDIR/etc
|
---|
| 140 | fi
|
---|
| 141 |
|
---|
| 142 | # Install the init file
|
---|
| 143 | install -m0755 $DATADIR/$INITIN $WDIR/init
|
---|
| 144 |
|
---|
[ea8a884] | 145 | if [ -n "$KERNEL_VERSION" ] ; then
|
---|
| 146 | if [ -x /bin/kmod ] ; then
|
---|
| 147 | binfiles="$binfiles kmod"
|
---|
| 148 | else
|
---|
| 149 | binfiles="$binfiles lsmod"
|
---|
[64cb61a] | 150 | sbinfiles="$sbinfiles insmod"
|
---|
[ea8a884] | 151 | fi
|
---|
| 152 | fi
|
---|
| 153 |
|
---|
[5632009] | 154 | # Install basic binaries
|
---|
| 155 | for f in $binfiles ; do
|
---|
| 156 | ldd /bin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
---|
| 157 | copy $f bin
|
---|
| 158 | done
|
---|
| 159 |
|
---|
| 160 | # Add lvm if present
|
---|
[50f410f] | 161 | if [ -x /sbin/lvm ] ; then sbinfiles="$sbinfiles lvm dmsetup"; fi
|
---|
[5632009] | 162 |
|
---|
| 163 | for f in $sbinfiles ; do
|
---|
| 164 | ldd /sbin/$f | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
---|
| 165 | copy $f sbin
|
---|
| 166 | done
|
---|
| 167 |
|
---|
[8253f9fc] | 168 | # Add udevd libraries if not in /sbin
|
---|
| 169 | if [ -x /lib/udev/udevd ] ; then
|
---|
[f350508] | 170 | ldd /lib/udev/udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
---|
| 171 | elif [ -x /lib/systemd/systemd-udevd ] ; then
|
---|
| 172 | ldd /lib/systemd/systemd-udevd | sed "s/\t//" | cut -d " " -f1 >> $unsorted
|
---|
[8253f9fc] | 173 | fi
|
---|
| 174 |
|
---|
[ea8a884] | 175 | # Add module symlinks if appropriate
|
---|
| 176 | if [ -n "$KERNEL_VERSION" ] && [ -x /bin/kmod ] ; then
|
---|
| 177 | ln -s kmod $WDIR/bin/lsmod
|
---|
| 178 | ln -s kmod $WDIR/bin/insmod
|
---|
| 179 | fi
|
---|
| 180 |
|
---|
[5632009] | 181 | # Add lvm symlinks if appropriate
|
---|
[50f410f] | 182 | # Also copy the lvm.conf file
|
---|
[5632009] | 183 | if [ -x /sbin/lvm ] ; then
|
---|
| 184 | ln -s lvm $WDIR/sbin/lvchange
|
---|
[8253f9fc] | 185 | ln -s lvm $WDIR/sbin/lvrename
|
---|
| 186 | ln -s lvm $WDIR/sbin/lvextend
|
---|
[5632009] | 187 | ln -s lvm $WDIR/sbin/lvcreate
|
---|
| 188 | ln -s lvm $WDIR/sbin/lvdisplay
|
---|
| 189 | ln -s lvm $WDIR/sbin/lvscan
|
---|
| 190 |
|
---|
| 191 | ln -s lvm $WDIR/sbin/pvchange
|
---|
| 192 | ln -s lvm $WDIR/sbin/pvck
|
---|
| 193 | ln -s lvm $WDIR/sbin/pvcreate
|
---|
| 194 | ln -s lvm $WDIR/sbin/pvdisplay
|
---|
| 195 | ln -s lvm $WDIR/sbin/pvscan
|
---|
| 196 |
|
---|
[068c8df] | 197 | ln -s lvm $WDIR/sbin/vgchange
|
---|
[5632009] | 198 | ln -s lvm $WDIR/sbin/vgcreate
|
---|
| 199 | ln -s lvm $WDIR/sbin/vgscan
|
---|
| 200 | ln -s lvm $WDIR/sbin/vgrename
|
---|
| 201 | ln -s lvm $WDIR/sbin/vgck
|
---|
[50f410f] | 202 | # Conf file(s)
|
---|
| 203 | cp -a /etc/lvm $WDIR/etc
|
---|
[5632009] | 204 | fi
|
---|
| 205 |
|
---|
| 206 | # Install libraries
|
---|
[8253f9fc] | 207 | sort $unsorted | uniq | while read library ; do
|
---|
| 208 | if [ "$library" == "linux-vdso.so.1" ] ||
|
---|
| 209 | [ "$library" == "linux-gate.so.1" ]; then
|
---|
[5632009] | 210 | continue
|
---|
| 211 | fi
|
---|
| 212 |
|
---|
| 213 | copy $library lib
|
---|
| 214 | done
|
---|
| 215 |
|
---|
[f350508] | 216 | if [ -d /lib/udev ]; then
|
---|
| 217 | cp -a /lib/udev $WDIR/lib
|
---|
| 218 | fi
|
---|
| 219 | if [ -d /lib/systemd ]; then
|
---|
| 220 | cp -a /lib/systemd $WDIR/lib
|
---|
| 221 | fi
|
---|
[5632009] | 222 |
|
---|
| 223 | # Install the kernel modules if requested
|
---|
| 224 | if [ -n "$KERNEL_VERSION" ]; then
|
---|
| 225 | find \
|
---|
| 226 | /lib/modules/$KERNEL_VERSION/kernel/{crypto,fs,lib} \
|
---|
| 227 | /lib/modules/$KERNEL_VERSION/kernel/drivers/{block,ata,md,firewire} \
|
---|
| 228 | /lib/modules/$KERNEL_VERSION/kernel/drivers/{scsi,message,pcmcia,virtio} \
|
---|
| 229 | /lib/modules/$KERNEL_VERSION/kernel/drivers/usb/{host,storage} \
|
---|
| 230 | -type f 2> /dev/null | cpio --make-directories -p --quiet $WDIR
|
---|
| 231 |
|
---|
[8253f9fc] | 232 | cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order} \
|
---|
| 233 | $WDIR/lib/modules/$KERNEL_VERSION
|
---|
| 234 |
|
---|
[5632009] | 235 | depmod -b $WDIR $KERNEL_VERSION
|
---|
| 236 | fi
|
---|
| 237 |
|
---|
| 238 | ( cd $WDIR ; find . | cpio -o -H newc --quiet | gzip -9 ) > $INITRAMFS_FILE
|
---|
| 239 |
|
---|
| 240 | # Remove the temporary directory and file
|
---|
| 241 | rm -rf $WDIR $unsorted
|
---|
| 242 | printf "done.\n"
|
---|
| 243 |
|
---|
[5712a7d] | 244 | EOF
|
---|
| 245 |
|
---|
| 246 | <command>chmod 0755 /sbin/mkinitramfs</command></userinput></screen>
|
---|
[0d7900a] | 247 |
|
---|
[5632009] | 248 | <screen role="root"><userinput>mkdir -p /usr/share/mkinitramfs &&
|
---|
| 249 | cat > /usr/share/mkinitramfs/init.in << "EOF"
|
---|
| 250 | #!/bin/sh
|
---|
| 251 |
|
---|
| 252 | PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
---|
| 253 | export PATH
|
---|
| 254 |
|
---|
| 255 | problem()
|
---|
| 256 | {
|
---|
| 257 | printf "Encountered a problem!\n\nDropping you to a shell.\n\n"
|
---|
| 258 | sh
|
---|
| 259 | }
|
---|
| 260 |
|
---|
| 261 | no_device()
|
---|
| 262 | {
|
---|
| 263 | printf "The device %s, which is supposed to contain the\n" $1
|
---|
| 264 | printf "root file system, does not exist.\n"
|
---|
| 265 | printf "Please fix this problem and exit this shell.\n\n"
|
---|
| 266 | }
|
---|
| 267 |
|
---|
| 268 | no_mount()
|
---|
| 269 | {
|
---|
| 270 | printf "Could not mount device %s\n" $1
|
---|
| 271 | printf "Sleeping forever. Please reboot and fix the kernel command line.\n\n"
|
---|
| 272 | printf "Maybe the device is formatted with an unsupported file system?\n\n"
|
---|
| 273 | printf "Or maybe filesystem type autodetection went wrong, in which case\n"
|
---|
| 274 | printf "you should add the rootfstype=... parameter to the kernel command line.\n\n"
|
---|
| 275 | printf "Available partitions:\n"
|
---|
| 276 | }
|
---|
| 277 |
|
---|
| 278 | do_mount_root()
|
---|
| 279 | {
|
---|
| 280 | mkdir /.root
|
---|
| 281 | [ -n "$rootflags" ] && rootflags="$rootflags,"
|
---|
| 282 | rootflags="$rootflags$ro"
|
---|
| 283 |
|
---|
| 284 | case "$root" in
|
---|
| 285 | /dev/* ) device=$root ;;
|
---|
| 286 | UUID=* ) eval $root; device="/dev/disk/by-uuid/$UUID" ;;
|
---|
[4a20b84] | 287 | LABEL=*) eval $root; device="/dev/disk/by-label/$LABEL" ;;
|
---|
[5632009] | 288 | "" ) echo "No root device specified." ; problem ;;
|
---|
| 289 | esac
|
---|
| 290 |
|
---|
| 291 | while [ ! -b "$device" ] ; do
|
---|
| 292 | no_device $device
|
---|
| 293 | problem
|
---|
| 294 | done
|
---|
| 295 |
|
---|
| 296 | if ! mount -n -t "$rootfstype" -o "$rootflags" "$device" /.root ; then
|
---|
| 297 | no_mount $device
|
---|
| 298 | cat /proc/partitions
|
---|
| 299 | while true ; do sleep 10000 ; done
|
---|
| 300 | else
|
---|
| 301 | echo "Successfully mounted device $root"
|
---|
| 302 | fi
|
---|
| 303 | }
|
---|
| 304 |
|
---|
| 305 | init=/sbin/init
|
---|
| 306 | root=
|
---|
| 307 | rootdelay=
|
---|
| 308 | rootfstype=auto
|
---|
| 309 | ro="ro"
|
---|
| 310 | rootflags=
|
---|
| 311 | device=
|
---|
| 312 |
|
---|
| 313 | mount -n -t devtmpfs devtmpfs /dev
|
---|
[a32a241] | 314 | mount -n -t proc proc /proc
|
---|
| 315 | mount -n -t sysfs sysfs /sys
|
---|
| 316 | mount -n -t tmpfs tmpfs /run
|
---|
[5632009] | 317 |
|
---|
| 318 | read -r cmdline < /proc/cmdline
|
---|
| 319 |
|
---|
| 320 | for param in $cmdline ; do
|
---|
| 321 | case $param in
|
---|
| 322 | init=* ) init=${param#init=} ;;
|
---|
| 323 | root=* ) root=${param#root=} ;;
|
---|
| 324 | rootdelay=* ) rootdelay=${param#rootdelay=} ;;
|
---|
| 325 | rootfstype=*) rootfstype=${param#rootfstype=} ;;
|
---|
| 326 | rootflags=* ) rootflags=${param#rootflags=} ;;
|
---|
| 327 | ro ) ro="ro" ;;
|
---|
| 328 | rw ) ro="rw" ;;
|
---|
| 329 | esac
|
---|
| 330 | done
|
---|
| 331 |
|
---|
[8253f9fc] | 332 | # udevd location depends on version
|
---|
| 333 | if [ -x /sbin/udevd ]; then
|
---|
[f350508] | 334 | UDEVD=/sbin/udevd
|
---|
| 335 | elif [ -x /lib/udev/udevd ]; then
|
---|
| 336 | UDEVD=/lib/udev/udevd
|
---|
| 337 | elif [ -x /lib/systemd/systemd-udevd ]; then
|
---|
| 338 | UDEVD=/lib/systemd/systemd-udevd
|
---|
[8253f9fc] | 339 | else
|
---|
[f350508] | 340 | echo "Cannot find udevd nor systemd-udevd"
|
---|
| 341 | problem
|
---|
[8253f9fc] | 342 | fi
|
---|
| 343 |
|
---|
[f350508] | 344 | ${UDEVD} --daemon --resolve-names=never
|
---|
[5632009] | 345 | udevadm trigger
|
---|
| 346 | udevadm settle
|
---|
| 347 |
|
---|
[50f410f] | 348 | if [ -f /etc/mdadm.conf ] ; then mdadm -As ; fi
|
---|
| 349 | if [ -x /sbin/vgchange ] ; then /sbin/vgchange -a y > /dev/null ; fi
|
---|
| 350 | if [ -n "$rootdelay" ] ; then sleep "$rootdelay" ; fi
|
---|
[5632009] | 351 |
|
---|
| 352 | do_mount_root
|
---|
| 353 |
|
---|
[f350508] | 354 | killall -w ${UDEVD##*/}
|
---|
[5632009] | 355 |
|
---|
| 356 | exec switch_root /.root "$init" "$@"
|
---|
| 357 |
|
---|
| 358 | EOF</userinput></screen>
|
---|
[0d7900a] | 359 |
|
---|
[5632009] | 360 | </sect2>
|
---|
| 361 |
|
---|
| 362 | <sect2 id="initramfs-install">
|
---|
| 363 | <title>Using an initramfs</title>
|
---|
| 364 |
|
---|
[ea8a884] | 365 | <bridgehead renderas="sect3">Required Runtime Dependency</bridgehead>
|
---|
| 366 |
|
---|
| 367 | <para role="required">
|
---|
| 368 | <xref linkend="cpio"/>
|
---|
| 369 | </para>
|
---|
| 370 |
|
---|
| 371 | <para condition="html" role="usernotes">User Notes:
|
---|
| 372 | <ulink url="&blfs-wiki;/initramfs"/>
|
---|
| 373 | </para>
|
---|
| 374 |
|
---|
| 375 |
|
---|
[5632009] | 376 | <para>To build an initramfs, run the following as the <systemitem
|
---|
| 377 | class="username">root</systemitem> user:</para>
|
---|
| 378 |
|
---|
| 379 | <screen><userinput>mkinitramfs [KERNEL VERSION]</userinput></screen>
|
---|
| 380 |
|
---|
| 381 | <para>The optional argument is the directory where the appropriate kernel
|
---|
| 382 | modules are located. This must be a subdirectory of <filename
|
---|
| 383 | class='directory'> /lib/modules</filename>. If no modules are specified,
|
---|
| 384 | then the initramfs is named <emphasis>initrd.img-no-kmods</emphasis>. If a
|
---|
| 385 | kernel version is specified, the initrd is named
|
---|
| 386 | <emphasis>initrd.img-$KERNEL_VERSION</emphasis> and is only appropriate for
|
---|
| 387 | the specific kernel specified. The output file will be placed in the
|
---|
| 388 | current directory.</para>
|
---|
| 389 |
|
---|
| 390 | <para>After generating the initrd, copy it to the <filename
|
---|
| 391 | class='directory'>/boot</filename> directory.</para>
|
---|
| 392 |
|
---|
[0d7900a] | 393 | <para>Now edit <filename>/boot/grub/grub.cfg</filename> and add a new
|
---|
[5632009] | 394 | menuentry. Below are several examples.</para>
|
---|
| 395 |
|
---|
| 396 | <screen><userinput># Generic initramfs and root fs identified by UUID
|
---|
[0d7900a] | 397 | menuentry "LFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4"
|
---|
[5632009] | 398 | {
|
---|
| 399 | linux /vmlinuz-3.0.4-lfs-20120214 root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro
|
---|
| 400 | initrd /initrd.img-no-kmods
|
---|
| 401 | }</userinput></screen>
|
---|
| 402 |
|
---|
| 403 | <screen><userinput># Generic initramfs and root fs on LVM partition
|
---|
[0d7900a] | 404 | menuentry "LFS Dev (LFS-7.0-Feb18) initrd lvm, Linux 3.0.4"
|
---|
[5632009] | 405 | {
|
---|
| 406 | linux /vmlinuz-3.0.4-lfs-20120218 root=/dev/mapper/myroot ro
|
---|
| 407 | initrd /initrd.img-no-kmods
|
---|
| 408 | }</userinput></screen>
|
---|
| 409 |
|
---|
| 410 | <screen><userinput># Specific initramfs and root fs identified by LABEL
|
---|
[0d7900a] | 411 | menuentry "LFS Dev (LFS-7.1-Feb20) initrd label, Linux 3.2.6"
|
---|
[5632009] | 412 | {
|
---|
| 413 | linux /vmlinuz-3.2.6-lfs71-120220 root=LABEL=lfs71 ro
|
---|
| 414 | initrd /initrd.img-3.2.6-lfs71-120220
|
---|
| 415 | }</userinput></screen>
|
---|
| 416 |
|
---|
| 417 | <para>Finally, reboot the system and select the desired system.</para>
|
---|
| 418 |
|
---|
| 419 | </sect2>
|
---|
| 420 |
|
---|
| 421 | </sect1>
|
---|