Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Grub2 emerge fails on Celeron 1.4
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
P151
n00b
n00b


Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Sep 25, 2016 1:56 am    Post subject: [Solved] Grub2 emerge fails on Celeron 1.4 Reply with quote

Hi all,

I'm trying my first Gentoo install. I'm working my way through installing on an Acer 720-2844, standard legacy boot partition scheme, under the assumption it would be easier to make any mistakes there than on the laptop I actually use.

I'm having the unifont.pcf issue that's referenced in the following thread (after the issue that was marked "solved"):
https://forums.gentoo.org/viewtopic-t-1026508-start-0.html

emake fails at
Code:
/bin/sh: line 1: 25730 Illegal instruction  ./build-grub-mkfont -o unicode.pf2 ./unifont.pcf
Makefile:13392: recipe for target 'unicode.pf2' failed


So far I've tried:
Removing -march=haswell from make.conf , so I just have standard cflags (-j2 is my only make flag)
Recompiling kernel without -march=haswell
In a fit of desperation, seeing if emerge unifont would install anything- I don't know what it is but now I have it. Things that aren't grub install fine.
Even with kernel and make.conf set up with no march flag, and unifont installed, I still get the same error. The closest thing I can find is that there was an issue where something upstream in unifont was breaking this years ago, but that really doesn't help me install now.


Last edited by P151 on Wed Sep 28, 2016 2:57 am; edited 1 time in total
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 567
Location: Romania

PostPosted: Sun Sep 25, 2016 2:05 am    Post subject: Reply with quote

usually Illegal instruction error only happens when you try to execute code on a machine that is not able to execute that code. which sounds very unlike gentoo. sounds more like someone trying to put files from machine onto another like some frackenstein thingie. dont know. just saying.

u could put in /etc/portage/package.use or /etc/portage/package.use/x86_64-pc-linux-gnu the like:

sys-boot/grub -fonts

i mean... u dont really need fonts when you boot. and maybe -sdl and also -themes and -truetype.

i am sure grub will compile fine with those - USE flags.

long live gentoo.
Back to top
View user's profile Send private message
P151
n00b
n00b


Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Sep 25, 2016 2:49 am    Post subject: Reply with quote

Thanks for the reply axl. I tried again, using those flags suggested below is the result:

Code:
./build-grub-mkfont -o unicode.pf2 /usr/share/fonts/unifont/unifont.pcf.gz || (rm -f unicode.pf2; exit 1)
/bin/sh: line 1: 10463 Illegal instruction  ./build-grub-mkfont -o unicode.pf2 /usr/share/fonts/unifont/unifont.pcf.gz
Makefile:13392: recipe for target 'unicode.pf2' failed


It's now a slightly different unifont error.
Back to top
View user's profile Send private message
P151
n00b
n00b


Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Sep 25, 2016 5:29 am    Post subject: Reply with quote

As a note, I've been installing on this laptop I'm posting from (chrooted into a second drive) alongside the Chromebook. I followed the same path with the addition of LVM on LUKS during partitioning. Grub had no problem compiling on this one, even with -march=corei7-avx left turned on.

Now this one's just throwing a fit about "lvm/vg-boot not found" when I try to mkconfig or install grub, which is pretty interesting since I specified it by UUID rather than name, so grub had to first find the disk it couldn't find in order to report the name?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Sep 25, 2016 9:12 am    Post subject: Reply with quote

please use march native when you do not know what you really need

for my ivybridge 3610qm, an example

Code:
cat /etc/portage/make.conf
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"


Those cpu_flags can be read out by

Code:
*  app-portage/cpuid2cpuflags
      Latest version available: 2
      Latest version installed: 2
      Size of files: 68 KiB
      Homepage:      https://github.com/mgorny/cpuid2cpuflags
      Description:   Tool to guess CPU_FLAGS_X86 flags for the host
      License:       BSD-2


Use the result from this app.

When it does not work, use something moderate suggested by the gentoo wiki please

Quote:
Acer C720-2844 (NX.SHEAA.004) Chromebook Intel Celeron 2955U (1.40 GHz) 4 GB Memory 16 GB SSD 11.6" Chrome OS

http://ark.intel.com/products/75608/Intel-Celeron-Processor-2955U-2M-Cache-1_40-GHz

https://en.wikipedia.org/wiki/List_of_Intel_Celeron_microprocessors

Quote:
"Haswell-ULT" (SiP, 22 nm)

All models support: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, Enhanced Intel SpeedStep Technology (EIST), Intel 64, XD bit (an NX bit implementation), Intel VT-x, Smart Cache.
2957U and 2981U also support Intel Wireless Display.
Transistors: 1.3 billion
Die size: 181 mm2
Back to top
View user's profile Send private message
P151
n00b
n00b


Joined: 25 Sep 2016
Posts: 6

PostPosted: Sun Sep 25, 2016 4:13 pm    Post subject: Reply with quote

Roman_Gruber wrote:
please use march native when you do not know what you really need


To be clear, the reason I am turning these flags on and off is that every time someone had this problem previously and solved it, the answer was "GRUB2 cannot compile with march=native set" or "GRUB2 cannot compile with march flags at all". I've obviously shown that it can compile with the march flag set for my Sandy Bridge processor, so I'll give a try again the native flag on the chromebook if I have time tonight.

Out of curiosity, would it be easier to use the Haswell flag and disable the processor flags not included in the Celeron version, or does the march flag's implementation not work like that?
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 567
Location: Romania

PostPosted: Mon Sep 26, 2016 5:40 am    Post subject: Reply with quote

https://en.wikipedia.org/wiki/List_of_Intel_Celeron_microprocessors#.22Haswell-ULT.22_.28SiP.2C_22_nm.29

https://en.wikipedia.org/wiki/List_of_Intel_Core_i7_microprocessors#.22Haswell-E.22_.2822_nm.29

as you can see they are quite different.

i would guess the celeron version has to use -mnoavx -mnoavx2 or -march=nehalem -mtune=nehalem.

hard to believe though, that those are the only things different. if anyone else could shed more light on this matter i would love to read about it.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 567
Location: Romania

PostPosted: Mon Sep 26, 2016 5:43 am    Post subject: Reply with quote

axl wrote:
-mnoavx -mnoavx2


not sure about these. just speculating based on experience.

Quote:
-march=nehalem -mtune=nehalem


also speculating. maybe they have a special march now for that type of celeron. i dont know.
Back to top
View user's profile Send private message
P151
n00b
n00b


Joined: 25 Sep 2016
Posts: 6

PostPosted: Wed Sep 28, 2016 2:12 am    Post subject: Got it working Reply with quote

Thanks for the help guys, and especially for the tip about cpuinfo2cpuflags. Grub2 is compiled, but I'm still not sure what the source of the problem was. I think it was multiple errors I made compounded.

Best guess is as follows:
Quote:

1. Compiled wpa_supplicant with the wrong flags, which in turn compiled X and a bunch of font libraries.
2. When I changed the flags, I must have issued a command incorrectly- perhaps @world wasn't enough and I needed to specify a recursion option for dependencies?
3. Compiling grub2 with the correct flags then failed because of a problem with the previously incorrectly compiled unifont file.

The solution was to remove everything emerged so far and start again. This time I compiled Grub before any other font packages and used no march flag.


Currently using
Code:

CFLAGS="-0g -pipe"
CPU_FLAGS_x86="mmx mmxext popcnt sse sse2 sse4 sse4_1 sse4_2 ssse3"
USE="X dbus xfce -systemd udev gtk device-mapper crypt lvm -qt4 -kde -pulseaudio alsa"


Kernel settings aren't anything crazy. It's based on the GalliumOS Haswell config, with some of the other manufacturer-specific support off, a bunch of extra driver modules for programming hardware, and built-in support for SHA512 + AES (not sure if these being included rather than modules would actually help with IO speed on a full LUKS system?).
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