Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

bootlogd and CONFIG_LEGACY_PTYS=y

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
15 posts • Page 1 of 1
Author
Message
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

bootlogd and CONFIG_LEGACY_PTYS=y

  • Quote

Post by figueroa » Mon Sep 13, 2021 4:32 am

Sometime between August 12, date of last good /var/log/boot, and now, bootlogd stopped working. I don't boot very often, usually just for kernel upgrades. I usually do watch the screen during boot to catch any errors, but I may have missed this on or about August 30 when I upgraded to the current kernel.

Error on boot was:

Code: Select all

bootlogd: cannot allocate psuedotty:
No such file or directory
I searched for that with duckduckgo and top entry was a nine year old solution: https://meta-freescale.yoctoproject.nar ... pseudo-tty

I'm running gentoo-sources 5.4.143 and have never configured CONFIG_LEGACY_PTYS=y in kernels going back to May versions of 4.9.240 and 4.19.160 and a few more recent 5.4~ also. However, setting that, recompiling, installing and rebooting led to a solution for me too.

I have a routine that includes makeoldconfig so my kernels are pretty consistent. Anyway, if bootlogd isn't working for you, maybe this solution will work for you too. I'm happy.

Comments welcomed and even encouraged.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Sep 13, 2021 6:19 am

does it work on the old kernels (saved it before recompiling) or was it some other system change?

CONFIG_LEGACY_PTYS is kind of ancient, don't think it should be necessary to use it anymore, perhaps something screwed up with udev? Would have thought that ptmx isn't working properly or /dev/pts isn't mounted early enough?
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Mon Sep 13, 2021 7:27 am

Nope. I've a working bootlogd, and CONFIG_LEGACY_PTYS is unset - just checked!
Greybeard
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon Sep 13, 2021 3:21 pm

I did have an eudev-3.2.10-r1 rebuild on August 16, and and upgrade to libgudev-234-r on September 9. I do know that setting CONFIG_LEGACY_PTYS caused bootlogd to work again, even though it being unset is clearly not what caused the problem.

I don't know what tail to chase. Any troubleshooting ideas would be helpful to me. Until then, I will do some trial and error, booting from an older kernel, 5.4.134, and then maybe migrate this machine to pure udev, and check and re-check results.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Sep 13, 2021 3:36 pm

You may well go to systemd-udev since it's suspect and probably should switch over anyway though I think it shouldn't be the problem now.

Key things is to make sure your /dev/pts is mounted before bootlogd starts. devfs in openrc should be started in sysinit, just need to make sure you run bootlogd after devfs is started.

Hope it's not because bootlogd doesn't have a dependency for devfs and it was just so happen to run before due to random luck, or perhaps it simply works better when it's in the boot runlevel instead of sysinit?
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon Sep 13, 2021 3:47 pm

Booting earlier kernels not containing CONFIG_LEGACY_PTYS didn't pan out. grep devfs /etc/init.d/bootlogd returns nothing. I think bootlogd should have a file in /etc/conf.d/ but it does not.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Mon Sep 13, 2021 4:15 pm

try /etc/conf.d/bootlogd :

Code: Select all

rc_need="devfs"
?

Not sure if this would be sufficient.

Else starting it in the 'boot' runlevel would be guaranteed to work.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon Sep 13, 2021 4:30 pm

Thanks eccerr0r, that's a few tools to try over the next couple of days. Will report back here.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Leonardo.b
Guru
Guru
Posts: 314
Joined: Sat Oct 10, 2020 9:24 pm

  • Quote

Post by Leonardo.b » Mon Sep 13, 2021 11:16 pm

bootlogd can be set in inittab, so it catches earlier output.

man bootlogd says it requires pty.
A bit terse, it's not clear to me what it means.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Mon Sep 13, 2021 11:38 pm

Leonardo.b wrote:bootlogd can be set in inittab, so it catches earlier output.
...
Curious what you mean by that? Can you make an example?
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Sep 14, 2021 1:16 am

Leonardo.b wrote:bootlogd can be set in inittab, so it catches earlier output.

man bootlogd says it requires pty.
A bit terse, it's not clear to me what it means.
As said, it can only be pushed up earlier in the flow so far, unless you're using CONFIG_LEGACY_PTYS. Without it, /dev/pts needs to be mounted before it can be started and pushing it later will allow it to reliably start.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Tue Sep 14, 2021 2:12 am

eccerr0r wrote:try /etc/conf.d/bootlogd :

Code: Select all

rc_need="devfs"
...
That worked.

Code: Select all

$ cat /etc/conf.d/bootlogd
# Config file for /etc/init.d/bootlogd suggested by eccerr0r on Gentoo Forums at https://forums.gentoo.org/viewtopic-p-8657398.html
rc_need="devfs"
Haven't discerned why it suddenly stopped. Mystery remains, but your rc_need="devfs" solution is golden.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Leonardo.b
Guru
Guru
Posts: 314
Joined: Sat Oct 10, 2020 9:24 pm

  • Quote

Post by Leonardo.b » Wed Sep 15, 2021 12:31 am

figueroa wrote:Curious what you mean by that? Can you make an example?
eccer0r's solution is simpler and more reliable.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Thu Apr 14, 2022 4:34 am

Following up on this topic. In an update to sysvinit (don't know which version), all of /etc/conf.d/bootlogd was commented out, bootlogd continued to work. I subsequently unset CONFIG_LEGACY_PTYS in the kernel (running gentoo-sources-5.10.109 currently).

I have the following in /etc/logrotate.d/bootlogd:

Code: Select all

/var/log/boot {
        missingok
        notifempty
}
which I find convenient.

For the most part, in spite of the manual (man bootlogd), bootlogd continues to be mysterious, but it is working here.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
C5ace
Guru
Guru
Posts: 517
Joined: Mon Dec 23, 2013 12:44 am
Location: Brisbane, Australia

  • Quote

Post by C5ace » Fri Jan 30, 2026 10:13 pm

To log the boot process to the end of poweroff view /var/log/boot~.

/etc/conf.d/bootlogd:

Code: Select all

BOOTLOGD_ARGS="-c -r -l /var/log/boot"

Code: Select all

rc-update add bootlogd sysinit
To test:
1.) delete /var/log/boot
2.) reboot the PC
3.) view current boot log /var/log/boot
4.) reboot the PC
5.) view current (new) boot log /var/log/boot
6.) view previous boot log /var/log/boot~
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 perl, python, C++, C#, Rust and the likes.
Top
Post Reply

15 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic