i get a new SSD connected to the system through USB.
I tried boot with another usb drive and use DD to clone the HD to SSD.
Next, i tried to boot the system with the SSD connected via usb. I even removed the HD from the system.
but i get the following error:
Code: Select all
error: invalid arch-independent ELF magic.
Entering rescue mode...
grub rescue>UPDATE: when boot from HD, and press e at the grub menu, i can see grub commands.
In the grub rescue, i tried one of the commands: insmod gzio, and i see the error 'invalid arch-independent ELF magic'
in grub rescue, i can see that root and prefix is set to the SSD, that is, hd0, when i boot with SSD through USB. And i can set them to hd1, that is, the original HD with following commands, and than insmod gzio won't give out error message:
Code: Select all
set root=(hd1, msdos3)
set prefix=(hd1,msdos3)/boot/grub
UPDATE: i just read about the https://www.supergrubdisk.org, i downloaded the iso and create a bootable usb drive with it. When i boot with supergrub2, it can detect my gentoo installation on HDD. However, when i boot with the supergrub2 usb, i cannot use the usb SSD at the same time:
my BIOS boot options show three entries related to USB:
usb hdd
usb floppy
usb cd
but when i plugin the supergrub2 usb drive or usb SSD, both of them are recoganized as usb HDD. There is only one usb HDD in BIOS boot entry, so i can only use one of them, i cannot use both supergrub2 and usb SSD at the same time.
So, what's that usb floppy and usb cd, anyway to make supergrub2 iso file into usb cd or usb floppy so that it will not compete for usb hdd with my usb SSD?
UPDATE: i get another SATA to USB cable, attach the HDD to the cable and connect it to laptop via USB, it can boot and run well, though a little bit slow. So, it might be some random error during DD clone, or any difference between HDD and SSD?
UPDATE: i made some progress with supergrub2 disk:
1. i boot with supergrub2 usb
2. plug in usb SSD
3. select enable all native drivers in supergrub2 menu
4. select detect os in supergrub2 menu. now i can see the linux kernel on usb SSD. i can select it and it will load.
However, the boot failed with something like:
Code: Select all
Determining root device (trying UUID=94db66xxxxxx
Bout device detected as /dev/sdb3!
Mounting /dev/sdb3 as root ...
Using mount -t ext4 -o ro /dev/sdb3 /newroot
!! init (/sbin/init) not found in mounted root device (/dev/sdb3)!
UPDATE: i rephrased this issue with a new post in the kernel queue: viewtopic-p-8810231.html#8810231
