Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]chroot revisited
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
seneca
n00b
n00b


Joined: 10 Apr 2013
Posts: 53

PostPosted: Thu Sep 12, 2013 7:40 am    Post subject: [solved]chroot revisited Reply with quote

Hello

There are several posts related to chroot issues from 2003, etc, but none applicable to my problem, hence I ask in case others have the same issue

Here is the issue:
1. gentoo in sdc with gnome and KDE, booting off from debian and grub installed on sda (no grub in gentoo or sdc MBR). Gentoo just installed with stage3 method and updated.
2. on the PC all works well
3. did a clonezilla of sda, sdb and sdc for virtualbox and there sda (debian) boots ok but gentoo boots to a logon prompt where the user and root passwords are not recognized. If you chroot gentooś sdc from the liveCD, it chroots ok but then all commands fail with "illegal instruction". While booting, several errors flash quickly on the screen, notably but not limited to udevd fails.

any idea what the heck is going on?
_________________
Whatever is well said by another, is mine.
I don't consider myself bald, I'm just taller than my hair.

Lucius Annaeus Seneca


Last edited by seneca on Sat Sep 14, 2013 11:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Sep 12, 2013 8:33 am    Post subject: Reply with quote

Sounds like different, incompatible Architecture.

What CPUs do you use and which CFLAGS?
Back to top
View user's profile Send private message
seneca
n00b
n00b


Joined: 10 Apr 2013
Posts: 53

PostPosted: Thu Sep 12, 2013 10:52 am    Post subject: Reply with quote

hello py-ro

thanks for taking the time.

the cpu info
Quote:

AMD FX(tm)-6200 Six-Core Processor


the CFLAGS
Quote:

CFLAGS="-march=native -O2 -pipe -msse -msse2 -msse3 -mmmx -m3dnow"
CXXFLAGS="${CFLAGS}"


BTW, as an aside, are the "-mmsse etc" flags needed if march is set to 'native'? I think probably not, but not sure.
_________________
Whatever is well said by another, is mine.
I don't consider myself bald, I'm just taller than my hair.

Lucius Annaeus Seneca
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Sep 12, 2013 10:56 am    Post subject: Reply with quote

That is your Problem, virtual box won't pass all capabilities of the cpu.

And no, you won't need to specifiy it.
Back to top
View user's profile Send private message
seneca
n00b
n00b


Joined: 10 Apr 2013
Posts: 53

PostPosted: Thu Sep 12, 2013 11:05 am    Post subject: Reply with quote

excellent for the make.conf (I will delete those flags) but the original issue might be another as I have another gentoo in virtualbox with those flags which works fine, this latter was installed from scratch within virtualbox and is almost identical except 'virtualbox' is included in make.conf for VIDEO_CARDS and INPUT_DEVICES (along with vesa and endev, respectively).

Any other thoughts?
_________________
Whatever is well said by another, is mine.
I don't consider myself bald, I'm just taller than my hair.

Lucius Annaeus Seneca
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Thu Sep 12, 2013 11:18 am    Post subject: Reply with quote

If the 2nd one was installed inside Virtuabox with native, it will only have the features virtuabox passes through, so it will surely run.

If you use native outside Virtuabox, it will have features enabled not available inside Virtuabox.
Back to top
View user's profile Send private message
seneca
n00b
n00b


Joined: 10 Apr 2013
Posts: 53

PostPosted: Thu Sep 12, 2013 11:28 am    Post subject: Reply with quote

oh poo

so I guess cloning wont work. k, will forget it and use the virtualbox installed gentoo to test run updates before doing real runs on the hard disk version.

Thanks py-ro

:^)
_________________
Whatever is well said by another, is mine.
I don't consider myself bald, I'm just taller than my hair.

Lucius Annaeus Seneca
Back to top
View user's profile Send private message
miket
Guru
Guru


Joined: 28 Apr 2007
Posts: 488
Location: Gainesville, FL, USA

PostPosted: Sat Sep 14, 2013 9:19 pm    Post subject: Reply with quote

seneca wrote:
oh poo

so I guess cloning wont work. k, will forget it and use the virtualbox installed gentoo to test run updates before doing real runs on the hard disk version.

Thanks py-ro

:^)
It's possibly not that bad. A kernel with a configuration tuned to run in Virtualbox (or most any other virtualization setup) will almost certainly not run OK on bare metal. The kernel is likely a hangup for you; reconfiguring for the VM environment, plus modification to the configuration files for the virtualized environment (fstab, network interfaces, etc) and any compiling of needed X-window drivers might be enough to get you running. (Are you sure, for example, that the kernel when running in the VM is assuming SCSI-style drive names--sdX--and not something else like hdX?) If you follow py-ro's suggestion of configuring your one kernel to contain the drivers for both environments so that can boot either way, you'll still have that issue about reconfiguring mountpoints and network.

As for the rest of your executables, though, what looks like the native architecture within the VM environment could be similar enough to what is on the real machine for your compiled executables to work. Remember -march=native will get you different things if were running on AMD and your VM wants to emulate Intel.

As for the live-CD, though, it sounds like you had was a mismatch in the word size (32-vs-64 bit) between what you booted from the live-CD and what you've got compiled on your virtualized /dev/sdc.

Actually, if you've got Debian running inside of Virtualbox, unless you've got a word-size mismatch between the Debian and Gentoo installs, why not do your chroot from the booted Debian instead of the live-CD?

Here's a word to the wise about your plans, though: compiling performance is awful inside of a VM. I've used odd setups with compilation in a chroot on the native machine and exports of the resulting file system via NFS so that I could run the result under KVM; this lets me compile full-steam-ahead with all the cores. VM managers only emulate CPU cores using multiple threads which may or may not be bound to the same physical core! Besides that, I/O performance is never as good as native I/O performance.
Back to top
View user's profile Send private message
seneca
n00b
n00b


Joined: 10 Apr 2013
Posts: 53

PostPosted: Sat Sep 14, 2013 11:10 pm    Post subject: Reply with quote

Hi Miket

Your reply answered many of my doubts. I agree with you 100% about the slow compilations inside the VM, one reason I tried to clone a full setup into the VM rather than installing all from scratch. I will look into the KVM idea for the future as it is helpful for those still learning to test changes in a virtual, things like migrating to systemd, etc., without trashing the PC we use daily

thank you very much for the thoughtful reply

best
_________________
Whatever is well said by another, is mine.
I don't consider myself bald, I'm just taller than my hair.

Lucius Annaeus Seneca
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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