Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]looking for a guide uefi laptop efi stub kern
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
dkuchay
n00b
n00b


Joined: 01 Apr 2019
Posts: 7
Location: Schenectady, NY

PostPosted: Thu Apr 04, 2019 3:14 pm    Post subject: [SOLVED]looking for a guide uefi laptop efi stub kern Reply with quote

Hello All,

Wondering if anyone can help link me to a different guide than Sakaki's for installing Gentoo on a laptop with encrypted HD and efi stub kernel >>
usb boot config?

Wanted to use Gentoo for over a decade now but lacked the time to install (and learn portage). Out of work on injury for another week and want to use downtime to get Gentoo installed. About to start round 4 on Sakais guide as the first three have resulted in things I want to avoid. I first learned of Gentoo by using an old embedded project called iMedia linux. I used to run webdt.org and it was a great Gentoo based embedded distro for using on the DT tablets.

I respect Gnome but I am a KDE guy. Want to avoid systemd and use SDDM. By the time I get to build kernel stages of Sakaki's guide I see plymouth and systemd pinned to use flags and I cant seem to get openrc/elogind to replace. I initially thought that the eselect profile being set to 17.0 plasma desktop multilib would have set this.... Options for using other rc systems exist in the guide but not for greeters. Played with it for a while trying to bring in plasma5/kde-meta but it shows that it will be using systemd.

Its amazing to me that we have options of building all binaries locally for installation and this is the biggest reason why I want to use Gentoo. That being said I have a week before I am due back at work and I am concerned about how much time I have left. I realize the handbook explains all for installing however the time I have left leaves me with the need to a copy and paste over ssh oriented approach. This is why its a ten year wish for me.

If such a guide does not exist may I ask for a tip or two on how I can deviate from her guide in such a way that I can avoid systemd and plymouth and or setup the system for using sddm-kcm and kde as hooks? Also for AMDGPU and Ryzen based hardware would: x86_64 and amdgpu be the flags to use in portages make.conf for target and video card sections? I have Ryzen 3550H mobile hardware. I just offered Sakaki money to update her guide and this in on premonition that she will be doing so since gnome was just announced as incoming to Gentoo repos. Only for my time constraints and no disrespect to her I posted this request for help here. Time zone difference makes me nervous. My hardware has been out for 3 to 4 weeks now. Wondering if 17.1 has this target in mind? Asus Tuf Gaming Ryzen 3550H with 560X external GPU and Vega APU.

Somehow during bootstrap stages my portage make.conf was overwritten and all @world packages were build without optimizations so I am about to go for round 4 of starting over. Hoping that 4 hours from now when I have a tool chain built again I can check back here and find a solution.


Thank you in advance
Daryl


Last edited by dkuchay on Mon Apr 08, 2019 10:19 pm; edited 3 times in total
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 294
Location: Brisbane, Australia

PostPosted: Thu Apr 04, 2019 5:01 pm    Post subject: Reply with quote

I installed Gentoo on a new "HP Notebook - 15-db0125au Ryzen 2400U" with a 125GiB SSHD (/dev/sdb) with Win10 and a 1TiB HDD (/dev/sda) for Gentoo. Grub2, No encryption. Xfce desktop. Profile 17.

My proceedure was:
- Set Bios to UEFI and Secure Boot to off.
- Boot with latest Gentoo Install ISO on a usb stick or SystemRescueCD 5.3.2.
- set root password, net-setup and start sshd
- Open a X terminal and login from your second PC.
- Create GPT partition /dev/sda1 40GB for Root, /dev/sda2 for swap and /dev/sda3 for home.
- Format the partitions with mkfs.ext4 -L ROOT, HOME, mkswap -L SWAP.
- Follow the Handbook until compiling the Kernel.
- Use Genkernel --menuconfig all and configure the Kernel for UEFI, Ryzen and your other hardware.
https://wiki.gentoo.org/wiki/Ryzen.
- Continue following the Handbook.

If you want to dual boot with windows see my post:
https://forums.gentoo.org/viewtopic-t-1094586.html

Once your system is up and running, consider installing encryption software. dm-crypt, eCryptfs, fscrypt or whatever meets your requirement.
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as python, perl, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
dkuchay
n00b
n00b


Joined: 01 Apr 2019
Posts: 7
Location: Schenectady, NY

PostPosted: Thu Apr 04, 2019 6:36 pm    Post subject: Reply with quote

Thank you for your reply.

Emerging world now on a fresh restart. Saw openrc in the 451 packages coming in after selecting a kde 17.0 profile. Set cpu flags and verified before emerging.

I set 4 partitions across the two drives and I am dual booting with an already set up windows 10. root swap and home are on the nvme and a data partition on the ssd. Already used parted to make primaries on each and used cryptsetup to make a luks container on the partitions for both drives. Mapped to LVM and made fsf2 partitions. In making the luks containers I made the key on a usb key with a second slot for password on backup method. I did not make boot or efi partitions in anticipation of using Sakaki's, or similar tool, build kernel to make an efi stub kernel that I can load from the usb stick bypassing grub all together. Sounds dangerous I know, her tools example a two stage build for kerenl where we build it twice. First run is a sanity check and then the second incorporates the initramfs into the kernel and makes it efistub renaming kernel to bootx64.efi. This should make it a native uefi application and with the right kernel command line hook in place at compile time it should find my rootfs and boot without grub.

I think I can avoid the systemd aspects by NOT copying in a few lines from her tutorial. I copied these in on my last build and subsequently started over. Where I went wrong specifically (I think) was the portion on the building kernel page that indicates:

Quote:
(chroot) livecd / #echo -e "# ensure we can generate a bootable kernel and initramfs\nsys-kernel/genkernel-next cryptsetup gpg plymouth" >> /etc/portage/package.use/genkernel-next
(chroot) livecd / #echo -e "# for a smooth transition to GNOME\nsys-boot/plymouth gdm" >> /etc/portage/package.use/plymouth
(chroot) livecd / #echo -e "# for a smooth transition from Plymouth\ngnome-base/gdm plymouth" >> /etc/portage/package.use/gdm
(chroot) livecd / #echo -e "# required by plymouth (kernel mode setting library)\nx11-libs/libdrm libkms" >> /etc/portage/package.use/libdrm



Retracing I think this is where I went wrong and her overlay was forcing systemd in on top of a normal kde/openrc profile.

Thinking ahead I should transfer gdm and libkms in to initramfs hooks and up to SDDM after initial boot. I have about 12 more hours to read up and verify as world emerges. Thanks again!
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 294
Location: Brisbane, Australia

PostPosted: Fri Apr 05, 2019 12:48 am    Post subject: Reply with quote

I am not familiar with KDE, LVM or LUX. My familie and friends systems use Xfce configured to look and feel like Windows 98, which they used before I moved them to Gentoo. LVM, Systemd, Gnome and KDE to complex and resources hogs on older machines.

Have look at man sys-kernel/genkernel and /etc/genkernel.conf. You can enable MENUCONFIG, LVM and LUX in /etc/genkernel.conf. This will save you lot's of time and problems. Also have a look at app-crypt/veracrypt. This will save you lot's of time and problems.

If I don't use Grub, I hit on my HP ESC and F-9 to select Gentoo or Win10 or Gentoo test.

Good luck and enjoy Gentoo,
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as python, perl, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
dkuchay
n00b
n00b


Joined: 01 Apr 2019
Posts: 7
Location: Schenectady, NY

PostPosted: Fri Apr 05, 2019 2:14 am    Post subject: Reply with quote

Got it done. Just reboot to a working system thanks to Sakaki's tools. Although there are a few systemd use flags in the packages that come in but I deviated to Plasma5 on the build kernel page of here guide just after kernel firmware and before the build. Pulled in the KDE meta package. Built kernel in single pass sending it to a usb stick. Drawbacks are that I may need to build another kernel with a few different switches to get the most of my ryzen hardware but that is fine. AKA I need to rebuild the kernel to send different command line arguments at boot time however this is nice. Straight LVM's with root home and swap. No boot partition or efi on top. Grub is avoided and i can use rEFInd if I need to look at something nicer at boot time. More setup to do but this is great! Solved!
Back to top
View user's profile Send private message
dkuchay
n00b
n00b


Joined: 01 Apr 2019
Posts: 7
Location: Schenectady, NY

PostPosted: Fri Apr 05, 2019 4:29 am    Post subject: Reply with quote

spoke too soon. rebooted to a read only filesystem. Remounted everything under the usb media on an attempt to fix but after sending the rslave mount commands the error would indicate that /mnt was not there. Then I tried to ls /mnt/gentoo. LS is not installed was the next error. All commands from that point failed.

Erased all partitions and started over for round five. Interestingly I rebooted to a different linux usb and I had kernel panic. That stick was in place for months with no hint of error. Rebooted to windows as the error indicated I had an issue with one of my my cpu's. Booted to windows, ran performance test. Saw consistent numbers.

Got as for as the rslave mounts on a reboot getting ready to chroot but commands disaapeared again as well as my mounted volumes. Not sure whats going on but after 5 tries I think I am going to give up on gentoo. Been playing with linux for 20 years now but there are too many fail points. I have tried this over the last 7 days straight.

Based on the fact that I was following wiki instructions and the issues with installing I think I am going to give up on gentoo. Didnt like the hardware problem report. Loved the efi stub kernel possibilities but this was a complete waste of time.
Back to top
View user's profile Send private message
nativemad
Developer
Developer


Joined: 30 Aug 2004
Posts: 911
Location: Switzerland

PostPosted: Fri Apr 05, 2019 2:17 pm    Post subject: Reply with quote

Sounds like your usbstick has problems, as commands usually do not disappear... :roll:
I guess you just tried too much for a gentoo newcomer.
Also, just reinstalling upon any failure isn't getting you anywhere. Try to fix the issues at hand and you'll learn much more on how to handle your system.
I would recommend to follow the handbook and do a plain and easy install to a spare disk or even (another) usb.
From there you should be able to prepare the machine for your end-setup easily, as you can just copy the whole compiled system around - See the many threads here about changing harddrives with rsync or similar.
That way you could experiment with luks, lvm, efi whatever, and still have your working install...

Cheers
_________________
Power to the people!
Back to top
View user's profile Send private message
dkuchay
n00b
n00b


Joined: 01 Apr 2019
Posts: 7
Location: Schenectady, NY

PostPosted: Mon Apr 08, 2019 10:10 pm    Post subject: Reply with quote

Thank you to all Gentoo Developers and community members (especially Sakaki!) I finally got this working.

While this was an advanced configuration I did have to restart the guide several times and in the end it was due to only partially accurate information in the wiki.

That being said my hardware is 4-5 weeks old. Asus Tuf FX505DY. Ryzen 3550H with Rx560X DGPU. This is EXEPECTED!

To share from my notes:

f2fs was the first deviation I took from Sakaki's guide. 3 times in a row I rebooted to a read only file system and was not able to remount as rw. On try 4 I figured there was something up with f2fs.

Gentoo wiki: https://wiki.gentoo.org/wiki/F2FS

Funtoo wiki:https://www.funtoo.org/F2FS_Install_Guide

Neither of these pages really described what was needed. On try 4 I was able to remount rw and immediately want to /proc/mounts to look:

Code:
/dev/mapper/vg1-root  /  f2fs   rw,lazytime,relatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix 0 0


By putting the above code snippet in my /etc/fstab while chrooted via live usb on a repair effort I was able to reboot to a rw filesystem for the first time on gentoo. My NVME is a Samsung 960 Evo Pro 512GB.

Again, the wikis led me to an improper config for f2fs.




Ryzem3550 CPU:

https://wiki.gentoo.org/wiki/Ryzen

https://wiki.gentoo.org/wiki/AMD_microcode

Both of these should be modified for 3550H hardware

While i built the img for the amd microcode and moved to the the /boot directory (chroot) if I followed the ryzen gentoo guide I was left with a kernel that would not boot.

On 3550H I needed to leave the firmware loading withing /drivers/gereral options blank. The wiki explains that discovering processor family and aiming at that firmware file through the firmware loading interface was needed. Only until I left this blank and let cpio hooks discover did I get a bootable kernel.

Thinking back I forgot to set compiler flags on my first two runs. This resulted in a 14 hour compile time for my first world sync. Well by the next day the usb media had updated on the gentoo site and I hadnt noticed. Sakakis guide aims at the latest stage 3 tarball and I may have been on a previous usb media. You were close developer. It was a difference in usb boot media versus the stage 3 tarball that I was downloading that led to my other restarts. I'm injured, out of work and on a lot of painkillers. Kind of surprised that I got this and figured where it went sideways. Apologies to all for any attitude or frustration that I showed up to this point. Again, thank you to the Gentoo community!
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