Repair grub every morning

n_spect_r

New Member
Joined
Feb 1, 2019
Messages
13
Reaction score
0
Credits
57
I have been running Windows 7 and Linux CNC as dual boot for about 5 years. For the past month, nearly every morning when I try to start the computer I have to run disk repair and reinstall grub. I assume that something is messing with Grub from new software.
 


After reinstalling grub try using grub-customizer on it. This will turn grub into a set of scripts that not every software can read or change and reboot to see what happens.
Also, the default Windows 7 installer is known to do that to grub. If the above doesn't work, download Windows 7 Generation2 release from torrent, install it and activate it with your code. The Generation2 releases use the installer of Windows 10 which doesn't mess with grub BUT only!!! if Windows 7 is installed on a different disk. If both Linux and Windows are on the same storage device, Windows will always screw up grub.
 
Thanks for the quick response, both systems are on the same disk. Is there a way to move LinuxCNC to a partition on a second drive I'd like to try that.
 
Sure there is. Clonezilla Live has that option - to copy disk to disk or partition to disk, or partition to partition - you just have to read the options very carefully. Remember!!! after copying Linux to the new partition, you gotta update grub to boot from the new partition and you gotta format the old partition, so that you end up with just one Linux on the new partition.
 
As I'm thinking this through a bit more. If I'm adding a different drive, why do I need dual boot? I can select the boot device at startup? How difficult is it to remove grub and fix the windows loader? Then I could just install Linuxcnc on the second drive. (if it weren't for the fact that my company uses some software that requires windows, I'd get rid of it).
 
Until recently a friend of mine thought the same too - that the software his company requires Windows and I proved him wrong. If it's not a secret, what is the software?
As for the other thing, if this is a company laptop (not personal), it's probably better if you keep it Windows and run Linux from a flash drive attached to it.
 
It is a company computer and there are several programs. Pro_E, Solid Works, Featurecam, and Griffo Brothers. Three of these programs use a server maintained shared license.
 
G'day @n_spect_r :)

Is the CNC installed on a particular Linux Distribution, and if so, which one, down to version number and DE (Desktop Environment).

Cheers

Chris Turner
wizardfromoz
 
LinuxCNC 2.6.32 on Ubuntu 10.04 LTS. It's a Dell desktop, Intel i5-2400 at 3.1ghz, 8gb ram, 64 bit. I have 2 machines running LinuxCNC, one is on the same 10.04, it's an old Bridgeport mill that I retrofitted. The other is using the latest 2.8 version on an engraver table I put together last December. The 10.04 machine is working so I have no reason to fix things which are not broken. I initially installed on the work computer to do simulations and check G codes. Since then I did another virtual box install and don't use the second boot part often. If there is a way to simply remove it and get the original windows loader to work? I'd do that. I hate windows.
 
If there is a way to simply remove it and get the original windows loader to work? I'd do that.

As @rado84 suggested, Clonezilla (or other cloning/backup tool) would be a good idea before making changes to your bootloader! You may want to preserve a copy of Windows, or Linux, or both.

If you have an original Windows 7 installation DVD, or if your Dell offers to "Boot into recovery" when starting (assuming you have not deleted the recovery partition).... then you can access the Windows Recovery Environment with a Command Prompt to easily restore the Windows bootloader. Details from Microsoft can be read here. The commands you would use are:
Code:
bootrec /fixmbr
bootrec /fixboot

After restoring the Windows bootloader, you can safely delete your Linux partitions and rejoin them to the Windows partition, or format them for other storage. Windows won't be able to read or use them with the Linux filesystem.

Cheers
 
Clonezilla is pretty awesome. Booted to a flash drive and cloned all partitions. I'll keep the back up drive and play with this later, maybe Saturday. As I'm doing more of this and always curious, my thought today is if I clone the Ubuntu Linuxcnc partition to a blank drive, then install that drive and boot up with boot repair, could I install Grub to launch Ubuntu?
 
As @rado84 suggested, Clonezilla (or other cloning/backup tool)
Actually, what I suggested wasn't to make backups, altough I agree it's a good idea to do that first. What I suggested was to use Clonezilla's abilities to copy partition to partition in order to move either one of the two op. systems to another partition on another device thus avoiding the bootloader being broken by Windows. But in his case I don't think there would be a problem - he would have to rebuild grub anyway, after moving one OS to another partition. That's the main reason I install grub inside the file system on Debian-based distros - portability, removing the need to rebuild grub if I have to move the OS to another location.
 


Latest posts

Top