Find the answer to your Linux question:
Results 1 to 2 of 2
Dear All, I have Fedora Core 4. I created a volume group called lvm-root. In that volume group I created only one logical partition, called lvm0. I mounted it and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    1

    Lvm2 Booting - Can't Find Ext3


    Dear All,

    I have Fedora Core 4.

    I created a volume group called lvm-root.

    In that volume group I created only one logical partition, called lvm0.

    I mounted it and copied my current root filesystem there (using cp -ax).

    I used mkinitrd 5.0.8 with the appropriate fstab file (see bottom) and the kernel
    version 2.6.11-1.1369_FC4.

    I copied the /boot to a new non-lvm partition from where I am booting in order to activate the new root filesystem, but this seemed impossible as I get
    the following error :

    VFS: can't frin ext3 filesystem on dev ram0

    Note : before that message I got the message that lvm-root was
    successfully activated.

    My fstab file is :
    ===============
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    /dev/lvm-root/lvm0 / ext3 defaults,errors=remount-ro 1 1
    none /dev/pts devpts gid=5,mode=620 0 0
    none /dev/shm tmpfs defaults 0 0
    none /proc proc defaults 0 0
    none /sys sysfs defaults 0 0
    LABEL=/tmp /tmp ext3 defaults 1 2
    LABEL=SWAP-sda7 swap swap defaults 0 0
    /dev/sda1 /media/windows_C ntfs ro,umask=0222 0 0

    /dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
    /dev/hda /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0

    My initrd's init script is :
    ================
    #!/bin/nash

    mount -t proc /proc /proc
    setquiet
    echo Mounting proc filesystem
    echo Mounting sysfs filesystem
    mount -t sysfs /sys /sys
    echo Creating /dev
    mount -o mode=0755 -t tmpfs /dev /dev
    mkdir /dev/pts
    mkdir /dev/shm
    mkdir /dev/mapper
    echo Creating initial device nodes
    mknod /dev/console c 5 1
    mknod /dev/null c 1 3
    mknod /dev/ram b 1 1
    mknod /dev/rtc c 10 135
    mknod /dev/systty c 4 0
    mknod /dev/tty c 5 0
    mknod /dev/zero c 1 5
    mknod /dev/tty0 c 4 0
    mknod /dev/tty1 c 4 1
    mknod /dev/tty2 c 4 2
    mknod /dev/tty3 c 4 3
    mknod /dev/tty4 c 4 4
    mknod /dev/tty5 c 4 5
    mknod /dev/tty6 c 4 6
    mknod /dev/tty7 c 4 7
    mknod /dev/tty8 c 4 8
    mknod /dev/tty9 c 4 9
    mknod /dev/tty10 c 4 10
    mknod /dev/tty11 c 4 11
    mknod /dev/tty12 c 4 12
    mknod /dev/ttyS0 c 4 64
    mknod /dev/ttyS1 c 4 65
    mknod /dev/ttyS2 c 4 66
    mknod /dev/ttyS3 c 4 67
    echo Setting up hotplug.
    echo -n /sbin/hotplug > /proc/sys/kernel/hotplug
    echo Creating block device nodes.
    mkblkdevs
    echo "Loading scsi_mod.ko module"
    insmod /lib/scsi_mod.ko
    echo "Loading sd_mod.ko module"
    insmod /lib/sd_mod.ko
    echo "Loading libata.ko module"
    insmod /lib/libata.ko
    echo "Loading sata_nv.ko module"
    insmod /lib/sata_nv.ko
    echo "Loading jbd.ko module"
    insmod /lib/jbd.ko
    echo "Loading ext3.ko module"
    insmod /lib/ext3.ko
    echo "Loading dm-mod.ko module"
    insmod /lib/dm-mod.ko
    echo "Loading dm-mirror.ko module"
    insmod /lib/dm-mirror.ko
    echo "Loading dm-zero.ko module"
    insmod /lib/dm-zero.ko
    echo "Loading dm-snapshot.ko module"
    insmod /lib/dm-snapshot.ko
    echo Making device-mapper control node
    mkdmnod
    mkblkdevs
    echo Scanning logical volumes
    lvm vgscan --ignorelockingfailure
    echo Activating logical volumes
    lvm vgchange -ay --ignorelockingfailure lvm-root
    resume LABEL=SWAP-sda7
    echo Creating root device.
    mkrootdev -t ext3 -o defaults,errors=remount-ro,ro /dev/lvm-root/lvm0
    echo Mounting root filesystem.
    mount /sysroot
    echo Setting up other filesystems.
    setuproot
    echo Switching to new root and running init.
    switchroot

    Also, my partition table (I am booting from sda9 and trying to mount the root filesystem located at sda10):

    Disk /dev/sda: 37.0 GB, 37019566080 bytes
    255 heads, 63 sectors/track, 4500 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 3040 24418768+ 86 NTFS volume set
    /dev/sda2 3041 4500 11727450 f W95 Ext'd (LBA)
    /dev/sda5 4102 4114 104391 7 HPFS/NTFS
    /dev/sda6 3519 4101 4682884+ 83 Linux
    /dev/sda7 4115 4245 1052226 82 Linux swap / Solaris
    /dev/sda8 4246 4500 2048256 83 Linux
    /dev/sda9 3041 3042 16033+ 83 Linux
    /dev/sda10 3043 3518 3823438+ 8e Linux LVM

    Finally, the grub.conf entry for doing all this:

    root (hd0,
    kernel /vmlinuz-2.6.11-1.1369_FC4 root=/dev/ram0 rhgb quiet
    initrd /initrd-lvm2-2.6.11-1.1369_FC4.img

    Thanks in advance smile.gif

  2. #2
    Just Joined!
    Join Date
    Nov 2006
    Posts
    1
    You should specify the path to your root in the kernel line in grub.conf:

    kernel /vmlinuz-2.6.11-1.1369_FC4 root=/dev/lvm-root/lvm0 rhgb quiet


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •