LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Boot Problem on emergency HD swap (https://www.linuxquestions.org/questions/linux-software-2/boot-problem-on-emergency-hd-swap-4175587927/)

mdooligan 08-25-2016 02:52 AM

Boot Problem on emergency HD swap
 
I have this old PC here that's been doing great with a nice gentoo install on it. Recently a high pitched whine started coming from it - the single HD in it sounds like it's going bad.

So I grab a 400GB I have here, put it in, partition it exactly like the other, and copy the entire boot/root partition (sda1) over. Shut down, remove old drive and make newdrive the boot disk.

I boot SystemRescueCD, chroot into sda1, run
Code:

grub-install /dev/sda
and
Code:

grub-mkconfig
... and it hangs shortly after the kernel gets going with this:
Code:

>> Activating mdev
>> Skipping module load; no modules in the ramdisk!
>> Determining root device ...
>> Detected real_root=/dev/sda1
>> Mounting /dev/sda1 as root...
>> Using mount -t auto -o ro
mount: mounting /dev/sda1 on /newroot failed: no such file or directory
!! Could not mount specified ROOT, try again
!! Could not find the root blockdevice in .
!! Please specifiy another value or:
!! - Press Enter for the same
!! - type 'shell' for a shell
!! - type 'q' to skip...
root block device::

It looks like kernel loads, but my initrd is messed up for some reason.

I used to be a master of this stuff back in LILO days, but now I'm a dotty old guy and everything is new. What's going on here? GRUB2 mystifies me.

jailbait 08-25-2016 10:09 AM

Use SystemRescueCD to examine /boot/grub/grub.cfg on your new hard drive. You may have references to the UUID of your old drive where you need references to the UUID of your new drive.

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

jefro 08-25-2016 05:26 PM

What is this? /newroot

mdooligan 08-25-2016 10:09 PM

Thank you very much for the responses.

/newroot is the mount point inside initrd. I guess what it's saying is that it cannot find /dev/sda1 because /dev is not running because no modules have been loaded. It cannot find it's modules.

I made very sure the UUIDs matched up, and ran grub-mkconfig. It gave me this /boot/grub/grub.cfg:
Code:

...
[EDIT]
Well, I just went to fetch the grub.cfg from it, and I do believe it's releasing the magic smoke. The keyboard and mouse have stop working, just sitting at sysresccd x session, and I think I smell something from it.

No point in pursuing this any further, off to the recycler it goes. It is a bit old.

Thanks again for the responses. My apologies.

Do I mark this [solved] or can the post be removed?

mdooligan 08-26-2016 11:35 AM

.. as an addendum, the PC is old enough I think it requires grub2 legacy mode.

https://help.ubuntu.com/community/UE...or_Legacy_mode


All times are GMT -5. The time now is 12:22 PM.