Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
installing grub in chroot environment
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mgnut57
Apprentice
Apprentice


Joined: 12 Jan 2008
Posts: 206

PostPosted: Sun Sep 29, 2019 5:25 am    Post subject: installing grub in chroot environment Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43979
Location: 56N 3W

PostPosted: Sun Sep 29, 2019 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message
APolozov
Tux's lil' helper
Tux's lil' helper


Joined: 28 Sep 2006
Posts: 141
Location: Voronezh, Russia

PostPosted: Sun Sep 29, 2019 11:56 am    Post subject: Reply with quote

IMHO solution is in this place https://wiki.gentoo.org/wiki/Quick_Installation_Checklist#Chroot
_________________
Excuse my bad English, I only study it.

I also connected to: velo36.ru openstreetmap.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum