Koozali.org: home of the SME Server

New install keeps going to grub 9.1

Offline steve288

  • *
  • 336
  • +0/-0
New install keeps going to grub 9.1
« on: May 05, 2016, 08:11:52 PM »
I'm not a knowledgeable grub user.

I had a system that had an older version of SME on it. maybe 8.1 not sure.

Anyway I downloaded 9.1 and installed it. It installed fine. But it never asks to install a password or any other setup items. And oddly it had the same name as the previous system that was installed. I kept trying to install it saying delete everything. But it seemed to keep installing a system with a name previously installed on this comptuer.

So then I thought I will just delete the partitions. So I delete the partitions using some disk utilities.
Re-install. Now when it boots up I get a grub screen.

I tried a number of things found on the SME site to get grub going again. But some of the commands didnt seem work.
eg.

grub
root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd

setup (hd0)

If these are commands they dont seem to work in the grub window that I have.

then I tried ..
Fix the GRUB with the official SME Server CDROM
And while the instructions are a little different with 9.1, I did follow it but, still no luck it keeps booting into Grug.

I then thought well lets just delete grub all together, first I tried to re write the mbr with a utility, which didnt seem to work, and then followed the steps to remove grub completely from here.
https://sites.google.com/site/easylinuxtipsproject/grub using UBCD method.

then reinstalled the SME 9.1. Hopeing that grub would be reinstalled properly. But now when I reboot I get the exact same screen Gnu Grub version 0.97 etc.

Can someone point me to the right solution to resolve this.
Im using a system with two drives that I would like mirrored.

I assume that everything is installed properly, just grub is not working right for me.
Thanks.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #1 on: May 05, 2016, 11:16:01 PM »
steve288
If you ever reuse a drive you must clear the MBR first
See
https://wiki.contribs.org/Raid#Reusing_Hard_Drives
& for you (if the drive is sda) then this command would be

dd if=/dev/zero of=/dev/sda bs=512 count=1

Then reboot so that the empty partition table gets read correctly.

Then reinstall from CD/DVD
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline ReetP

  • *
  • 3,950
  • +6/-0
Re: New install keeps going to grub 9.1
« Reply #2 on: May 06, 2016, 02:09:41 PM »
If the OP has two drives then he probably needs to clear both MBRs
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #3 on: May 06, 2016, 04:26:24 PM »
Thank you for your answers.
I have booted from the cd and then gone to tools and then worked my way through the "Rescue an installed system" until I get a nice console prompt.

I first typed
dd if=/dev/zero of=/dev/sda bs=512 count=1

I then rebooted and installed again. It seemed to install perfectly. But upon reboot, again I get the grub terminal window.
I then went back to this post and saw that someone else had posted that I needed to run the command for the other drive too. Since I am running raid.
So I went through the process again, running the command twice, one on /dev/sda and then on /dev/sdb
I reinstalled and sadly Im back to the same grub terminal window.
It did not work again.

Can anyone provide and further help on this problem?
Thank you.

Offline byte

  • *
  • 2,183
  • +2/-0
Re: New install keeps going to grub 9.1
« Reply #4 on: May 06, 2016, 04:54:34 PM »
Just to confirm are you for sure using SATA drives?  Not using IDE drives by any chance...I would think not in this day and age :)

Also, are you using hardware RAID or letting the SME Server take care of the RAID?

If you don't care about what is on the drives you could download GPART and run the live CD mode and remove all partition tables etc in the GPART GUI interface.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #5 on: May 06, 2016, 05:25:38 PM »
Yes Sata drives.
Here is a picture of the lsblk command.
In my first post I ran the program to remove grub. But didnt seem to work. I also removed partitions.
I will however see if I have gparted to see if that program is better.
I give grub full credit. I guess its good that its hard to remove.

Any further advise will be helpful.
« Last Edit: May 06, 2016, 05:38:42 PM by steve288 »

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #6 on: May 06, 2016, 09:05:44 PM »
Well I downloaded the latest gparted.
Deleted the partition. Wrote ntfs on it and then deleted again. Then I think wrote ntfs on it again.
Rebooted without install cd and it still booted into grub.

Then I disconnected each drive. (gparted didnt seem to see the second drive) So I Ran Gparted on each of the two drives separately. Wrote NTFS on to the drives separately.
Reconnected up. Ran install (the install automatically version.)
Now when it finishes installing. I reboot as it asks me to at the end of the install, and now it boots to nothing.
Eg. blinking prompt.

I certainly removed the grub, but now the linux does not seem to want to write it.
Grrr.

Please advise. (it is Friday and will not be able to look at this till Monday.) But advice is always welcome.
Thank you.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #7 on: May 07, 2016, 01:56:07 AM »
steve288
Quote
Wrote ntfs on it and then deleted again. Then I think wrote ntfs on it again.arately...... Wrote NTFS on to the drives separately

Stop writing NTFS partitions, Linux does not support those.
The installer will format the disks & write a file system on them.

I suggest you connect each drive one by one to a working sme server & run the dd command given previously adjusting the command to suit the drive location ie maybe sdb ?
After running each dd command & with the extra drive still connected, reboot your server & then power down.

Then connect both drives in your new server.
Boot up to the CD/DVD/USB media & run the SME server install selecting RAID1.

It should just work.

An old reliable tool I use is delpart.exe, free download.
Put it on a boot media CD/USB, start/boot up to the media & then run delpart.exe from the command prompt & delete partitions on both drives.
Restart, then shutdown, then follow procedure for new install as above.
Do not create any partitions or add file systems or format the drives, the SME server installer will do that.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #8 on: May 07, 2016, 11:43:36 AM »
Thank you for your response. I agree it should just work.

Just to explain myself, the reason for writing ntfs on the drives is because this is similar to say installing xp on the drives. This in the past is also a way of getting grub off and Linux SHOULD recognize that it is not say ext2, and change the boot loader and the file system to what it wants. One of the best ways I know of resolving this in the past is just install something else on the disk. I did try, xp and server 2012 I get blue screen. However I KNOW that this computer supports older version (8.1) of SME cause I had it installed on this CPU and another many miles away in production.

I believe that deleting the partitions simply deletes the partition pointers to the partition table. It doesn't erase the boot code (that is part of the whole mbr) I'm not clear in gparted how to delete the mbr, that's again why I'm trying to write something different on the disk.

As you have pointed out the dd method is the tried and true method for doing this.
Unfortunately I don't have another system local to connect up the drives and run dd again. I will see if I have a Live Linux cd to use. Or try the Linux rescue again, to get a boot prompt, may be do this separately on each drive. Barring any newer suggestions.
I think its just perseverance, trial and error.  Its surprising but not unexpected that a 10 minute project takes days and days to resolved. Monty Python: "Figures. Predictable, really I suppose. It was an act of purest optimism to have posed the question in the first place."
« Last Edit: May 07, 2016, 11:45:43 AM by steve288 »

Offline ReetP

  • *
  • 3,950
  • +6/-0
Re: New install keeps going to grub 9.1
« Reply #9 on: May 07, 2016, 12:08:05 PM »
Are you using software RAID ?

If so then as per Janet above you really should JUST need to connect each drive in turn and run the dd command. That will erase the MBR without which the system cannot 'see' any other data on the drive.

Do one at a time, and you know that they are then clean.

Try to boot each drive afterwards to make sure that grub does not appear so we know it has gone completely.

Once done, connect them both up and run the SME install.

It should 'just work' then, though I am surprised it hasn't before and it makes me wonder if there is something else we are not aware of - do you have any other drives or anything else plugged in ?

...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: New install keeps going to grub 9.1
« Reply #10 on: May 07, 2016, 12:15:55 PM »
sorry for te silly question but: are you installing from an USB key?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #11 on: May 07, 2016, 02:47:40 PM »
steve288

Just try the delpart.exe method.
Create a boot USB memory stick or CD, it should work OK also.
I have done this many many times.

The time it takes will be far less than the time you have wasted already.
I am sure you are doing an "operator error" by trying to do more than necessary & not following instructions carefully enough.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #12 on: May 08, 2016, 12:14:34 PM »
Yes Im sure its there is something I'm simply missing.
Yes Software raid.
I will get back on Monday with my results.
Regards

Offline steve288

  • *
  • 336
  • +0/-0
Re: New install keeps going to grub 9.1
« Reply #13 on: May 09, 2016, 08:35:49 PM »
I have resolved the problem.
First thing I did was I disconnected one of the drives and then decided to try a boot just for fun.
Well, it booted up nicely and then went through the install process, wow.

I then connected the second drive back and tried booting and it did not boot at all.

Then I disconnected the good drive, and connected the failing drive.

And booted a windows Microsoft repair CD and clicked on an option to repair the MBR.
Then I put the other drive back, (the working boot drive) and the drive with the new windows mbr.
It booted up nicely.

I Went into the Admin screen choose raid, and it saw a foreign drive, (my second drive) I Choose it to make a raid 1, click and a way you go. Worked fine.

The bootstraps must have been messed up enough that it just would not work.
Thanks for all the advice.