Koozali.org: home of the SME Server

Problems booting after mirroring from SCSI to IDE

Offline thallanor

  • *
  • 26
  • +0/-0
Problems booting after mirroring from SCSI to IDE
« on: April 18, 2008, 10:05:31 PM »
I took our SME Server offline last night and used a Linux recovery CD to mirror our SME Server installation to a larger hard drive, with the eventual goal of expanding the partition on the new hard drive to provide more storage space.  I then pulled the new drive and put it into a similar PC so that I could bring the old server back up while I tinker.  At the moment though, I am just trying to get the new hard drive to boot properly.  I believe that the problem stems from the fact that the original hard drive was SCSI and that the new one is IDE.

What happens is I get the bootloader screen, and it proceeds to boot.  After a couple pages of text, I get the following:

Loading jbd module
Journalled Block Device driver loaded
Loading ext3 module
Mounting /proc filesystem
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 144k freed
Kernel panic: No init found.  Try passing init= option to kernel.

Now more background about this issue.  This was originally a Mitel 6.x installation at the time of the mirroring of the hard drive.  (The entire procedure was to mirror, expand the partition, then upgrade to 7.x.)  I experienced this exact same problem when it was still 6.x and so I decided to attempt an upgrade to 7.x in hopes that it might be able to fix things.  7.x detected the older installation, though I did have to update fstab to point the swap partition to /dev/hda2 instead of /dev/sda2.  I believe this is in part due to the switch from SCSI to IDE.  Regardless, after this change, the upgrade proceeded.  (Prior to that change, it choked, saying it was unable to find sda2 for the swap partition.)

The first thing that surprised me after the upgrade and reboot is that the old bootloader came up for 6.x and the boot choices were still the old 6.x boot choices.  When I press Enter or let it proceed on its own, it boots just like before, error and all.  So this might be more suitable in the 6.x forum, and if someone thinks it should be moved, just let me know.

Everything that I have been able to find -- plus common sense -- makes me think that things are still looking at /dev/sda3 for the root partition, when I believe it is really at /dev/hda3 now.

I've looked at some grub and LILO settings, but do not know enough about them to be comfortable changing much, and when I actually ran grub, my eyes went crossed.  It is something that I am certain I can learn with time, and will continue to read after I post this.

I am sorry if I am sounding confusing, but I am confused myself.  I consider myself comfortable in Linux and am getting more knowledgable, but am in no way a guru.  I can poke around well though.

I have searched the internet using Google and have searched the contribs.org in particular for this particular issue and while I have found bits and pieces that are similar, nothing is quite close enough and so the particular fixes either do not work or are not applicable to my situation.

If someone is able to assist or offer suggestions, I would love to hear them.

Dennis

Offline thallanor

  • *
  • 26
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #1 on: April 18, 2008, 11:33:39 PM »
I wanted to take a moment to update.

I am no longer confident that my previous idea of sda3 now being hda3 has any bearing on the problem.  To begin with, /boot (hda1, used to be sda1) mounts perfectly.  I believe this is due to the use of labels in fstab instead of devices.  And because hda3 (used to be sda3) still has the correct label, it shouldn't make a difference what it is.

Back to it...

Offline thallanor

  • *
  • 26
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #2 on: April 18, 2008, 11:57:03 PM »
I've performed another fsck, the filesystem is clean so I forced one anyway.  No problems.

What is actually in charge of displaying things like "Mounting root filesystem" and then attempting to mount it?  I thought it might be /etc/rc.d/rc.sysinit though I suppose that is a dumb idea, since that would be part of the root filesystem, which isn't loaded yet.  Unless it's loading in read-only mode first and that's working?  I'm still so lost, but I'm trying hard to learn.  If I could just know what command it is attempting or something, maybe I could figure it out more.

Anyway, back at it again for another 30 minutes before done for the week... won't be able to do much remotely in this state.  Maybe I'll make a breakthrough in the next few minutes!

Offline thallanor

  • *
  • 26
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #3 on: April 19, 2008, 12:05:22 AM »
In retrospect, perhaps there IS more to the hda3 vs. sda3 issue than I thought.  I changed fstab to specifically look at the correct drive and it still does not mount properly.  Furthermore, more research found that mount's error 6 indicates "No such device or address," leading me to once again believe it is not attempting to mount the proper device, perhaps bypassing fstab entirely at this stage.  Again, if I could somehow find the actual script that is in charge of the boot at this stage, perhaps I could find out what it is really trying to do, either by looking specifically, or by echoing variables, and then reverse through the script to find out why it is trying to do what it is.

Argh, frustrating.  But oddly, fun. :)

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #4 on: April 21, 2008, 12:10:21 AM »
I think the procedure to fix this problem is to boot from the CD and select the option to search for and mount the existing filesystem. Then you'll have to chroot into the old system. From there you'll have to update /etc/grub.conf, /etc/fstab - re-install grub (grub-install) and make a new initrd (mkinitrd). If that doesn't work you could try upgrading sme by booting from the CD and try to upgrade the existing smeserver 7.0.
P.S make sure that you have a good backup before playing with any of this.
Lloyd

Offline thallanor

  • *
  • 26
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #5 on: April 21, 2008, 02:43:01 AM »
I think the procedure to fix this problem is to boot from the CD and select the option to search for and mount the existing filesystem. Then you'll have to chroot into the old system. From there you'll have to update /etc/grub.conf, /etc/fstab - re-install grub (grub-install) and make a new initrd (mkinitrd). If that doesn't work you could try upgrading sme by booting from the CD and try to upgrade the existing smeserver 7.0.
P.S make sure that you have a good backup before playing with any of this.
Lloyd
Thanks!  I will give this a try tomorrow.  Fortunately, this is just a mirror of our live server, so if anything falls apart, I just need to wait until after hours and mirror it again.  This looks promising!

Thanks again!

Offline thallanor

  • *
  • 26
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #6 on: April 22, 2008, 12:11:31 AM »
It has been busy at work today but I have had some time to work on this problem.

I had mentioned earlier that I had attempted to upgrade from Mitel Server 6 to SME Server 7 and though it appeared to find the Mitel Server 6 installation and offered me the opportunity to upgrade, it does not appear to have worked.  (It continues to attempt to boot into Mitel Server 6 and then freezes with the previously-described error.)

When booting into Rescue mode on the SME Server 7 CD, it again detects the installation and mounts the old partitions.  The problem is that when I view the mounted file systems, the information in /boot is for SME Server 7.  /etc/grub.conf has the new SME Server entries, not the old Mitel Server ones.

I attempted grub-install but it returned "/dev/<device> does not have any corresponding BIOS drive."  (I first attempted using /dev/hda1 but in frustration, also tried /dev/hda2 (the swap partition), /dev/hda3 (the root partition) and even /dev/hda.)

It has been a rough day, not including this, and so I am going to take a break until tomorrow and see what else I can dig up.  I am new to most of these tools, so it will take some time to learn, but it is fun.  (Something as simple as chroot I didn't know about, and now I do, thanks to you!)

Thanks again for the advice, and I'll see if I can get this resolved tomorrow.

Offline paulsnz

  • *
  • 27
  • +0/-0
Re: Problems booting after mirroring from SCSI to IDE
« Reply #7 on: April 22, 2008, 03:33:50 AM »
I followed this procedure to upgrade from 6.x to 7.x
Basically build a new SME, mount the old 6.x and do a full restore of data/users/sam's etc

Documented here http://forums.contribs.org/index.php?topic=35095.0
Thanks to RayMitchell
I have upgraded several of my sites from 6.x to 7.3 without uninstalling some custom contribs and all have been successful.!

My server had scsi drives as well.  I had built the SME 7.3 on 2 Sata  drives but when I booted from those Sata's with the scsi drives installed. My Sata installed SME, kernel panic'd when it saw the old SME7.3 on one of the scsi's??

After formatting the Scsi SME I booted from the Sata drives without kernel panic .!