Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   mount the wrong device after system recovery (http://www.linux-archive.org/centos/486706-mount-wrong-device-after-system-recovery.html)

Xinhuan Zheng 02-08-2011 05:51 PM

mount the wrong device after system recovery
 
Hi,


*


I am recovering a CentOS 5.4 system. I’ve copied all
partitions into the recovery system. I’ve installed grub boot loader.
However, the original system is using /dev/sdb1 for root (/), while the recovery
system is using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I
got the panic error:


*


·********
Mounting /dev/sdb1 on /sysroot


·********
Mount: mounting /dev/sdb1 on /sysroot failed: No
such file or directory


·********
Mount: mounting /dev on /sysroot/dev failed: No
such file or directory


·********
* switching / to /sysroot


·********
Switch_root: bad newroot /sysroot


·********
Kernel panic – not syncing: Attempted to
kill init!


*


I’ve changed the recovery system fstab to use the
correct devices. I deleted recovery system etc/lvm/cache/.cache file. But it
still doesn’t work. What am I missing?


*


Thanks,


*


-*********
xinhuan







_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Kwan Lowe 02-08-2011 06:01 PM

mount the wrong device after system recovery
 
On Tue, Feb 8, 2011 at 1:51 PM, Xinhuan Zheng <xzheng@christianbook.com> wrote:
>
> ·******** * switching / to /sysroot
>
> ·******** Switch_root: bad newroot /sysroot
>
> ·******** Kernel panic – not syncing: Attempted to kill init!
>
>
>
> I’ve changed the recovery system fstab to use the correct devices. I deleted
> recovery system etc/lvm/cache/.cache file. But it still doesn’t work. What
> am I missing?

What does your /etc/grub.conf look like?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

02-08-2011 06:02 PM

mount the wrong device after system recovery
 
Xinhuan Zheng wrote:
>
> I am recovering a CentOS 5.4 system. I've copied all partitions into the
> recovery system. I've installed grub boot loader. However, the original
> system is using /dev/sdb1 for root (/), while the recovery system is
> using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I got
> the panic error:
>
> * Mounting /dev/sdb1 on /sysroot
> * Mount: mounting /dev/sdb1 on /sysroot failed: No such file or
> directory
<snip>
> I've changed the recovery system fstab to use the correct devices. I
> deleted recovery system etc/lvm/cache/.cache file. But it still doesn't
> work. What am I missing?

What does your /boot/grub/grub.conf read? You have to edit that, then
reinstall grub.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

cornel panceac 02-08-2011 06:22 PM

mount the wrong device after system recovery
 
2011/2/8 Xinhuan Zheng <xzheng@christianbook.com>














Hi,


*


I am recovering a CentOS 5.4 system. I’ve copied all
partitions into the recovery system. I’ve installed grub boot loader.
However, the original system is using /dev/sdb1 for root (/), while the recovery
system is using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I
got the panic error:


*



·********
Mounting /dev/sdb1 on /sysroot



·********
Mount: mounting /dev/sdb1 on /sysroot failed: No
such file or directory



·********
Mount: mounting /dev on /sysroot/dev failed: No
such file or directory



·********
* switching / to /sysroot



·********
Switch_root: bad newroot /sysroot



·********
Kernel panic – not syncing: Attempted to
kill init!


*


I’ve changed the recovery system fstab to use the
correct devices. I deleted recovery system etc/lvm/cache/.cache file. But it
still doesn’t work. What am I missing?


*


Thanks,


*



-*********
xinhuan







try rebuilding initrd .
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Robert Heller 02-08-2011 06:58 PM

mount the wrong device after system recovery
 
At Tue, 8 Feb 2011 13:51:32 -0500 CentOS mailing list <centos@centos.org> wrote:

>
> Content-Class: urn:content-classes:message
>
>
> Hi,
>
>
>
> I am recovering a CentOS 5.4 system. I've copied all partitions into the
> recovery system. I've installed grub boot loader. However, the original
> system is using /dev/sdb1 for root (/), while the recovery system is
> using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I got
> the panic error:
>
>
>
> * Mounting /dev/sdb1 on /sysroot
>
> * Mount: mounting /dev/sdb1 on /sysroot failed: No such file or
> directory
>
> * Mount: mounting /dev on /sysroot/dev failed: No such file or
> directory
>
> * * switching / to /sysroot
>
> * Switch_root: bad newroot /sysroot
>
> * Kernel panic - not syncing: Attempted to kill init!
>
>
>
> I've changed the recovery system fstab to use the correct devices. I
> deleted recovery system etc/lvm/cache/.cache file. But it still doesn't
> work. What am I missing?

You need to rebuild the initrd and make sure the grub.conf file is
up-to-date (has the right thing for the root parameter).

>
>
>
> Thanks,
>
>
>
> - xinhuan
>
> MIME-Version: 1.0
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Xinhuan Zheng 02-08-2011 08:31 PM

mount the wrong device after system recovery
 
My grub.conf is pointing to sdb1 for /. I've corrected to use
/dev/vg0/lv1. But after rebooting, I am getting the same error. I guess
I need to rebuild initrd.img file. How do I rebuild that file?

Thanks,

- xinhuan

-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
Behalf Of Robert Heller
Sent: Tuesday, February 08, 2011 2:59 PM
To: CentOS mailing list
Cc: CentOS mailing list
Subject: Re: [CentOS] mount the wrong device after system recovery

At Tue, 8 Feb 2011 13:51:32 -0500 CentOS mailing list
<centos@centos.org> wrote:

>
> Content-Class: urn:content-classes:message
>
>
> Hi,
>
>
>
> I am recovering a CentOS 5.4 system. I've copied all partitions into
the
> recovery system. I've installed grub boot loader. However, the
original
> system is using /dev/sdb1 for root (/), while the recovery system is
> using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I
got
> the panic error:
>
>
>
> * Mounting /dev/sdb1 on /sysroot
>
> * Mount: mounting /dev/sdb1 on /sysroot failed: No such file
or
> directory
>
> * Mount: mounting /dev on /sysroot/dev failed: No such file or
> directory
>
> * * switching / to /sysroot
>
> * Switch_root: bad newroot /sysroot
>
> * Kernel panic - not syncing: Attempted to kill init!
>
>
>
> I've changed the recovery system fstab to use the correct devices. I
> deleted recovery system etc/lvm/cache/.cache file. But it still
doesn't
> work. What am I missing?

You need to rebuild the initrd and make sure the grub.conf file is
up-to-date (has the right thing for the root parameter).

>
>
>
> Thanks,
>
>
>
> - xinhuan
>
> MIME-Version: 1.0
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Kwan Lowe 02-08-2011 08:44 PM

mount the wrong device after system recovery
 
On Tue, Feb 8, 2011 at 4:31 PM, Xinhuan Zheng <xzheng@christianbook.com> wrote:
> My grub.conf is pointing to sdb1 for /. I've corrected to use
> /dev/vg0/lv1. But after rebooting, I am getting the same error. I guess
> I need to rebuild initrd.img file. How do I rebuild that file?

You'd use the mkinitrd utility and specify the name of the new initrd
and the kernel version.

To create from the current settings:

Update your /etc/modprobe.conf
mkinitrd /boot/my_new_initrd-`uname -r`.img `uname -r`

Then update your /etc/grub.conf and update the initrd line..

You can specify an alternate kernel than the one running also. This
is useful if you're rebooting into a new kernel and need to preload
the modules.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Robert Heller 02-08-2011 08:46 PM

mount the wrong device after system recovery
 
At Tue, 8 Feb 2011 16:31:32 -0500 CentOS mailing list <centos@centos.org> wrote:

>
> My grub.conf is pointing to sdb1 for /. I've corrected to use
> /dev/vg0/lv1. But after rebooting, I am getting the same error. I guess
> I need to rebuild initrd.img file. How do I rebuild that file?

The best way to do it *right* is to boot with a rescue system (such as
the installer CD/DVD). You need to make sure it properly mounts the
necessary file systems, specificly /dev/vg0/lv1 as /sysroot, whatever
you are using for /boot to /sysroot/boot (/boot can't be in the LVM
volume group -- grub cannot deal with that!), then make sute /proc,
/sys, and /dev are mount --bind'd to /sysroot/proc, /sysroot/sys, and
/sysroot/dev. Then you will chroot to /sysroot and issue a command like:

mkinitrd -f /boot/initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5

(replace '2.6.18-194.32.1.el5' with the proper kernel version you will
be booting from -- 2.6.18-194.32.1.el5 is the latest CentOS 5.5 kernel).

exit and reboot.

>
> Thanks,
>
> - xinhuan
>
> -----Original Message-----
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
> Behalf Of Robert Heller
> Sent: Tuesday, February 08, 2011 2:59 PM
> To: CentOS mailing list
> Cc: CentOS mailing list
> Subject: Re: [CentOS] mount the wrong device after system recovery
>
> At Tue, 8 Feb 2011 13:51:32 -0500 CentOS mailing list
> <centos@centos.org> wrote:
>
> >
> > Content-Class: urn:content-classes:message
> >
> >
> > Hi,
> >
> >
> >
> > I am recovering a CentOS 5.4 system. I've copied all partitions into
> the
> > recovery system. I've installed grub boot loader. However, the
> original
> > system is using /dev/sdb1 for root (/), while the recovery system is
> > using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I
> got
> > the panic error:
> >
> >
> >
> > * Mounting /dev/sdb1 on /sysroot
> >
> > * Mount: mounting /dev/sdb1 on /sysroot failed: No such file
> or
> > directory
> >
> > * Mount: mounting /dev on /sysroot/dev failed: No such file or
> > directory
> >
> > * * switching / to /sysroot
> >
> > * Switch_root: bad newroot /sysroot
> >
> > * Kernel panic - not syncing: Attempted to kill init!
> >
> >
> >
> > I've changed the recovery system fstab to use the correct devices. I
> > deleted recovery system etc/lvm/cache/.cache file. But it still
> doesn't
> > work. What am I missing?
>
> You need to rebuild the initrd and make sure the grub.conf file is
> up-to-date (has the right thing for the root parameter).
>
> >
> >
> >
> > Thanks,
> >
> >
> >
> > - xinhuan
> >
> > MIME-Version: 1.0
> >
> > _______________________________________________
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
> >
>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Xinhuan Zheng 02-09-2011 02:06 PM

mount the wrong device after system recovery
 
The mkinitrd command worked out. Thanks a lot for your help. :)

- xinhuan

-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
Behalf Of Robert Heller
Sent: Tuesday, February 08, 2011 4:47 PM
To: CentOS mailing list
Cc: CentOS mailing list
Subject: Re: [CentOS] mount the wrong device after system recovery

At Tue, 8 Feb 2011 16:31:32 -0500 CentOS mailing list
<centos@centos.org> wrote:

>
> My grub.conf is pointing to sdb1 for /. I've corrected to use
> /dev/vg0/lv1. But after rebooting, I am getting the same error. I
guess
> I need to rebuild initrd.img file. How do I rebuild that file?

The best way to do it *right* is to boot with a rescue system (such as
the installer CD/DVD). You need to make sure it properly mounts the
necessary file systems, specificly /dev/vg0/lv1 as /sysroot, whatever
you are using for /boot to /sysroot/boot (/boot can't be in the LVM
volume group -- grub cannot deal with that!), then make sute /proc,
/sys, and /dev are mount --bind'd to /sysroot/proc, /sysroot/sys, and
/sysroot/dev. Then you will chroot to /sysroot and issue a command
like:

mkinitrd -f /boot/initrd-2.6.18-194.32.1.el5.img 2.6.18-194.32.1.el5

(replace '2.6.18-194.32.1.el5' with the proper kernel version you will
be booting from -- 2.6.18-194.32.1.el5 is the latest CentOS 5.5 kernel).

exit and reboot.

>
> Thanks,
>
> - xinhuan
>
> -----Original Message-----
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
> Behalf Of Robert Heller
> Sent: Tuesday, February 08, 2011 2:59 PM
> To: CentOS mailing list
> Cc: CentOS mailing list
> Subject: Re: [CentOS] mount the wrong device after system recovery
>
> At Tue, 8 Feb 2011 13:51:32 -0500 CentOS mailing list
> <centos@centos.org> wrote:
>
> >
> > Content-Class: urn:content-classes:message
> >
> >
> > Hi,
> >
> >
> >
> > I am recovering a CentOS 5.4 system. I've copied all partitions into
> the
> > recovery system. I've installed grub boot loader. However, the
> original
> > system is using /dev/sdb1 for root (/), while the recovery system is
> > using LVM (/dev/vg0/lv1) for root (/). When recovery system boots, I
> got
> > the panic error:
> >
> >
> >
> > * Mounting /dev/sdb1 on /sysroot
> >
> > * Mount: mounting /dev/sdb1 on /sysroot failed: No such file
> or
> > directory
> >
> > * Mount: mounting /dev on /sysroot/dev failed: No such file
or
> > directory
> >
> > * * switching / to /sysroot
> >
> > * Switch_root: bad newroot /sysroot
> >
> > * Kernel panic - not syncing: Attempted to kill init!
> >
> >
> >
> > I've changed the recovery system fstab to use the correct devices. I
> > deleted recovery system etc/lvm/cache/.cache file. But it still
> doesn't
> > work. What am I missing?
>
> You need to rebuild the initrd and make sure the grub.conf file is
> up-to-date (has the right thing for the root parameter).
>
> >
> >
> >
> > Thanks,
> >
> >
> >
> > - xinhuan
> >
> > MIME-Version: 1.0
> >
> > _______________________________________________
> > CentOS mailing list
> > CentOS@centos.org
> > http://lists.centos.org/mailman/listinfo/centos
> >
> >
>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 09:47 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.