LinuxCNC kills my other hard drive

Discussion of linuxCNC (formerly knows as EMC2)
Post Reply
danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

LinuxCNC kills my other hard drive

Post by danimal » Tue Mar 04, 2014 7:29 pm

I am so angry that I cant see straight.

Here is what keeps happening. I installed LinuxCNC on a spare SSD. It works great. I just got SprutCAM for Windows so I want to use windows for all of my part design and CAM generation. I set up a dual boot with the two separate hard drives. The second I boot to the LinuxCNC my HDD containing windows is screwed. It will not boot to windows anymore. I tried using the install disk repair and I get the "windows cannot be repaired" message after 20 minutes of waiting. I tried to restore and every option in the repair menu on the boot disk. No luck. But I can access and see all the files on the hard drive from Ubuntu. I just can not use any of the windows specific software.

My initial thought was that I messed something up while installing LinuxCNC and that it messed up the boot config for the other HDD. So I got another hard drive, did a fresh install of windows 7, Installed all of my programs and updates then I hooked up my old HDD and was able to copy all my documents and everything onto the new drive. Everything was set up perfect with a fresh install. I plug the SSD into the sata port and bam will not boot to windows. It gives me a grub error for a windows drive. I unplugged the SSD, grub error no boot to windows. I am going to try and reset CMOS, but I am not holding out much hope because that did nothing last time. It is looking like LinuxCNC, at least in its current form needs its own stand alone computer.

Any ideas? I have the Windows HDD in Sata 1 with boot priority 1 and the SSD in Sata 2 with boot priority 2. Nothing that normally works for fixing boot errors has worked thus far, so I am open to any and all suggestions including stomping on the LinuxCNC SSD.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: LinuxCNC kills my other hard drive

Post by danimal » Tue Mar 04, 2014 10:07 pm

I took the LinuxCNC SSD out and left only my new HDD. I reset CMOS and as expected it still will not boot. I returned the BIOS settings to their factory configuration and then reset CMOS by pulling the battery and switching the jumper to the reset pin, still nothing. For whatever reason having the two on the same computer will completely mess up your windows install. I am installing windows on my other computer and will leave it at that. What a pain in the ass. Now I get the great fortune of having two full size towers and a controller box to run my shapeoko. Great.

Upon researching the problem I see that it is fairly common. Most people just have LinuxCNC put on a old stand alone computer anyway. I guess that since I have my machine in my man cave where space is a premium it affects me more than the guy with a converted bridgeport in his garage.

I guess I will just leave this up here as a warning. I would recommend making a clone of your HDD prior to installing LinuxCNC just in case. I tried this with three different motherboards and three different hard drives now and I can not figure out how the windows boot is getting messed up. It just works one minute, then you shut down and it never starts back up. Just connecting the hard drive with the LinuxCNC caused the corruption. I did not even try to boot from it the third time. I just plugged it in and restarted with my windows drive set as the first boot position.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Nigel K Tolley
Posts: 226
Joined: Sat Feb 08, 2014 4:06 pm

Re: LinuxCNC kills my other hard drive

Post by Nigel K Tolley » Fri Mar 07, 2014 9:39 am

Interesting.

I've not got a Win7 dual boot, but I have a WinXP triple boot which had a broken windows install, a working XP install and a Linux install.

This is because of a similar issue to you with an SSD. Windows simply will not, no matter what I try, work from the SSD or even if it is just attached. A ghosted drive should work but didn't, even after much tweaking and tinkering.

In the end I ghosted it from the SSD to a regular drive and it booted right up.

So it is likely the SSD rather than the fact it is Linux that is at fault. That I have a £250 SSD sitting unused is a crying shame though. I dare not try and put it in anything!

Sent from my SM-N9005 using Tapatalk

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: LinuxCNC kills my other hard drive

Post by danimal » Fri Mar 07, 2014 10:16 pm

I found out that it is Ubuntu 10.04 fault. It creates the grub boot directory on the primary drive when installing. This patch stops the windows boot sequence so you have to manually go in and re-route the directory. There is a whole section on ubuntu forums dedicated to the issue, but so far 4 of the 10 or so "fixes" have failed to fix the original drives boot loader and mbr. I got all the parts in for my new build so I just gave up for the rest of today.

I could be something to do with the SSD also, because I used to have a dual boot with 10.04 and windows 7 and it worked fine. I guess there is a very specific way that everything needs to be done when installing ubuntu to prevent this issue, but once you have it good luck trying to fix it.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

criznach
Posts: 220
Joined: Sat Dec 14, 2013 5:28 pm
Location: Great Falls, Montana, USA

Re: LinuxCNC kills my other hard drive

Post by criznach » Fri Mar 07, 2014 10:26 pm

I'm not sure if this is still valid with Vista onward, but I know on 2000 and before, if you could get a command prompt from the windows CD, you could do "fdisk /mbr" and that would restore the windows MBR. You could then add an entry in the windows boot configuration for your linux install.

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: LinuxCNC kills my other hard drive

Post by danimal » Mon Mar 10, 2014 3:44 am

criznach wrote:I'm not sure if this is still valid with Vista onward, but I know on 2000 and before, if you could get a command prompt from the windows CD, you could do "fdisk /mbr" and that would restore the windows MBR. You could then add an entry in the windows boot configuration for your linux install.
That is still on there for win7, but it did not work. That is where I started to get a little worried. I ran both, and both seemed to execute just fine, but when I tried to reboot it hung up in the same location with the same problem. I still have to get in there and remove the grub file being that I am no longer going to be using the computer as a dual boot. I think removing the grub file from the windows part of the system and then bootrec.exe /FixMbr as well as bootrec.exe /FixBoot and bootrec.exe /RebuildBcd

I will updated this thread when I find the solution and get it up and running again.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Nigel K Tolley
Posts: 226
Joined: Sat Feb 08, 2014 4:06 pm

Re: LinuxCNC kills my other hard drive

Post by Nigel K Tolley » Mon Mar 10, 2014 3:08 pm

I found the best route was just to edit grub so it points to the Windows path. Gives you future flexibility without worry too, as anything else besides windows will just add a new option to the grub menu.

Sent from my SM-N9005 using Tapatalk

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: LinuxCNC kills my other hard drive

Post by danimal » Sun Mar 16, 2014 4:18 pm

Nigel K Tolley wrote:I found the best route was just to edit grub so it points to the Windows path. Gives you future flexibility without worry too, as anything else besides windows will just add a new option to the grub menu.

Sent from my SM-N9005 using Tapatalk
What did you do to edit grub? I still have not gotten around to fixing my old hard drive but I want to do it this week some time. I saw a thread about configuring it to point at the windows boot file, but I am still a little unsure how to accomplish that.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

unterhausen
Posts: 16
Joined: Fri Jun 15, 2012 1:05 am

Re: LinuxCNC kills my other hard drive

Post by unterhausen » Wed Mar 19, 2014 4:42 am

I've never had any trouble with linux doing this, and I've even installed 10.04 on a dual boot system. In fact, if you install ubuntu second, it should automatically set up grub.conf so that it has an option to boot windows. The file you need to change is /boot/grub/grub.conf In 10.04, you don't have to do anything to get the changes to take effect on the next boot. This was far too simple for the developers of grub, and so is no longer that way in ubuntu 12.04, etc.

danimal
Posts: 332
Joined: Wed Mar 13, 2013 5:53 pm
Location: Colorado

Re: LinuxCNC kills my other hard drive

Post by danimal » Wed Mar 19, 2014 9:33 pm

I have installed 12.04 before on other machines on the same drive and never had a problem. I even had this one running at first as a dual boot, but I could not get the PCI card that I bought to work. So I moved the hard drive containing linuxCNC to another computer and repaired the install when the option came up. Then when I was having problems with that computer (it was just too old and run down) I decided to put it back into the other computer and give the PCI card another shot. That is when the problems started. I still can not boot to windows.

I think if I just get in there and delete the grub file I will be able to run a dual boot from bios being that each hard drive contains its own complete boot file, but I am worried about them corrupting each other. I guess I will just have to give it a go one of these days when I have a little time.
Shapeoko # 1458

RT0701C Spindle || dual y motor || x axis nema23 with custom carriage 1000mm length || z axis nema23 linear rail upgrade with 1/2-10 ACME

Post Reply