Donate Share

Clonezilla

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Physical CentOS with LVM to VMWare

You are viewing a single message from this topic. View all messages.

  1. 2009-06-28 17:02:35 UTC

    Hi,

    I'm trying to restore a physical installation of Centos to a VMWare virtual machine.

    I received the dreaded "Running: grub-install-no-floppy-root-directory=/tmp/hd_img.QiFQFv /dev/sda
    grub-probe: error: Cannot open '/boot/grub/devise_map'
    /usr/sbin/grub-install: line 374: [: =: unary operator expected" error message.

    Anyhow, when I try to boot the machine, I received a Kernel Panic :

    Volume group "VolGroup00" not found
    Trying to resume form /dev/VolGroup/LogVol01
    Unable to access resume device

    (...)

    Mount : Could not find filesystem '/dev/root'

    (...)

    Kernel Panic - not syncing : Attempted to kill init!



    The disk is formatted with a boot Linux partition, followed by a big LVM partition :

    fdisk-l output on the restored machine :

    Disk /dev/sda: 134.2 GB, 134217728000 bytes
    255 heads, 63 sectors/track, 16317 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000baed3

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 13 104391 83 Linux
    /dev/sda2 14 14593 117113850 8e Linux LVM

    The LVM volume itself is composed of the following logical volumes :

    pvdisplay output :

    --- Physical volume ---
    PV Name /dev/sda2
    VG Name VolGroup00
    PV Size 111.69 GB / not usable 1018.00 KB
    Allocatable yes (but full)
    PE Size (KByte) 32768
    Total PE 3574
    Free PE 0
    Allocated PE 3574
    PV UUID HsETnF-XSTU-V5A4-Zkux-oBJm-JRAl-8mHoLd

    vgdisplay output :

    --- Volume group ---
    VG Name VolGroup00
    System ID
    Format lvm2
    Metadata Areas 1
    Metadata Sequence No 4
    VG Access read/write
    VG Status resizable
    MAX LV 0
    Cur LV 2
    Open LV 1
    Max PV 0
    Cur PV 1
    Act PV 1
    VG Size 111.69 GB
    PE Size 32.00 MB
    Total PE 3574
    Alloc PE / Size 3574 / 111.69 GB
    Free PE / Size 0 / 0
    VG UUID pwaNUO-hXTM-LAdC-TUds-yyAq-ylm4-mM0jOP


    lvdisplay output :

    --- Logical volume ---
    LV Name /dev/VolGroup00/LogVol00
    VG Name VolGroup00
    LV UUID RpV3Ix-rLod-Idnm-mOdf-31kV-spSr-2Tdf03
    LV Write Access read/write
    LV Status available
    # open 1
    LV Size 111.19 GB
    Current LE 3558
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:0

    --- Logical volume ---
    LV Name /dev/VolGroup00/LogVol01
    VG Name VolGroup00
    LV UUID td59rA-cLl0-H2Ie-jOp0-A0Z2-4doJ-3PQ9ry
    LV Write Access read/write
    LV Status available
    # open 0
    LV Size 512.00 MB
    Current LE 16
    Segments 1
    Allocation inherit
    Read ahead sectors auto
    - currently set to 256
    Block device 254:1



    Following the advices related to an analog problem (Giorgos) , I mounted the LVM partition in order to edit the fstab file.
    The contents of this file are the following :


    /dev/VolGroup00/LogVol00 / ext3 defaults 1 1
    LABEL=/boot /boot ext3 defaults 1 2
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    /dev/VolGroup00/LogVol01 swap swap defaults 0 0


    I'm quite new to Linux, but cannot see anything wrong here...


    For your info, I'm also posting the files grub.conf and menu.lst

    GRUB.CONF

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,0)
    # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    # initrd /initrd-version.img
    boot=/dev/hdc
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-128.1.10.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.10.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.10.el5.img
    title CentOS (2.6.18-128.1.6.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.6.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.6.el5.img
    title CentOS (2.6.18-128.1.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.1.el5.img

    MENU.LST

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,0)
    # kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    # initrd /initrd-version.img
    boot=/dev/hdc
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-128.1.10.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.10.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.10.el5.img
    title CentOS (2.6.18-128.1.6.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.6.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.6.el5.img
    title CentOS (2.6.18-128.1.1.el5)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=/dev/VolGroup00/LogVol00
    initrd /initrd-2.6.18-128.1.1.el5.img




    Can anyone help me to make my restored CentOS boot on vmware ?

    Thanks

    Matthieu
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.