Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on a Dell Precision 7770
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
bschnzl
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2005
Posts: 94

PostPosted: Sun May 28, 2023 3:17 am    Post subject: Gentoo on a Dell Precision 7770 Reply with quote

*** Google is NOT your friend ***

27 May 2023
UEFI Boot and System Install
Maintain M$ Windows Install

Initial Linux booter - Pentoo 20230526

Specs
  • BIOS - Dell 1.9.1 20230109
  • CPU - i7-12850HX
  • HAL - 10.0.22621
  • RAM - 64 GB
  • DISK - 10TB (10^12)


Guides:
  • https://wiki.archlinux.org/title/Dual_boot_with_Windows
  • https://www.xda-developers.com/dual-boot-windows-11-linux/
  • https://wiki.ubuntu.com/UEFI/SecureBoot
  • https://code.google.com/archive/p/pentoo/wikis/UEFI.wiki (way out of date)


Recieved Machine -
https://www.makeuseof.com/windows-11-set-up-without-internet-connection/
  • - "You can bypass the Let’s connect you to a network screen using the
    Code:
    OOBE\BYPASSNRO
    command in the Command Prompt."
    -
    Code:
    taskkill /F /IM oobenetworkconnectionflow.exe

  • Reboot, login
  • Attach network, enable access to Microsoft
  • Exercise hardware (sound, net, video)
  • Run Updates
  • Review msinfo32,exe


Download "Daily Build" from Pentoo
https://www.pentoo.ch/downloads/

Built bootable USB "Thumb" Drive with "Rufus" (Ubuntu)
"Persistant Partition" 5 GiB
Code:
        Number  Start   End     Size    File system  Name                 Flags
         1      1049kB  10.2GB  10.1GB  fat32        Main Data Partition  msftdata
         2      10.2GB  15.5GB  5369MB  ext3         Linux Persistence

Code:
        "SELECT" Pentoo ISO
        +5GB "Persistant Partition"
        GPT "Partition Scheme"
        Check "List USB Hard Drives" - Multi?
        Volume Label (Read from ISO)
        FAT32 File System - 4K "Cluster Size"
        Check "Quick Format", "Create extended label and icon files"
        Hit "START"



I have several 240W AC Power Supplies. The BIOS is set to "alert" on detection. I get an option to enter BIOS on each restart. There is a check box and BIOS reconfigure option. YMMV.

From "Power Off"
Insert Thumb Drive to "Thunderbolt" Port (Right Side)

Enter BIOS
Re-order Boot Drives - Thumb Drive First
Code:
                "Boot Configuration"
                Local Drive will have NVMe
                Thumb Drive will have Brand Name ^^^ push to the top
                * Scroll down *
                Toggle "Secure Boot Mode" to "Audit Mode"

You "must" apply changes before exit
I also disbled the camera and the microphone

Sometimes BIOS will not pick up the thumb drive - just exit and try again. Stay out of other settings!

I have to admit: I used the windows disk manager to shrink the C: drive. I'm soo lame! I left 150GB for 'doze. I recommend rebooting into 'doze after shrinking to be sure!

Boot Pentoo Grub
I opt'd for the embedded NVidia VGA card. The Pentoo drivers do not support this card (???). The only option that boots is "no binary drivers". This option verifies the hashes.
Code:
`mount /dev/nvme0n1p3 /mnt/here`
returned "mounted read only"! Windows Hibernated!?! WTF over!
Go into windows and run the disk maintenance tools.

You can edit the command line in grub [Esc].
If you need more help:
https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/
Scroll to the "Making Temporary Changes to a GRUB 2 Menu" header.

Original Boot Commannd:
linux /boot/pentoo init=/linuxrc nox nodhcp nobindrivers secureconsole overlayfs max_loop=256 dokeymap video=uvesafb:mtrr:3,ywrap,1024x768-16 console=tty0 net.ifnames=0 scsi_mod.use_blk_mq=1 ipv6.autoconf=0 usbcore.usbfs_memory_mb=0 looptype=squashfs loop=/image.squashfs cdroot verify

remove the "verify" at the end (at least)

You will want a network:
Code:
modprobe e1000e
(or your installed NIC driver)
Code:
dhcpcd eth0
(or what udev named your NIC in ifconfig)

mount /dev/nvme0n1p3 /mnt/here` returned "mounted read only"! Windows Hibernated!?! WTF over!
Go into windows and run the disk maintenance tools.

Wow - they took the install guide off the menu bar...
https://wiki.gentoo.org/wiki/Handbook:Main_Page
I installed an openrc system.

Create your partitions - GParted formats them for you!
mount them where they go -
Code:
        `mkdir usr var opt home tmp`
        `mount /dev/nvme0n1p6 /mnt/gentoo`
...
Write your fstab

And from here the handbook picks up. I won't duplicate.

Excuse me if this is reduntant. Obviously I haven't built a new machine in a while. I found lots of "build USB Key" docs in the Gentoo Documentation Search. This was AFTER I had Pentoo booted! I hate SEO too...

I do not intend to encrypt any partitions. My defense-in-depth covers. I do intend to refer to https://www.funtoo.org/Secure_Boot to register the TPM Crypto into the machine. I was entertaining ideas of Big Brother finally defeating my need to own my stuff. THANK YOU Gentoo for giving us our machines back!

enjoy!
_________________
Persistance Pays
Back to top
View user's profile Send private message
bschnzl
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2005
Posts: 94

PostPosted: Tue May 30, 2023 7:05 am    Post subject: Gentoo on a Dell Precision 7770 Reply with quote

OK! So, now I'm logged in!

I want to thank Hu (again) for finding a dropped minus in my emerge --info. FWIW, this is my first EFI desktop machine. Wait 'til I take it to work!

I wont recount issues where I dropped a character, or left a leading slash. I still have to get X running. I may get to that point, and restart from scratch when I have one under my belt! That's Gentoo!

rEFInd was used to manage the EFI stuff. I don't suppose that is the Gentoo thing to do, but it was in the repo! I saw it in a forum post. It is easy and open. rEFInd scans the boot partitions on all block devices. Toward the end, I did not even have to bring up the F12 "Boot Options" menu. rEFInd found my stick and offered it in the menu. If I do go to GRUB, it will be because I cannot get the kernel command line to stick.

I need a root, raid, net.ifnames and ipv6.autoconf statement, at least. I'm sure I don't have to tell this crowd why.

The OS's seem like they fight over who gets to boot the machine. I don't have proof. Windows and Gentoo still boot when I tell them to.

The elephant is the kernel. I believe I started with gentoo before genkernel. In any case, I've always done my own kernels. This was the first on that I used the firmware packages. Dmesg says its easy. I did have to slow it down and increase the verbosity.

I usually do:
Code:
make -j9 && make modules_install


It failed! It said nothing about why! Now what?
Code:
make -j24 V=1 | tee ./kbuild.log && make V=1 modules_install | tee kmodi.log


Except that tee dies 0, and the && gets fooled! Toss in 24 threads and you get a rats nest. I told you I wouldn't bore you with leading slashes. I lied! The command above gives you a build log. I literally got down to:

Code:
# make V=1 -j 12 2>&1 | tee ./kbuild.log
# make V=1 modules | tee kmod.log
# make V=1 modules_install | tee kmodi.log


I borrowed Pentoo's config.gz. I used it on Gentoo-Sources. It didn't boot. It boots the "Live Stick" reliably - every time. It probably had something to do with being "Live". That did not give me confidence in my own work, following the handbook. I'd rather troubleshoot my own work, mainly because I'm gonna have to anyway.

I did find a utility to read MS logs on Pentoo! app-editors/sublime-text is masked for ~amd64 and license. It works! I'm thinking of getting a license. Thanks guys - for all your work!

Jumping back, I increased rEFInd's log verbosity - because why not. I used Sublime Text to read them. But then I saw logs in my chroot!!! That means my kernel booted enough to mount the disks. The dreaded "Black Screen"!

I left my FrameBuffer as a module! The option I needed was hidden by M !Y. Gotta love menuconfig! Zip Zap Compile and I didn't even need the build logs. I had a login prompt! What were those passwords?

I hope this helps someone! It's worth it if you work it.

enjoy!
_________________
Persistance Pays
Back to top
View user's profile Send private message
bschnzl
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2005
Posts: 94

PostPosted: Fri Jun 02, 2023 7:34 pm    Post subject: Reply with quote

Boom!
Blender worx! I guess its time to update this. Xen is next!

I am truly standing on the shoulders of giants! The view is awesome! Thank you all!

First - I split package.use into two files: files and multi. I put all the abi stuff in multi. To wit:

/etc/portage/package.use/files
Code:
sys-kernel/linux-firmware compress-xz
sys-firmware/intel-microcode hostonly
sys-boot/refind ntfs
app-emulation/xen efi flask
app-emulation/xen-tools api ovmf -ipxe
sys-devel/binutils multitarget
app-admin/gkrellm hddtemp ntlm
media-video/mplayer aalib rtmp xinerama -dvd -dvdnav
media-libs/freetype brotli
media-video/ffmpeg jpeg2k theora vpx opus openal sndio
app-admin/sudo -sendmail
app-editors/vim vim-pager
sys-process/htop caps delayacct
mail-mta/postfix mbox sasl
media-libs/libvpx postproc
sys-fs/ntfs3g ntfsdecrypt
dev-libs/xmlsec gcrypt
media-gfx/blender jemalloc jpeg2k valgrind openal
gnome-base/gvfs archive fuse


/etc/portage/package.use/multi
Code:
x11-drivers/nvidia-drivers abi_x86_32
media-libs/libglvnd abi_x86_32
x11-libs/libX11 abi_x86_32
x11-libs/libXext abi_x86_32
x11-libs/libxcb abi_x86_32
x11-libs/libXau abi_x86_32
x11-libs/libXdmcp abi_x86_32


1. I have clobbered files twice so far with > redirects. I had to rebuild it from the history file.
[*]That works on a fresh install. I can tell you that it won't work in a year when I do it when adding something I need!
2. Xen is not built yet! It is running on everything else I have.
3. Most of the above were "demands" by portage to add flags to move forward.

emerge --info:
https://pastebin.com/dJe9qE2Y

First, rEFInd works beautifully - so far. I'll definitely address this once Xen is running. It holds and makes available the kernel boot command parameters wonderfully without the "abstraction" layer. My parameters are:
Code:
"root=/dev/nvme0n1p6 net.ifnames=0 ipv6.autoconf=0 raid=noautodetect intel_idle.max_cstate=0"


The binary corporate nvidia drivers are working! nvidia-drivers wants to be multilib. So far, that is it. Look at "multi" above to see which libraries need the 32 bit abi's.

/etc/conf.d/display-manager has replaced /etc/conf.d/xdm. I suppose that is more clear. If you want something that is really "clear" look at powershell. Do you hear me? Does that color the value of "clarity" at all? It just showed up when I installed xorg-drivers and slim (x11-misc, TYVM). Oddly enough, those two did not pull the rest of xorg! How Gentoo!

emerge xorg-server xfce-meta resulted in a GUI. I had to add dbus (with display-manager) to the default runlevel to get slim to appear at boot. X is quite useless without a window manager. I also added fluxbox and JWM. They started. They were clean. They ran firefox as it sat in XFCE. When you start X as a user, you get .local/share/xorg/Xorg.0.log.

I need xterm and gentoolkit. xterm is taste. gentoolkit completes portage. Learning software can be rough.

So... Once I had xterm, it was time to move data. I started looking at sparse files. Then I started to transfer them with tar and netcat. Thats gonna take about a week... n'ver mind. I also applied my current variation of syslog-ng.conf...

I do not have xrandr or mesa yet. It tool some doing to figure out why Blender was freezing on every start. Oddly, pulseaudio was taking more CPU than Blender in top when it was frozen. That was a rabbit hole.

DRM has to work to get Blender running. My big hurdle was
Code:
AIGLX error: unable to load driver i965

in Xorg.0.log. The solution was to create /etc/X11/xorg.conf.d/20-intel.conf. I did mkdir xorg.conf.d; vi 20-intel.conf
Code:
Section "Device"
        Identifier "Intel Graphics"
        Driver "modesetting"
        Option "AccelMethod" "glamor"
        Option "DRI" "iris"
EndSection

I have honestly never had an Xorg.0.log look so clean at install. Great job dev's.

I also added the full measure of IPMI to the kernel - which needs ACPI. That I found in dmesg, which led to forums across many distro's, and the NVidia wiki page. I wish I'd made it easier.

Code:
cat /proc/mtrr

still has "uncachhable" areas.

PYTHON_SINGLE_TARGET does fine on 3.11.

I also rebuilt
Code:
media-video/ffmpeg +openal
gnome-base/gvfs fuse


The intel_idle.max_cstate=0 may or may not play a role. It's still there!

So... onto Xen! Stay Tuned!
_________________
Persistance Pays
Back to top
View user's profile Send private message
bschnzl
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2005
Posts: 94

PostPosted: Sun Jun 04, 2023 3:29 am    Post subject: Gentoo on a Dell Precision 7770 Reply with quote

All Day long...
There are worse ways to spend a Saturday!

So far we have:
1. Booted Linux on a UEFI system...
- Leaving a running remnant of the factory installed Windows
- Ready to install Gentoo
2. Installed Gentoo base system
- With a custom Kernel
- Booting to a GUI login
3. Enabled the dual graphics monstrosity
- running Blender (the 3d Modeller)
- Loading the firmware

Today, we boot xen VMs originally built on an i7-4810MQ (2014?)

You probably dont have a zoo full of old VMs. But if you do, Gentoo will still support them!

First! Boot that fancy fully graphical environment on the xen hypervisor. The instructions here were enough to get me by. The wiki has you jumping around in the config menu. I actually read an article that had screen shots of xconfig. For me, the keyboard is far more deliberate. When you need to be sure, you want deliberate. Some of the prompts have changed and moved. You'll have that in Gentoo.

I missed
Code:
CONFIG_BRIDGE_NETFILTER
(Bridged IP/ARP packets filtering)

I also had bridging as a module. I saw a lot "load module x" instructions in other distro's. If the kernel is going to boot on the hypervisor, I think it's just cleaner to build them all in. If you leave network bridge support as a module, the netfilter support won't build in.

I was able to make rEFInd work! I'll give a shout out to Qubes here (https://www.qubes-os.org/doc/uefi-troubleshooting/). Yes... my /boot partition is formatted in FAT! I'm giving in to the Borg! But darn it, I paid for another copy of Windows! That only adds to the uncountable number of reasons to build unlimited virtual Doze boxen - especially because I build them to demo fixes! </rant>

The folks at Qubes gave us an invaluable peek into the dev process. They also repeated:
Code:
mapbs=1
noexitboot=1


I spent a fair amount of time making the xen hypervisor boot. rEFInd will find the xen-4.16.4-pre.efi file by its extension. It will ignore it's own configuration file. It still finds that configuration in the bare linux option. You will need a xen-4.16.4-pre.cfg like so:

Code:
[global]
default=gentoo

[gentoo]
options=sched=credit flask=disabled loglvl=all
kernel=vmlinuz root=/dev/nvme0n1p6 net.ifnames=0 ipv6.autoconf=0 raid=noautodetect intel_idle.max_cstate=0 intel_iommu=on vpmu=arch,bts
mapbs=1
noexitboot=1


I made a new directory (xen) and moved all of the xen copies into it. I copied the kernel and firmware (intel-uc.img) into the xen directory. Being FAT - there are no links! The xen-4.16.4-pre.cfg file MUST be in there too. It almost seems that there is too much going on to have xen and rEFInd booting from the same directory.

It will pause before booting the hypervisor. My linux kernel did not find the disks the first time. But it did put out a message every minute from the NVME driver. I powered off and powered on and it booted to Slim. Then it started Blender on the hypervisor (Dom0).

I almost posted this then!

But xen was not fully working! I found a script to view a diff of dmesg:
Code:
#!/bin/bash

# dmesg-diff
#  Kieran Bingham 2016
#  Public Domain
#
#  Strip out Linux Kernel timestamps when performing a diff on two dmesg files
#
#  Initial version as proof-of-concept, but already useful.
#  This could be extended to parse extra flags for diff for example
#  Uses bash temporary stream extensions to save creating tempory files

# Usage
#  dmesg-diff file1 file2

FILE1=$1
FILE2=$2

STRIP_TS='s/^\[[[:space:]+[:digit:].]*\]//'

# http://stackoverflow.com/questions/15841223/diff-while-ignoring-patterns-within-a-line-but-not-the-entire-line

diff -y -W 225 \
        --label=$FILE1 <(sed $STRIP_TS $FILE1) \
        --label=$FILE2 <(sed $STRIP_TS $FILE2)

Thank you Kieran!

It pointed me toward IOMMU and FLASK and passthru. I was getting an error from xl.

Code:
...console_xswait_callback ... timed out.


I searched for "console_xswait_callback" and every search engine claimed no results! Have I mentioned that I hate SEO? I want my hacker tool back!

I even got quick about connecting my vncviewer to the VM. I saw "The guest has not initialized the display (yet)" on a black screen.

I did learn a lot about virtualization, like Citrix no longer supports PV! You can imagine my surprise at the solution! Everyone kept saying virt-manager! I looked into it. 47 Packages and 156 MB of new code. The package "needs":

Code:
sys-firmware/ipxe
sys-firmware/seabios-bin
net-dns/dnsmasq
app-emulation/qemu
app-emulation/libvirt


Well yeah! Of course it worx! If you can't tie a good knot...
I'm sure there are a lot of dev's here who put a lot of time into these - but I've never run libvirt. Why should I now!

The qemu thing caught my eye. On my old system, the xenqemudev service seems optional!

Code:
/etc/init.d/xenqemudev start

returned a green OK! - and started xenconsoled. rc-config add anyone?

Code:
xl create /etc/xen/sand.hvm

and my quick vnc method popped up the systemrescue ISO! startx brought up the systemrescue gui!. Next, my ten year old vm booted Win7!

And with that - Thank you to all the Gentoo Dev's - even those who work on stuff I don't want!

I'm sure there are some issues here that are obvious to some! Please feel free to add your solutions here!
_________________
Persistance Pays
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