Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

possible to clone HD system drive to usb and boot with it?

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
guyuming
Apprentice
Apprentice
Posts: 269
Joined: Thu Nov 19, 2020 1:09 am

possible to clone HD system drive to usb and boot with it?

  • Quote

Post by guyuming » Sat Dec 16, 2023 12:12 pm

my laptop have traditional bios, not UEFI. And a single HD, with grub.

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>
So, is it possible to clone HD system drive to usb and boot with that usb?


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
So, can this be just a random copy error happend during DD, or i should not simply clone HD to SSD with 'dd -if /dev/sda of=/dev/sdb'?


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)!
and genkernel rescueshell opened


UPDATE: i rephrased this issue with a new post in the kernel queue: viewtopic-p-8810231.html#8810231
Top
Post Reply
1 post • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy