LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   Booting After Moving Hard Drive To Another Computer (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/booting-after-moving-hard-drive-to-another-computer-4175522120/)

Jayson Wonder 10-14-2014 02:11 PM

Booting After Moving Hard Drive To Another Computer
 
Hello All,

I am trying to solve an issue with my Kali Linux system. I had to remove my hard drive from one netbook to another, they are very similar in models and hardware should be the same to my knowledge. My system is now getting a hung on boot. Grub seems to be loading the image but it just hangs with a flashing "-".

I think this may be a driver problem? Can anyone recommend who to resolve this? I cannot bot but I can get into grub interface and I could boot from an old Xubunto live USB. Any suggestions would be appreciated.

Thanks,

jefro 10-14-2014 04:11 PM

If you can get into grub then you may be able to get it to find out where kali.

Why just just reload? Kali is really not a newbie distro, may not be fully secure.

yancek 10-14-2014 04:52 PM

That's not much information to go on. Do you have a Live CD/flash drive of any Linux system? If you do, go to the 'bootinfoscript' site (jsut google it) and download and run the script and post the output, a results.txt file. Instructions are in a link in the Description box on their page.

Did the old notebook have only the one drive? Same for the new notebook? Do you see a Grub boot menu at all?

Jayson Wonder 10-14-2014 05:16 PM

Quote:

Originally Posted by yancek (Post 5253818)
That's not much information to go on. Do you have a Live CD/flash drive of any Linux system? If you do, go to the 'bootinfoscript' site (jsut google it) and download and run the script and post the output, a results.txt file. Instructions are in a link in the Description box on their page.

Did the old notebook have only the one drive? Same for the new notebook? Do you see a Grub boot menu at all?


Yes I see grub and I can get in to the grub command line. I see my partitions and the image etc. I think it hangs because of maybe drivers or something. Both netbooks had a bay for only 1 drive. I have a live USB flash drive as mentioned. Ill try the bootinfoscript

jefro 10-15-2014 03:44 PM

I'd think that some reference has changed in grub or in locations in distro.

Shadow_7 10-15-2014 07:49 PM

You should use labels or UUIDs in the grub.cfg and /etc/fstab config files. The /dev/ names can be unpredictable on some hardware. The symptoms seem to suggest this is what's happening. That should be the only thing that you need to change to be able to boot it, as long as there's no chipset quirks. As in 32bit vs. 64bit or non-pae kernel needs.

EDDY1 10-16-2014 04:33 PM

If you moved hdd from 1 machine to anotherI would say it's a case of not having the correct graphics driver.
You can boot to recovery mode via "Advanced Options" at grub menu to see what graphics you have.

Jayson Wonder 10-16-2014 07:36 PM

Well all of this advice seem really helpful. So far I have entered grub command prompt. I tried to run update-grub but had no success. It say is is an unknown command. I also looked at the grub config file but it says I should not edit this file and there are scripts to do this with.

Is there an better approach to get grub to update and recognize the drive for booting.

I actually think it is a video driver issue is possible. What is the safest way to boot up using generic video driver at boot.

Just an reminder, I only have access to grub command prompt. I do have a USB stick that I can use to boot into a live session.

I am finding various information on the web but I am not sure the safest way as I do not want to loose the install totally.

Thanks,

Jayson Wonder 10-16-2014 07:43 PM

Quote:

Originally Posted by EDDY1 (Post 5254821)
If you moved hdd from 1 machine to anotherI would say it's a case of not having the correct graphics driver.
You can boot to recovery mode via "Advanced Options" at grub menu to see what graphics you have.

What exactly an I looking for? I went in to grub and edit mode and I can only see load_video. Should I disable this?

Shadow_7 10-16-2014 11:21 PM

Boot the live system. Mount the device. Get the details on the partion(s) with blkid. Change the (mount point)/boot/grub/grub.cfg and change the (mount point)/etc/fstab on the mounted media. Although depending on the version of grub, changing the /etc/fstab and running update-grub could work (if chroot-ed to the install). But it's simpler to just change both config files on the mounted system than it is to chroot and run things on said media.

Shadow_7 10-16-2014 11:27 PM

You can use "e" in grub to enter edit mode to change the boot items. But if the /etc/fstab is in the way that's not much good. You're looking for the line in grub.cfg that reads something like:

linux /boot/vmlinuz root=/dev/sda1

to change it to something like

linux /boot/vmlinuz root=UUID=ffffffff-ffff-ffff-ffff-ffffffffffff

Where the UUID is what matches the data from blkid. Roughly the same syntax for LABEL=xxx... You're basically swapping the /dev/... for UUID=... or LABEL=... in grub.cfg and fstab.

EDDY1 10-17-2014 02:20 AM

You should have atleast 2 entries at grub. use the arrow-down key to go to Advanced Options press <Enter> select rescue mode.

Jayson Wonder 10-17-2014 08:36 AM

Quote:

Originally Posted by EDDY1 (Post 5254950)
You should have atleast 2 entries at grub. use the arrow-down key to go to Advanced Options press <Enter> select rescue mode.

I have tried to go into this mode and unfourtunately I get the same hung system with a flashing "-". Should this be taking me to some other options?

Thanks,

EDDY1 10-17-2014 12:37 PM

It should've taken you to a text console.

Jayson Wonder 10-18-2014 08:46 PM

Quote:

Originally Posted by EDDY1 (Post 5255171)
It should've taken you to a text console.

Oddly enough it does not. I. An get into grub command prompt using c or I can get into edit mode using e from grub boot screen.


All times are GMT -5. The time now is 09:58 AM.