libera/#devuan/ Thursday, 2024-08-29

cakebanditI have a question about sysvinit. So I am working on a headless server with cryptsetup-initramfs, dropbear stuff. Well anyways I have a problem at boot but that not the problem, I was shocked when I hooked up my hdmi cable and the screen says press enter for maintenance or ctrl-d to continue. If I press enter I am in root without needing a password. How do I remove maintenance mode? I think it might be in /etc/inittab? Lets just say I want to02:39
cakebanditcolocate my server, Im not real sure the best way to turn off tty and leave shh on.02:39
cakebandit*ssh, I know the line I need to put in rc.local to turn off the hdmi itself, but I would like to disable the physical serial ports and the maintenance mode.02:41
cakebanditIf I press control + D it will ask for user name and password.02:42
rrqthat maintenance mode is in the initrd init; not actyally a sysvinit thing04:00
rrqcheck the init scripting of initramfs-tools, and also how cryptsetup-initramfs injects itself into there04:02
rrqmainenance mode is before root filesystem is mounted04:04
rrqcakebandit: ^^^04:04
fluffywolfwhat is this, and why is it crashed?04:10
fluffywolf27547 ?        S      0:00 /bin/sh /usr/lib/apt/apt.systemd.daily lock_is_held04:10
fluffywolf27577 ?        S      3:05 apt-get -qq -y update04:10
fluffywolfalso, why does that look like automatic updates somehow got enabled when upgrading to daedalus, and I absolutely do not want automatic updates?04:13
rrqagree totally. such are the things coming with the bath water as devuan tries to remain just "debian without systemd" and not asserting any QA control of any other aspect of debian packages04:20
rrqI do believe automatic upgrades remain disabled by default, but those dev's involved in it have chosen to rearrange the plumbing04:22
rrqI think in this case it's towards adding a control attachment from systemd to apt's "unattanded upgrades" "feature" (which some people find useful, I believe)04:26
fluffywolfsomething seems to be starting "apt.systemd.daily", and when it does it, apt-get is hanging (note long cpu usage time) and holding the lock file and breaking apt until I kill it.04:26
fluffywolflooks like a cronjob04:27
* fluffywolf kills04:27
rrqI think it's some /etc/cron*/* script04:27
fluffywolfI absolutely do not want apt doing ANYTHING daily, or any other time other than when I tell it to do something.04:28
fluffywolfand am most pissed that this got enabled without being asked04:28
* onefang wonders which cron script?04:30
onefangapt-compat, now what is that for?04:31
fluffywolf /etc/cron.daily/apt-compat04:31
onefangSNAP!04:31
onefangI mean the card game, not the package type.04:31
fluffywolffortunately?  it doesn't actually WORK, so it hasn't been upgrading anything, just hanging.04:32
* onefang slaps an exit at the top of that script, and worries about it later.04:39
fluffywolfLOL, that's exactly what I did too.  :P04:40
onefangSNAP!04:40
rrqor compile "int main(){return 0;}" into an /nocanodo binary, and insert that after the ! of the first line04:41
rrqnocando04:42
onefangI have my own cron scripts for regularly checking for updates, and doing things like debsums.  Actual upgrades and updates are manual though.04:42
fluffywolf#!/bin/false04:42
rrqyeah04:42
onefangBeat me to it.  lol04:42
fluffywolfor maybe true to make cron not complain, don't remember04:43
rrqshould be /bin/true, since the return code is of meaning04:43
onefangBut the debsums checks will remind me I exit'ed that script.04:43
fluffywolfbrb04:43
onefangLine 355 of /usr/lib/apt/apt.systemd.daily says that auto update is enabled by default, so you have to disable it, instructions for that are at the top.05:11
fluffywolfI don't like things being installed that do unwanted behaviors automatically by default.05:12
onefangThat script is part of the apt package.05:12
onefangThose instructions work at least.05:13
onefangPut 'APT::Periodic::Enable "0";' into /etc/apt/apt.conf.d/10periodic05:14
onefangOr just leave exit at the to. of the cron script.  B-)05:15
fluffywolf /etc/apt/apt.conf.d/20auto-upgrades:APT::Periodic::Update-Package-Lists "1";05:16
fluffywolf /etc/apt/apt.conf.d/20auto-upgrades:APT::Periodic::Unattended-Upgrade "1";05:16
fluffywolflooks like the default is definitely on05:16
onefangI don't have those files.05:17
fluffywolf... according to the debian wiki, the tool to turn them on and off is part of the gnome desktop.05:19
onefangBut now I have their contents, only with "0".05:19
onefangWont help on my server.  lol05:19
fluffywolfI could swear the installer asked me if I wanted it, and I said no.05:20
fluffywolfspecifically, what you get when you run dpkg-reconfigure unattended-upgrades05:20
onefangI install with a script I wrote, which now has these changes.05:20
onefangWhat I'm wondering is if this has been running all this time, how come I'm not seeing anything actually upgraded?  All the stuff I decided to leave not upgraded yesterday is still not upgraded.  It's enabled, but buggy?05:23
fluffywolfyeah.  it's buggy.  lol05:24
fluffywolfI've never seen anything automatically upgrade...  but now I know why sometimes there's a hung apt-get holding the locks.05:24
onefangShould be disabled now, on both desktop and server.05:24
onefangI didn't even have unattendend-upgrades installed.  lol05:32
fluffywolfodd, I got its configure when installing...  but you said you were doing custom installs.05:33
fluffywolfI don't know how it got changed to on, when I selected no.05:34
onefangYep, it's not installed coz I don't want it, and nothing dragged it in as a dependency.05:34
fluffywolfthis one was rare because it was voice coil, and was super, super fast.05:35
fluffywolfgrr, wrong window05:35
fluffywolfhitachi still makes a very great gadjet; they just refuse to put their name on it.  :P05:37
fluffywolfgrr, also wrong window05:37
* fluffywolf is talking in #hardware at same time05:38
onefangDamn hitachi wrong windows, no wonder they wont put their name to it.05:38
cakebanditokay thanks rrq08:34
freaxehhi09:28
freaxehi'm getting a lot of events on mdadm --detail09:28
freaxehhttps://paste.debian.net/hidden/485395d1/09:29
freaxehi just upgraded the motherboard which was kernel panicing the OS all of the time09:30
freaxehthe old motherboard was09:30
freaxehI'm now using a sas controller instead of the onboard sata ports...09:30
freaxehthe drives are seagate ironwolf 8tb so i'm not expecting any problems with them... could it have been the old motherboard causing these events?09:36
freaxehbrand new drives09:36
adhocfreaxeh: what are the time stamps ?09:56
freaxehadhoc: timestamps? where do I find that?09:57
adhocin your paste above the "update time" is 201009:57
adhocbut the create time is 2024 ... ?09:58
adhocunlikely to have had 8TB drives in 201009:58
* adhoc is a little confused09:58
freaxehhmm the bios might be set incorrectly09:58
freaxehin fact it probably is09:58
freaxehi'll reboot the system and set the time correctly09:58
adhocmight pay to look at your NTP config?09:59
adhocmake sure it is using at least three pool servers09:59
adhocor a local stratum 1, etc10:00
adhocget your time close, use ntpdate to set it from a known good external gps server and then use ntp to maintain good time10:00
adhocif the time is out that much, could explain it whinging about it in its log, the events ?10:01
freaxehi checked the bios time and its correct10:01
adhocsaying things are in the future...10:01
adhocoh10:01
freaxehbut that doesn't mean that it wasnt set correctly before i booted devuan10:01
adhocyou have ntp running ?10:01
freaxehyes10:02
adhocexcellent =)10:02
freaxehchrony actually10:02
adhocoh10:02
adhoci need to read up more on that10:02
* adhoc uses ntpd to grab the 1PPS from GPS10:02
freaxehnods10:03
adhochmm .. is GPL210:03
freaxehthe time was slightly off, saying it was 8am instead of the local time which is 6:03pm10:03
freaxehi corrected it in the bios10:03
freaxehits showing the correct update time now10:04
freaxehwell... tomorrow its showing, friday the 30th, today is thursday the 29th10:04
adhochada look at the output of chronyc ?10:04
adhochttps://chrony-project.org/examples.html10:04
adhocmight give you some clues10:05
freaxehthe output seems correct10:05
adhocnice =)10:05
freaxehSystem time     : 0.000043512 seconds fast of NTP time10:06
adhocthat seems acceptable =)10:06
adhocyou have more than one server upstream in your config ?10:06
adhocah excellent; "4. Server using reference clock on serial port"10:06
gnarfacefreaxeh: usually what you actually want to do is set the bios to UTC time, then tell NTP that, so it can maintain the time correctly even if you change timezones10:06
freaxehthanks for that gnarface10:07
gnarfaceno problem10:07
adhocyes10:07
freaxehi only have one server, 0.au.pool.ntp.org iburst10:08
freaxehbut its a pool10:08
* adhoc nods10:08
cakebanditI think I need to change this line in /etc/inittab  ---> ~~:S:wait:/sbin/sulogin --force    <--- to disable automatic root login, I want the system to require authentication upon booting into single-user and maintenance modes.10:58
CueXXIIIdoes your root account have a password? otherwise sulogin would not allow you to log in11:03
cakebandityes it does, thats why I am shocked11:08
CueXXIIIhm, so you were still in the initrd when it asked you?11:09
CueXXIIIfluffywolf: it was running "apt-get update", not upgrade. that command only updates the list of available packages in the repository, it leaves the actual packages alone11:11
cakebanditSo I am working on a setting up a encrypted system that gets unlocked remotely. It uses cryptsetup, dropbear, initramfs, but anyways if there is a error in the /etc/fstab, when I plug in a hdmi cable, it says press enter for maintenance or ctrl+d to continue. Enter takes me right to root with no password.11:12
CueXXIIIah, both /etc/init.d/checkroot.sh and checkfs.sh start sulogin --force in case there's an error…11:16
CueXXIIIseems to be non-conditional, so you need to edit those files11:17
cakebanditIf I press control+d I am asked to login. So in maintenance mode, if I type: runlevel -it comes back as unknown and most service do not start. Full root. I bet this gets overlooked allot becuase google searches do not pull much info up.11:17
cakebanditThx Cue11:18
CueXXIIIwhat happenes when you run "sulogin --force" yourself?11:18
cakebanditas a user ---> bash: sulogin: command not found11:19
CueXXIIIno, must be run as root11:19
CueXXIIIor just sulogin without --force11:19
cakebanditPress Enter for maintenance11:20
cakebandit(or press Control-D to continue):11:20
CueXXIIIok, so your root account does not allow login with password, it seems11:20
cakebanditEnter - I change to root from user with sudo11:20
gnarfacefreaxeh: sorry, correction, i think you actually tell the tzdata package about the bios being in UTC time, with "dpkg-reconfigure tzdata" or maybe "dpkg-reconfigure -plow tzdata"11:23
freaxehgnarface, ok thanks11:24
freaxehit sounds correct11:25
cakebanditI guess it is explained in- man sulogin  -so should I just remove --force from  /etc/inittab  ---> ~~:S:wait:/sbin/sulogin --force11:31
cakebanditit also states: Only use the -e (--force) option if you are sure the console is physically protected against unauthorized access.11:33
onefangSo --force means you need an armed guard at your console.  Seems appropriate.11:57
rrqcakebandit: the "S" runlevel is a sysvinit thing, and that's after the initrd init has pivoted. I understood you were talking about the intird init's maintenance mode which it enters hen the root filesystem needs fsck12:16
rrqthat stage is before sysvinit init has started, and inittab is not in play. You might want to change it as well, though.12:18
rrqotoh it all is only protected by the disk encryption key; having that and physical access is enough to bypass any "root can't login" barrier.12:22
cakebandityes, this week I want to lock it down the best I can, high on the list is to disable the serial and uart stuff, maybe disable the usb as well.12:38
cakebanditI am making a tutorial that is pieced together from others, so when I finish I can share the url where I posted it.12:39
rrqmmm don't forget about netconsole, iscsi, pxe, nbd and the such...12:51
rrqstill, only the disk encryption password is of significance; the rest are "Micky Mouse" security (IMO of course)12:53
cakebanditThanks very much for your advice, I just did- cat checkfs.sh | grep force  -and I see it too12:53

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!