From d40a4eb13c8437292a1557eca868c31f87b4d15d Mon Sep 17 00:00:00 2001 From: dongdigua Date: Tue, 20 Dec 2022 07:10:52 +0800 Subject: [PATCH] new post: fix tty after f37 upgrade --- org/cheatsheet.org | 2 + org/fix_tty.org | 96 ++++++++++++++++++++++++++++++++++++++++++++++ posts.md | 1 + 3 files changed, 99 insertions(+) create mode 100644 org/fix_tty.org diff --git a/org/cheatsheet.org b/org/cheatsheet.org index 61c9701..4a74b4f 100644 --- a/org/cheatsheet.org +++ b/org/cheatsheet.org @@ -99,6 +99,8 @@ git log --stat | perl -ne 'END { print $c } $c += $1 if /(\d+) insertions/;' git log --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' git show :1:file # 1common 2ours 3theirs + +git rebase --committer-date-is-author-date #+END_SRC * Shell diff --git a/org/fix_tty.org b/org/fix_tty.org new file mode 100644 index 0000000..67ee5c9 --- /dev/null +++ b/org/fix_tty.org @@ -0,0 +1,96 @@ +#+TITLE: [Custom Kernel] Fix TTY after Fedora 37 Upgrade +#+DESCRIPTION: Xanmod + +* What Happened +After switching to f37, something changed: +- [[https://dongdigua.github.io/wayland#dm][sddm]] don't work +- sway don't have environment variables +- v2rayA don't start automatically + +but those are not vital. +One day I wanted to login to tty, it just stuck. However, default kernel works. +I wonder how~ I wonder why~ + +But before this, I noticed some other scenario: +- old f36 kernel and kernel built on f36 won't boot +- newly built kernel don't have startup screen with fedora logo +- when I added a new kernel, the grub select the f37 kernel by default + +I didn't take them seriously, until my kernel goes wrong as above. + +How to fix that? is there any suspicious config I added? +So I rolled back to an older version of my config but still don't work. + +* Ask for help +I think I can't solve this, +therefore, I asked for help at =#kernel= on libera.chat +(weechat is really great... to have English-only chat) + +@@html:
@@ +@@html:chat log@@ +#+BEGIN_SRC text + hello, I made a custom kernel, but I cannot switch tty + thats not usually a kernel problem. + but if I switch to fedora default kernel, it work + did you include everything your init system uses/needs? + its your init that needs to spawn the other tty getty's / logins + so systemd or whatever init system youre using + what getty need to include? + ok i guess i said im wrong there, it can be either + if you use the same userspace with both kernels, the next thing to check is the configs + /boot/config-* or /proc/config.gz + maybe there are differences there that explain the different outcomes + there is a diff tool in the scripts directory too, much better than normal diff + diffconfig + digua, which distoro kernel did you replace? + fedora to xanmod + i think some need stuff in the initramfs to get the muti tty stuff too + o I noticed one thinig in dmesg + digua, doesnt fedora use plymoutth or smoeting in the ramdisk normally .. you may want to pull apart your old initramfs and look in there too + when I switch tty, dmesg says something about rfkill + rfkill is radio on/off + so wifi or bt or whatever + tdr, plymouth is the fedora logo support? i don't have that in my kernel + does it have an impact on tty? + depeneds what do with or around it + there's no solid rules of what is done where or how, as long as requirements are met for + + tdr, so I checked both initramfs, and I only found intel microcode, so now the problem isn't at initramds + you didnt unpack it the right way + if dracut made it, there are 2 parts + i use cpio -idv < file + digua, https://www.thegeekdiary.com/centos-rhel-7-how-to-extract-initramfs-image-and-editview-it ... the skipcpio method + digua, /usr/lib/dracut/skipcpio | zcat | cpio -ivd + lsinitrd also works to see whats there without doing much else + thanks, I thought it can't contain only microcode :) + it can be a chamber of "secrets" easy enough + jn: hmm + + I'm back! after a noon of compiling with ealier config + but tty STILL don't work, I think the f37 upgrade breaks it + tdr, so I think it's not my config issue :-| + hrm i'd be cautious saying a distro released/tested kernel breaks your boot. not saying its impossible, but i'd also try their stock config. + specifically, their kernel and initramfs pair together. before opening a bug with them + I remembered, when I upgraded to f37, the f36 kernel and kernel build on f36 all don't boot, so maybe I need to config based on the f37 default? + building with f37 config works fine, and I will reconfigure based on it :) + tdr, thank you for your generous help +#+END_SRC +@@html:
@@ + +Yeah, there *is* something that changed after f37 upgrade +and I'm still using the config I modified based on f36 one! + +So I grabbed the f37 config at =/boot= and replaced =.config=, +then, without any modification, compile it. + +/*It fucking worked!!!*/ +also the startup logo (plymouth) + +The next step is to find out what is really going wrong... + +* Thought +The book /Absolute OpenBSD/ says people should *not* build a custom OpenBSD kernel, that's right for OpenBSD. +Because it's application and kernel are together, +and it have the magical [[https://man.openbsd.org/config.8][config(8)]] to modify the kernel biniary. + +For Linux user, it's still good to have a configured kernel. diff --git a/posts.md b/posts.md index 75716d1..af09d30 100644 --- a/posts.md +++ b/posts.md @@ -1,5 +1,6 @@ ## Table of Contents ### Posts (sorted by time) +- [Fix TTY after Fedora 37 Upgrade](fix_tty)
- [狗日的腾讯会议](damn_tencent_meeting)
上网课有感而发 - [New Blog Architecture](new_blog_arch)