Find the answer to your Linux question:
Results 1 to 2 of 2
I mistakenly renamed LVM partition VolGroup00 to VolGrpSystem and now my linux installation won't boot. Is there any way to revert this back? regular boot fails with Reading all physical ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    2

    Redhat 5 - VolGroup00 renamed -- won't boot


    I mistakenly renamed LVM partition VolGroup00 to VolGrpSystem and now my linux installation won't boot. Is there any way to revert this back?

    regular boot fails with
    Reading all physical volumes. This may take a while...
    Found volume group "VolGroupSystem" using metadata type lvm2
    Volume group "VolGroup00" not found
    Unable to access resume device (/dev/VolGroup00/LogVol00)
    mount: could not find filesystem 'dev/root'
    setuproot: moving /dev failed: No such file or directory
    setuproot: error mounting /proc: No such file or directory
    setuproot: error mounting /sys: No such file or directory
    switchroot: mount failed: No such file or directory
    Kernal panic -- not syncing:.....


    <--newb, please be gentle.

    linux rescue
    -- the partition won't mount automatically

    Error when trying to 'Continue' during linux rescue
    'An error occurred trying to mount some or all of your system. Some of it may be mounted under /mnt/sysimage'

    I am still able to access some stuff via
    mount /dev/VolGrpSystem/LogVol01 /mnt/sysimage/
    chroot /mnt/sysimage

    but i still don't see how to change the name back.
    after I chroot, everything seems to be named as VolGroup00 (in fstab), changing the values to VolGrpSystem didn't work.
    *changed everything back*

    grub boot options
    tried to rename the line
    kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol01 rhgb quiet
    to
    kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGrpSystem/LogVol01 rhgb quiet
    no luck there



    thanks for any help.

  2. #2
    Just Joined!
    Join Date
    Sep 2005
    Location
    Edmonton, Canada
    Posts
    48
    You were on the right track with changing the fstab and grub.conf entries to the new volume name, but you need to do one more thing while chrooted to the drive.

    After modifying fstab and grub.conf, rerun mkinitrtd (or dracut) to create a new boot initrd (or initramfs) file,

    I believe EL5 uses mkinitrd to create /boot/initrd-{kernel-ver}.img, while EL6 uses the newer dracut to create /boot/initramfs-{kernel-ver}.img. An updated EL5 may use dracut, I do not know for sure.
    The filename from grub.conf 'initrd' lines will indicate whether mkinitrd or dracut is in use. The initrd file must be updated anytime root or boot partition changes are made, as partition info for root and boot is needed to boot the system.

    Backup the existing initrd (or initramfs) file, in /boot, before running mkinitrd (or dracut)

    Using the 'initrd' path from your grub.conf file, you need to run a command like:

    mkinitrd -f {--with=modulename --with=modulename2...} /boot/initrd-2.6.18-274.img 2.6.18-274

    or:
    dracut -f {-d 'modulename1,modulename2...'} /boot/initramfs-2.6.18-274.img 2.6.18-274

    The exact initrd file name and kernel version can be found in your grub.conf file.

    You need to specify any required disk controller and root file system type modules manually using the --with= (-d for dracut) option, because a chroot environment does not have complete /proc and /sys filesystems for mkinitrd (or dracut) to read in-use driver info from. This will cause mkinitrd (or dracut) to issue some warnings, but as long as the required module names are given, the system will boot.

    Required modules can be determined from the 'lsmod' command output. The lsmod must be run before doing the chroot.

    With the old initrd file backed up in /boot, you can also use grub's boot editor to change which initrd file is used at boot time.

    See the mkinitrd or dracut docs for more info.

    Hope this helps.

Posting Permissions

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