LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Linux 12.04 fails to boot after moving the hard drive whilst powered on (https://www.linuxquestions.org/questions/linux-desktop-74/linux-12-04-fails-to-boot-after-moving-the-hard-drive-whilst-powered-on-4175471856/)

Tavlos 08-02-2013 08:20 AM

Linux 12.04 fails to boot after moving the hard drive whilst powered on
 
Hi, first post - shall try to be as descriptive and concise as possible.

I run a desktop that has the option to boot into 4 different OS from grub, Linux 12.04 64x LTS, 12.10 32x, Win7 64x, and Win7 32x. Specs intel i3 processor, 12GiB RAM, 2x 1TB HDDs, 1x 500GB HDD.

I recently installed a new hard drive into the computer (2nd 1TB drive). I was logged into Linux 12.04 64x LTS at the time and the computer got knocked. The drive (which was only partially installed as I was collecting data from it) fell onto the other cables - I think partially dislodging them temporarily - and the screen went multiple colours.

I turned the computer off immediately, checked all the cables and secured them again then switched the computer back on. It loaded into Grub no problem, but when I went to start the 12.04 LTS operating system it hangs on a black screen instead of taking me to the log in page.

The other operating linux operating system runs fine (I'm currently using it to write this post) and I've checked some of the files on the hard drive - they all seem to be fine as well so I don't think the HDD was damaged physically.

Therefore, I think the problem is in the startup files for the OS. Is there a way to recover/repair this without uninstalling and reinstalling Linux? I really don't want to lose all the programs I've downloaded onto the system if at all possible.

Cheers,
Andrew

Tavlos 08-02-2013 08:39 AM

Ok, Update to this - I found that after rebooting a few times and loading each of the other operating systems in turn it started up fine. I'm not sure what went wrong and I'm not sure how it was fixed - if anyone could shed any light on what just happened I'd be very grateful!

jefro 08-02-2013 05:56 PM

I'd look at booting to a live cd or single user mode to test the filesystem. It may be an issue with how grub looks at it if you changed the order somehow.

jailbait 08-02-2013 10:40 PM

"Is there a way to recover/repair this without uninstalling and reinstalling Linux?"

It sounds to me like GRUB was messed up somehow. I suggest that you go into your BIOS and check the boot order. Be sure that the hard drive that is first in the boot order is the hard drive where you installed GRUB.

If the correct hard drive is first in the boot order then GRUB got knocked off the Master Boot Record somehow. If this is the case then use a rescue CD to boot into the linux partition which installed GRUB and run the grub-mkconfig and grub-install commands to put the current OS configuration in GRUB on the correct MBR.

-----------------------
Steve Stites

jailbait 08-02-2013 10:49 PM

"I found that after rebooting a few times and loading each of the other operating systems in turn it started up fine. I'm not sure what went wrong and I'm not sure how it was fixed"

GRUB uses relative device addressing. I am inclined to agree with Jefro's idea that when you worked with the cables the relative order of the hard drives got changed to cause GRUB problems and then later the relative order got changed again to something GRUB recognized.

-----------------------
Steve Stites

Tavlos 08-07-2013 07:37 AM

Thanks for your replies guys - I've been meaning to re-install grub for a while since I need to adjust the partition sizes on the hard drive it's installed on. It seems to be working fine and I've not had any more problems with it. Time to read about GRUB I think!

All the best,
Andrew


All times are GMT -5. The time now is 04:52 AM.