View previous topic :: View next topic |
Author |
Message |
mgnut57 Apprentice
Joined: 12 Jan 2008 Posts: 292
|
Posted: Sun Sep 29, 2019 5:25 am Post subject: installing grub in chroot environment |
|
|
I am attempting to copy a running system into a new system.
I have copied all the system folders to a new filesystem, which is stored on /dev/sdc1 and mounted.
I have bind-mounted /dev and /proc in the appropriate place on the mount of /dev/sdc1.
Attempting to install grub2 doesn't seem to be working:
Code: | grub2-install /dev/sdc
Installing for i386-pc platform.
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc2": No such device
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc1": No such device
Unknown device "/dev/sdc1": No such device
Installation finished. No error reported.
|
It claims to have finished, but the file command shows no bootloader:
Code: | # file -s /dev/sdc
/dev/sdc: DOS/MBR boot sector |
This may all need to be re-done because I am cloning to much newer hardware with UEFI, but I would like to get it solved. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54097 Location: 56N 3W
|
Posted: Sun Sep 29, 2019 8:30 am Post subject: |
|
|
mgnut57,
mgnut57 wrote: | I am attempting to copy a running system into a new system. |
You can only do that if you have a way to create filesystem snapshots.
Any files you have open for writing will have incomplete contents on disk.
Worse, the directory tree pointing to files you have open for writing will be cached and updated in RAM.
In other words, a live filesystem is a mess that cannot usefully be copied.
Even if the copy succeeds and it may give all the appearances of working, it won't boot. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
APolozov Apprentice
Joined: 28 Sep 2006 Posts: 189 Location: Voronezh, Russia
|
|
Back to top |
|
|
|