Koozali.org: home of the SME Server

[SOLVED] Can't boot to SME, only get Grub

Offline uniqsys

  • *
  • 133
  • +0/-0
[SOLVED] Can't boot to SME, only get Grub
« on: February 27, 2016, 10:42:11 PM »
Hi all!

My server CMOS battery died.  So after changing to a fresh battery, setting the CMOS properly, and attempting a bootup all I get is a grub prompt.  I tried an SME 8.0 rescue, it sees the hard drives and mounts a sysimage OK.  When rebooting again I get back to the grub prompt only.  Any ideas on fixing this without a complete system reinstall?  BTW, grub.conf is missing in the sysimage /etc directory.  Is that what is wrong?  Please help if you can.  Thanks.

PS The server is set to SME 8.2 and I am getting an updated SME 8.2 ISO now.  i386 32bit architecture
« Last Edit: March 02, 2016, 02:23:23 PM by uniqsys »
...

Offline mistere

  • 7
  • +0/-0
Re: Can't boot to SME, only get Grub
« Reply #1 on: February 28, 2016, 04:17:40 AM »
Hi there uniqsys - I think we got disconnected earlier :-(

I'd do two things:

1. Use a recovery or live Linux boot disk to examine the existing partitions and assure yourself that they are okay.
(mount and read them, use fdisk -l to view partition details.)
2. Using grub confirm that the boot info is good.  I'm sketchy on this as I've only done it once or twice since grub
replace LILO - and that *has* been a while!

Good luck!

Offline craig

  • 10
  • +0/-0
Re: Can't boot to SME, only get Grub
« Reply #2 on: February 28, 2016, 12:23:05 PM »
Hi uniqsys,

I'm not sure if you are using software RAID, but if you are it might be worth checking the boot device. Obviously it should boot from either, but I've had situations where it would only boot from one of the two hard drives on older grub versions, and after a BIOS reset I've had similar things happen.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Can't boot to SME, only get Grub
« Reply #3 on: February 28, 2016, 12:25:42 PM »
uniqsys

BIOS reset to default can lead to an unbootable server.. you'd restore all the settings as their right values

were you using onboard raid? I hope no

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Can't boot to SME, only get Grub
« Reply #4 on: February 28, 2016, 07:07:14 PM »
My server CMOS battery died.  So after changing to a fresh battery, setting the CMOS properly, and attempting a bootup all I get is a grub prompt.

My guess is that you have a geometry mismatch between how the BIOS detects your drive, and what is set up in the partition table.

Check that LBA is activated in your BIOS.

Pay strict attention to exactly how grub is failing, and read grub documentation.

Offline uniqsys

  • *
  • 133
  • +0/-0
Re: Can't boot to SME, only get Grub
« Reply #5 on: February 28, 2016, 11:21:22 PM »
Thanks Everyone for your advice.  it really helped especially when one is catatonic at the potential loss of a server (backup not withstanding).

Mistere helped by having me verify that the hard drives could be read.  They could.  Fdisk showed that they were active.  Charlie lead me to check the LBA in the BIOS which was active.  Stefano helped by forcing me to check ALL the settings.  Fortunately I had an absolute duplicate server that would boot.  All were identical.  Craig lead me to believe in one of the drives which I did.  I am running SATA drives and found that md1 on SATA1 failed to boot and gave me grub.  SATA2 could boot to md1 to get the SME kernel selection screen but cycled into reboot when a selection was made.  So I reversed the SATA order, making old SATA1 now SATA2 and vice versa and the system booted to normal SME server service.

cat /proc/mdstat now shows an out of sync system as expected (showing only one hard drive) md1: active raid1 hda1[1] 104320 blocks [2/1] [_U] and md2: active raid1 hda2[1] 156183808 blocks [2/1 [_U].
Fdisk -l shows "Disk /dev/dm-0 doesn't contain a valid partition table".

So now my job is to find out how to re-establish the partition table in the lost drive and re-sync the drives.
Again. Thanks so much you really helped.
...

Offline craig

  • 10
  • +0/-0
Re: Can't boot to SME, only get Grub
« Reply #6 on: February 29, 2016, 12:24:34 AM »
Pleased things are going better now. Obviously it's prudent to take appropriate backups before dabbling with partition tables.

When I've lost sync on software raid (albeit with SATA /dev/sdx drives rather than /dev/hdx) it's usually been as easy as adding the other disk back in. Assuming your other drive is hdb (and hda is the successful mount), then it should be as simple as adding the drive again, I guess something like:

mdadm --manage /dev/md1 --add /dev/hdb1

and

mdadm --manage /dev/md2 --add /dev/hdb2

If, as you suspect, the partition table has issues then I'm a bit out of practice on the best use for your case but I've used:

sfdisk -d /dev/hda | sfdisk /dev/hdb

to copy them before. If it was a clean setup starting with one known good disk and a simple add of another then I'd obviously use the built in SME Server tools.

guest22

Re: Can't boot to SME, only get Grub
« Reply #7 on: March 02, 2016, 02:02:21 PM »
Please add [Solved] in front of the subject.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Can't boot to SME, only get Grub
« Reply #8 on: March 05, 2016, 12:47:21 AM »
So now my job is to find out how to re-establish the partition table in the lost drive and re-sync the drives.

Did you actually figure out those issues?