Hmm, maybe this is too late, but couldn't you have booted off a bootable disk and the mounted your partitions and then chrooted to that and then try to rebuild your initdrd using mkinitrd? <br><br>+selven<br><br><div class="gmail_quote">
On Thu, Jun 28, 2012 at 4:56 AM, Sebastien <span dir="ltr"><<a href="mailto:david20@intnet.mu" target="_blank">david20@intnet.mu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Thanks for your input. It was a bad initrd but there no way to boot off the<br>
OS. I had to reload at the end.<br>
<br>
Better to use VPS based kvm next time. At least I wll be able to boot on<br>
knoppix or custom recovery when the OS crashed.<br>
<br>
Thanks<br>
<br>
Seb<br>
<div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a><br>
[mailto:<a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a>] On Behalf Of Keshwarsingh Nadan<br>
Sent: Wednesday, June 27, 2012 8:40 PM<br>
To: 'LUGM Discuss Mailing List'<br>
Subject: Re: [<a href="http://lugm.org" target="_blank">lugm.org</a>] scan disk on linux system.<br>
<br>
Hello,<br>
<br>
Assuming the virtual hard drive isn't having a problem (and it may very well<br>
be) the issue you're seeing is a bad initrd, the kernel is almost certainly<br>
going to need a new initrd.<br>
<br>
You may be able to get into a repair shell using 'rdshell' kernel argument,<br>
but only if this is a newer version of CentOS (6 is when that came in? I<br>
think?) If you can get into rdshell then you can manually mount the LVM and<br>
get a working root filesystem.<br>
<br>
Easiest way is if the 'rdshell' kernel option gives you a dracut repair<br>
shell when it fails to mount the LVM. Try another boot and when Grub comes<br>
up edit your kernel options to add that at the end, then proceed with<br>
booting. When the mounting fails, you should drop into a repair shell rather<br>
than a kernel panic. If you get into dracut's repair shell, then your google<br>
fodder is 'manually mount LVM'. If you get the file system mounted<br>
successfully you're golden, as at that point you can build a new initrd to<br>
replace the failing, reboot, and you're done. (Google fodder mkinitrd)<br>
<br>
lvm vgscan -v<br>
lvm vgchange -a y<br>
lvm lvs -all<br>
mount /dev/volumegroup/logicalvolume /mountpoint<br>
<br>
Second option would be to boot the VM from a LiveCD or DVD image, preferably<br>
one that is very close (in CentOS versions and kernel versions) to your VM<br>
image's OS - then mount the filesystem, chroot to it and rebuild your<br>
initrd. Google fodder for that process is 'bad initrd'.<br>
<br>
The last option (and not guaranteed to work first try) if you have another<br>
virtual image of an operable VM. Go back to that operable VM and make a new<br>
initrd there. Then boot the non-operable VM using a LiveCD boot disk, mount<br>
the LVM drive, and copy the new initrd to the VM's /boot directory.<br>
<br>
The new initrd must incorporate the kernel modules needed to function on the<br>
non-operable VM, so it isn't as simple as just running mkinitrd on the<br>
operable VM - you first need to make certain all the modules needed for the<br>
virtual hardware are in your non-operable VM's config or you'll run into the<br>
exact same problem you're having now.<br>
<br>
Regards,<br>
kn<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a><br>
[mailto:<a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a>] On Behalf Of Ajay R Ramjatan<br>
Sent: Wednesday, June 27, 2012 6:14 PM<br>
To: LUGM Discuss Mailing List<br>
Subject: Re: [<a href="http://lugm.org" target="_blank">lugm.org</a>] scan disk on linux system.<br>
<br>
Hi there,<br>
<br>
Sorry to hear about your distress. If you have an IP-KVM, please use this to<br>
boot with a boot-cd (ask your datacenter for help) and rescue your system.<br>
If not, ask the datacenter to do it for you and give them precise<br>
instructions on what you want done. E.g., do you want a rescue or a<br>
completely new install? Do you want to preserve data on certain devices such<br>
as /home?<br>
<br>
Now is the time you will be testing how good your backup mechanism is<br>
assuming something ReallyBad(TM) happened. I wish you can solve your problem<br>
with just a simple reboot and fsck with the help of your datacenter tech<br>
guys.<br>
<br>
Let us know how it works out!<br>
<br>
On Wed, Jun 27, 2012 at 5:12 PM, Sebastien <<a href="mailto:david20@intnet.mu">david20@intnet.mu</a>> wrote:<br>
><br>
> Of course the lazy option is to reload. . .I am just curious on this one.<br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a><br>
> [mailto:<a href="mailto:discuss-bounces@discuss.lugm.org">discuss-bounces@discuss.lugm.org</a>] On Behalf Of Chris Wilson<br>
> Sent: Wednesday, June 27, 2012 4:01 PM<br>
> To: LUGM Discuss Mailing List<br>
> Subject: Re: [<a href="http://lugm.org" target="_blank">lugm.org</a>] scan disk on linux system.<br>
><br>
> Hi Sebastien,<br>
><br>
> On Wed, 27 Jun 2012, Sebastien wrote:<br>
><br>
>> I was working on a remote system installing cpanel and stuff like<br>
>> that. I run scandisk while the file system was mounted.<br>
>><br>
>> Now the system is not able to boot. Getting kernel panic at boot.<br>
>><br>
>> I am a bit lazy to reconfigured the server again. I am using Xen and<br>
> centos.<br>
>> Any ideas what can be done?<br>
><br>
> You're a bit lazy in providing details about the problem too. Maybe if<br>
> you imagine the problem really hard, we might be able to psychically<br>
> determine what it is and fix it for you using telekinesis.<br>
><br>
> If you're as lazy as you say, then reinstalling will be easier than<br>
> recovering the server, which sounds like it might be seriously hard<br>
> work, depending on how many "errors" you "fixed" in fsck. By the way,<br>
> if you really ran scandisk and not fsck against the filesystem, you<br>
> might as well give up now.<br>
><br>
> If you're as lazy as you say, you might find that having good backups<br>
> helps you to get away with it.<br>
><br>
> Cheers, Chris.<br>
> --<br>
> Aptivate | <a href="http://www.aptivate.org" target="_blank">http://www.aptivate.org</a> | Phone: <a href="tel:%2B44%201223%20967%20838" value="+441223967838">+44 1223 967 838</a> Future<br>
> Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK<br>
><br>
> Aptivate is a not-for-profit company registered in England and Wales<br>
> with company number 04980791.<br>
><br>
><br>
> __________________________________________________________<br>
> Linux User Group of Mauritius (LUGM) Discuss mailing list<br>
> Website: <a href="http://lugm.org" target="_blank">http://lugm.org</a><br>
> Mailing list archive:<br>
> <a href="http://discuss.lugm.org/pipermail/discuss_lugm.org/" target="_blank">http://discuss.lugm.org/pipermail/discuss_lugm.org/</a><br>
> Forum: <a href="http://lugm.org/forum/" target="_blank">http://lugm.org/forum/</a><br>
> IRC: #<a href="http://linux.mu" target="_blank">linux.mu</a> on Freenode<br>
><br>
><br>
> __________________________________________________________<br>
> Linux User Group of Mauritius (LUGM) Discuss mailing list<br>
> Website: <a href="http://lugm.org" target="_blank">http://lugm.org</a><br>
> Mailing list archive:<br>
> <a href="http://discuss.lugm.org/pipermail/discuss_lugm.org/" target="_blank">http://discuss.lugm.org/pipermail/discuss_lugm.org/</a><br>
> Forum: <a href="http://lugm.org/forum/" target="_blank">http://lugm.org/forum/</a><br>
> IRC: #<a href="http://linux.mu" target="_blank">linux.mu</a> on Freenode<br>
<br>
__________________________________________________________<br>
Linux User Group of Mauritius (LUGM) Discuss mailing list<br>
Website: <a href="http://lugm.org" target="_blank">http://lugm.org</a><br>
Mailing list archive: <a href="http://discuss.lugm.org/pipermail/discuss_lugm.org/" target="_blank">http://discuss.lugm.org/pipermail/discuss_lugm.org/</a><br>
Forum: <a href="http://lugm.org/forum/" target="_blank">http://lugm.org/forum/</a><br>
IRC: #<a href="http://linux.mu" target="_blank">linux.mu</a> on Freenode<br>
<br>
<br>
__________________________________________________________<br>
Linux User Group of Mauritius (LUGM) Discuss mailing list<br>
Website: <a href="http://lugm.org" target="_blank">http://lugm.org</a><br>
Mailing list archive: <a href="http://discuss.lugm.org/pipermail/discuss_lugm.org/" target="_blank">http://discuss.lugm.org/pipermail/discuss_lugm.org/</a><br>
Forum: <a href="http://lugm.org/forum/" target="_blank">http://lugm.org/forum/</a><br>
IRC: #<a href="http://linux.mu" target="_blank">linux.mu</a> on Freenode<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div style="margin:0in 0in 0pt"><b><span style="color:#262626;font-size:10pt" lang="EN-GB">Pirabarlen Cheenaramen </span></b><span style="color:#262626;font-size:10pt" lang="EN-GB">| $3|v3n<b> </b></span></div>

<div style="margin:0in 0in 0pt"><font color="#404040"><span style="font-size:11px"><span lang="EN-GB"></span>L'escalier</span></font></div>
<p style="margin:0in 0in 0pt"><span style="color:#404040;font-size:8pt" lang="EN-GB">mobile: +230 49 24 918</span></p>
<div style="margin:0in 0in 0pt"><span style="color:#1f497d;font-size:8pt" lang="EN-GB">email: <a href="mailto:pcthegreat@gmail.com" target="_blank">pcthegreat@gmail.com</a> || <a href="mailto:god@hackers.mu" target="_blank">god@hackers.mu</a></span></div>

<div style="margin:0in 0in 0pt"><span style="color:#1f497d;font-size:8pt" lang="EN-GB">contact: <a href="http://godifiy.me/" target="_blank">http://godifiy.me</a></span></div>
<div style="margin:0in 0in 0pt"><span style="color:rgb(31,73,125);font-size:11px">/*memory is like prison*/ (user==selven)?free(user):user=malloc(sizeof(brain));</span></div>
<div style="margin:0in 0in 0pt"><span style="color:#1f497d;font-size:8pt" lang="EN-GB"></span><span style="font-family:Webdings;color:#336600;font-size:8pt" lang="EN-GB">P </span><span style="color:#336600;font-size:8pt" lang="EN-GB">Save electricity & disk space. Cat this mail to >/dev/null 2>&1 after use.<br>
</span><span style="color:#1f497d;font-size:8pt" lang="EN-GB"></span></div><br>