Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Trouble installing Gentoo on a new machine
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
Xentronium
n00b
n00b


Joined: 22 Oct 2006
Posts: 20
Location: Germany

PostPosted: Tue Jul 24, 2018 10:38 pm    Post subject: [SOLVED] Trouble installing Gentoo on a new machine Reply with quote

Greetings,

I am trying to install Gentoo on a new Computer and after 4 days of rather "limited success" I could really use some help.

I followed the AMD64 Handbook and used a minimal installation media to install gentoo using the profile "default/linux/amd64/17.0/desktop/plasma/System (stable)" on an UEFI Computer without dedicated graphics.
At some point after chrooting into the system but bevor compiling the kernel, the handbook recommanded to update the world-set and suggested, that the update is necessary for systemd users. This was the first problem, because some packages that are pulled by this profile will not install without an existing kernel. So I skipped the update for now, configured my kernel and - after several configuration-/reboot-attempts (black screens, freezes, you name it) got a system with a (seemingly) working framebuffer.
Systemd however was complaining about "systemd-logind.service: Failed to drop capabilities: Function not implemented" and left the computer unusable, which was kind of expected, since the Handbook warned about not updating world.
So I chrooted back into the System and (re)emerged all packages of the profile (emerge -e) to be on the safe side, which worked without obvious Errors. Sadly the systemd problem remained, so I once again chrooted back to double check my kernel configuration und see, if the gentoo systemd guide has anything interesting to say. That is where the surprise occured: compiling the kernel config suddenly fails because of a "./include/Linux/kernel.h:6:10: fatal error: stdarg.h: File or directory not found".

I know, that 'stdarg.h' is a gcc-file so I tried: fix_libtool_files.sh, revdep-rebuild, re-emerging the gcc (which by the way was no problem, so gcc itself seems to work), re-emerging gentoo-sources and manually adding LDPATH=<correct directory with the stdarg.h-file> in env.d/05gcc before env-updating.

This sounds probably "noobish" but I think the Handbook isn't as fool proof as it used to be back in the year 2011, when I installed gentoo the last time. Then again things like UEFI and systemd weren't of any concern back then...

Anyway, help would be greatly appreciated because I am running out of ideas.
_________________
"Linux is highly user friendly, it's just very selective who it is friends with."


Last edited by Xentronium on Wed Jul 25, 2018 10:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 565
Location: Romania

PostPosted: Tue Jul 24, 2018 11:03 pm    Post subject: Re: Trouble installing Gentoo on a new machine Reply with quote

Xentronium wrote:
Greetings,

I am trying to install Gentoo on a new Computer and after 4 days of rather "limited success" I could really use some help.

I followed the AMD64 Handbook and used a minimal installation media to install gentoo using the profile "default/linux/amd64/17.0/desktop/plasma/System (stable)" on an UEFI Computer without dedicated graphics.
At some point after chrooting into the system but bevor compiling the kernel, the handbook recommanded to update the world-set and suggested, that the update is necessary for systemd users. This was the first problem, because some packages that are pulled by this profile will not install without an existing kernel. So I skipped the update for now, configured my kernel and - after several configuration-/reboot-attempts (black screens, freezes, you name it) got a system with a (seemingly) working framebuffer.
Systemd however was complaining about "systemd-logind.service: Failed to drop capabilities: Function not implemented" and left the computer unusable, which was kind of expected, since the Handbook warned about not updating world.
So I chrooted back into the System and (re)emerged all packages of the profile (emerge -e) to be on the safe side, which worked without obvious Errors. Sadly the systemd problem remained, so I once again chrooted back to double check my kernel configuration und see, if the gentoo systemd guide has anything interesting to say. That is where the surprise occured: compiling the kernel config suddenly fails because of a "./include/Linux/kernel.h:6:10: fatal error: stdarg.h: File or directory not found".

I know, that 'stdarg.h' is a gcc-file so I tried: fix_libtool_files.sh, revdep-rebuild, re-emerging the gcc (which by the way was no problem, so gcc itself seems to work), re-emerging gentoo-sources and manually adding LDPATH=<correct directory with the stdarg.h-file> in env.d/05gcc before env-updating.

This sounds probably "noobish" but I think the Handbook isn't as fool proof as it used to be back in the year 2011, when I installed gentoo the last time. Then again things like UEFI and systemd weren't of any concern back then...

Anyway, help would be greatly appreciated because I am running out of ideas.


Okey. Let's start with the most obvious one. Do you have stdarg.h ? Should be located in /usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/stdarg.h , where 7.3.0 is the version of gcc you have installed.

Second thing I'm gonna say is that stdarg.h is an include, not a library... so not on the right track there. In fact what else did you manually add based on memories from first install but not according to the handbook? can you think of any ? coz this is one weird error.

If you provide further data, I'd be happy to try to figure out what is wrong.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Tue Jul 24, 2018 11:39 pm    Post subject: Reply with quote

If installing for UEFI mode the gentoo minimal install cd is not a good choice, it does not support booting in UEFI mode. The system rescue CD/USB is the best choice for any install including for UEFI, the gentoo live dvd can boot in UEFI mode as well as ubuntu, fedora, ... , live cd/dvd/usb.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Xentronium
n00b
n00b


Joined: 22 Oct 2006
Posts: 20
Location: Germany

PostPosted: Wed Jul 25, 2018 12:16 am    Post subject: Reply with quote

Hello and thanks for your answers

@DONAHUE
Actually I put the minimal install image on a bootable usb stick and after configuring UEFI to boot it first it did so without problems.

@axl
Yes, stdarg.h is present under that path which is also the one I tried in LDPATH.
Setting it was a desperation try and was removed immediately after I saw, that it didn't solve anything.

And now that you mention it, I did indeed change something, that was not specified in the Handbook: CHOST
The CHOST article in the Gentoo Wiki states, that the vendor part value is optional and may be something else than "pc" so I changed it from "x86_64-pc-linux-gnu" to "x86_64-gentoo-linux-gnu" (for no particular reason really, I just liked it better).

I feel stupid now. :oops: But thanks for bringing me back on track.
_________________
"Linux is highly user friendly, it's just very selective who it is friends with."
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 565
Location: Romania

PostPosted: Wed Jul 25, 2018 12:18 am    Post subject: Reply with quote

Xentronium wrote:
@axl
Yes, stdarg.h is present under that path which is also the one I tried in LDPATH.
Setting it was a desperation try and was removed immediately after I saw, that it didn't solve anything.

And now that you mention it, I did indeed change something, that was not specified in the Handbook: CHOST
The CHOST article in the Gentoo Wiki states, that the vendor part value is optional and may be something else than "pc" so I changed it from "x86_64-pc-linux-gnu" to "x86_64-gentoo-linux-gnu" (for no particular reason really, I just liked it better).

I feel stupid now. :oops: But thanks for bringing me back on track.


don't feel stupid. once i tried that too :)

at least now you know what it is. start over. sorry to say, but start over :)

PS also am 99% percent sure DONAHUE is also correct when he said you didn't do an uefi install. the gentoo minimal cd thingie is not uefi ready. can't install grub in uefi mode without booting in uefi mode. and gentoo iso doesn't provide that. people suggest system rescue cd, personally I used random isos from other distros. But you didn't do a uefi system.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 565
Location: Romania

PostPosted: Wed Jul 25, 2018 12:54 am    Post subject: Reply with quote

axl wrote:
PS also am 99% percent sure DONAHUE is also correct when he said you didn't do an uefi install. the gentoo minimal cd thingie is not uefi ready. can't install grub in uefi mode without booting in uefi mode. and gentoo iso doesn't provide that. people suggest system rescue cd, personally I used random isos from other distros. But you didn't do a uefi system.



Personally I loved UEFI and even though I am not currently on a UEFI machine, I'll try to invest some time to explain some things.

You know you are booted in efi mode when you can see you have mounted /sys/firmware/efi/efivars

If that is not mounted, you are not booted in UEFI mode. and that also means you CAN'T install the bootloader in UEFI mode. and since this is unfamiliar to you, you didn't do an uefi install. No questions about efi partition, boot partition, gpt. it's different from mbr. I'll bet 1$ u installed mbr.

And again, gentoo minimal iso isn't uefi ready. therefor you cant install any uefi bootloader/distro without that. (or it use to be 2 years when i last tried. maybe they changed it. i know they adopted nvme. first time i tried, it wasn't supported).

but anyway, going forward, you should never consider mandatory to install gentoo FROM a gentoo. you dont need to boot gentoo to install gentoo. you could boot any other distro, and continue with the handbook absolutely ignoring choosing the right medium to install. and just move on from chroot on.

ASSUMING OFC the distro u're booting is not sharing the same fs with the distro u're trying to build. but even that... there are hacks. but the point is, you dont need to boot gentoo to install gentoo. and this point is a hint to install uefi.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Wed Jul 25, 2018 12:57 am    Post subject: Reply with quote

But the great thing about System Rescue CD is that you can use it on both MBR as well as (u)EFI booting machines, and it uses Gentoo as its own base, meaning very little hacks needed at all to get up and running - with it you can truly follow the handbook to get a working install, and it's a relatively recent (in Gentoo epochs anyway) kernel.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 565
Location: Romania

PostPosted: Wed Jul 25, 2018 1:04 am    Post subject: Reply with quote

johngalt wrote:
But the great thing about System Rescue CD is that you can use it on both MBR as well as (u)EFI booting machines, and it uses Gentoo as its own base, meaning very little hacks needed at all to get up and running - with it you can truly follow the handbook to get a working install, and it's a relatively recent (in Gentoo epochs anyway) kernel.


u can install grub in either uefi mode or mbr mode if you are booted in uefi mode.

you cannot install grub in uefi mode if you are booted in mbr mode.

regardless of distro, kernel or anything else.

a simple sign is to check if /sys/firmware/efi/efivars is mounted. if it's not... u're most likely booted in legacy bios mbr mode and can only use mbr. if it is mounteed, u're likely booted in uefi mode and can install both mbr and uefi bootloader. most likely grub.
Back to top
View user's profile Send private message
johngalt
Apprentice
Apprentice


Joined: 09 Sep 2004
Posts: 258
Location: 3rd Rock

PostPosted: Wed Jul 25, 2018 1:19 am    Post subject: Reply with quote

Yup - been there done that.

My comments were not about whether you could or could not install MBR vs (u)EFI, my comments were directed at the fact that with SRCD you have a working Gentoo-based install that is relatively small (under 600 MB) and still Gentoo-based so you do not have to pursue extra steps that using other (specifically) non-Gentoo-based distros might cause you to need.
_________________
desultory wrote:
If you want to retain credibility as a functional adult; when you are told that you are acting boorishly, the correct response is to consider that possibility and act accordingly to correct that behavior.


Amen.
Back to top
View user's profile Send private message
axl
Guru
Guru


Joined: 11 Oct 2002
Posts: 565
Location: Romania

PostPosted: Wed Jul 25, 2018 1:23 am    Post subject: Reply with quote

johngalt wrote:
Yup - been there done that.

My comments were not about whether you could or could not install MBR vs (u)EFI, my comments were directed at the fact that with SRCD you have a working Gentoo-based install that is relatively small (under 600 MB) and still Gentoo-based so you do not have to pursue extra steps that using other (specifically) non-Gentoo-based distros might cause you to need.


Absolutely correct. But if you are offered an already working install of any kind of linux (especially if booted already in uefi mode, coz that is what we were talking about), you don't need to switch. Not needing to switch is also an option.

So many options :)

And what I mean by that, is that there are tons of live images out there that boot in uefi and you could have your cake and eat it too. Like both install a system, and use a functional distro. No need to use... rescue stuff. bleah. it takes a while to install a system. and it's nice to use it while u install. I dont think gentoo's live dvd is uefi ready but there are other images out there that do the same thing. and like i said. u dont need gentoo to install gentoo.
Back to top
View user's profile Send private message
Xentronium
n00b
n00b


Joined: 22 Oct 2006
Posts: 20
Location: Germany

PostPosted: Wed Jul 25, 2018 9:36 am    Post subject: Reply with quote

Whoa, you guys have been active, thanks.

I know about the different options for mbr/bios or gpt/efi, however I opted against installing an external boot loader and just use EFI as a loader on a kernel with EFI stup support where the rootfs is set in the built-in command line. It might not be as powerfull and flexible as GRUB but then again I just need a bootable system without much bells and whistles and it does seem to work fine.

However, I will take a close look regarding what you said as soon as I'm back home.
Having no gentoo- (linux in fact) system for three months is starting to bother me. ;)
_________________
"Linux is highly user friendly, it's just very selective who it is friends with."
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7553
Location: Goose Creek SC

PostPosted: Wed Jul 25, 2018 3:49 pm    Post subject: Reply with quote

Xentronium wrote:
@DONAHUE
Actually I put the minimal install image on a bootable usb stick and after configuring UEFI to boot it first it did so without problems.

Most UEFI implementations will offer non-UEFI capable options in the Boot options menu.You obviously have such a motherboard.
Most UEFI implementaions will offer to boot the sysrescd/usb in either legacy BIOS mode or UEFI mode. Two separate entries: usually the UEFI entry is marked, the non-UEFI entry just names the device. You probably have such a motherboard.
The non-UEFI minmal install cd/usb is, as you experienced, fully capable of installing gentoo. However, that gentoo install will not be able to access the UEFI flash memory on the motherboard.
You do not need to restart from scratch. Boot a UEFI capable livecd/dvd/usb in UEFI mode, enter the chroot, emerge and use efibootmgr or grub or legacy grub or syslinux or refind or ... to make the gentoo install UEFI bootable.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Xentronium
n00b
n00b


Joined: 22 Oct 2006
Posts: 20
Location: Germany

PostPosted: Wed Jul 25, 2018 10:19 pm    Post subject: Reply with quote

@DONAHUE
I understand and while my first thought on that was something like "why bother, when I have a bootable System already", there is something to be said for a nicely set up machine with a clean and modern configuration. So, I'll do, what you suggest, since using the efibootmgr (which was option 3 in the handbook) was my original choice anyway.

Other than that I tried to fix the CHOST-change but it really is a major pain in the ass. I guess axl was right after all and starting over really is the way go.


I marked this thread as SOLVED now; thanks again @everyone for all the usefull information.
_________________
"Linux is highly user friendly, it's just very selective who it is friends with."
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