/srv/irclogs.ubuntu.com/2021/01/22/#ubuntu-server.txt

cathodehi all, i'm trying to rescue a ubuntu server machine that is bricked after upgrading from 18.04 to 20.04 (grub error) and booting from the livecd just dumps me into the installer process, how do i boot into the actual livecd environment?00:59
sarnoldiirc there's a menu entry in the upper right hand corner01:00
sarnoldor you could ctrl+alt+f2 etc01:00
cathodeah nice. thanks01:00
=== denningsrogue5 is now known as denningsrogue
neilduganHi, I am trying to get a lxc client to work with a dnsmasq server... The problem I am having is that when a 'router' dhcp option is sent to the client a default route isn't being setup... please have a look at https://pastebin.pl/view/8613605305:30
TJ-neildugan: what does the lxc client show in its logs? is it true LXC or an LXD container?05:42
TJ-neildugan: I'd be looking at the netplan-generated network config at /run/systemd/network/ and the log "journalctl -u systemd-networkd"05:43
neilduganTJ-, it was create as a LXD container.05:43
TJ-neildugan: that makes it easier, you've a PDI1 init system insinde05:44
TJ-errr, PID 1 even05:44
neilduganTJ-, I re-enabled the dhcp-option 3 in the dnsmasq conf. file ... there is more data in https://pastebin.pl/view/602e7f1605:54
TJ-neildugan: where's the client getting its IPv4 address from (192.168.128.3) --- because that isn't inside the dnsmasq range 192168.128.200-25405:59
TJ-neildugan: I suspect that might be part of the issue05:59
neilduganTJ-, this particular client is to be a server I have a 'dhcp-host' setup to always set the IP to 192.168.128.306:04
TJ-neildugan: i didn't see that in the pasted dnsmasq config06:06
TJ-neildugan: well, the issue seems to be at the client side. I suspect something is removing the default route as soon as its applied - seen that a few times where systemd-networkd has conflicting configs or both it and NetworkManager are operating06:07
neilduganTJ-, the setup if 'dhcp-host=database,192.168.128.3,infinite'06:07
neilduganTJ-, I will check for a conflict06:08
neilduganTJ-, "dpkg --get-selections | grep network-manager" doesn't indicate the network-manager is installed06:11
tewardTJ-: i'mma go to sleep now, but will check my pings in the morning - did that systemd generator you linked me also generate the corresponding service files too as well as the mounts?  Or, is there a way to write such a generator for a specific 'class' of service?06:12
TJ-teward: mine generates mounts and automounts - you'd need to extrapolate on the concept for service units06:18
TJ-neildugan: but what is systemd-networkd logs showing?06:18
tewardTJ-: shouldn't be too hard, I already have working mounts (and the corresponding 'template' a generator would need), and unlike LVMs, they're on-system .img files so I'm probably not going to have the same problem as your LVM issue.06:19
tewardi'll dig forward on that front to make this a more automated system but since i have the mounts made manually for my needs as well I think I'm good.06:19
tewardthanks for sharing that by the way :)06:19
teward</offline for requisite sleep>06:19
neilduganTJ-, syslog has the following lines "networkd-dispatcher[201]: No valid path found for iwconfig" and "networkd-dispatcher[201]: No valid path found for iw"06:29
neilduganTJ-, there is no wireless network on this client.06:30
neilduganTJ-, I just created a new vm "lxc launch ubuntu:20.04 testing" and it has the same problem!06:36
neilduganTJ-, so it doesn't appear to be a configuration that I accidentally changed06:37
TJ-neildugan: sounds like it is something to do with the way you've got the LXC network profile set up06:47
TJ-neildugan: with LXC's default network (lxbr0) it operates its OWN COPY of dnsmasq for starters06:48
neilduganTJ-, I just tried using the '"lxc launch ubuntu:18.04 testing" to see if that did anything different... it didn't still a problem.06:51
TJ-neildugan: is it using the default lxdbr0 network profile?06:51
neilduganTJ-, when I setup LXD I just told it to use an already existing bridge (br0) that I had setup... so I can bring these VMs into the production system easier... I will look into the network setup for lxc.06:53
TJ-neildugan: OK, so then there's a problem with your config somewhere if clients aren't accepting the gateway06:54
neilduganTJ-, a libvirt VM using the same bridge does setup correctly, with a default route.06:56
neilduganTJ-, do you think that the container privilege matter?07:10
ygk_12345hi all14:41
ygk_12345how to disable unattended security upgrades  through autoinstall for ubuntu 20.04 ?14:41
tomreynygk_12345: i'm not sure that's the best possible approach, but you could probably uninstall the package at the end of the installation process14:45
ygk_12345tomreyn as of now the installation is taking a lot of time due to these upgrades. I want to stop those at the time of installation itself14:46
ygk_12345not post installation14:46
ygk_12345is there a way to affect the install through autoinstall ?14:47
tomreynyou could also modify / set "packages" to uninstall the package, by setting it to "unattended-upgrades-"14:48
tomreyn(the trailing "-" should cause it to be uninstalled)14:49
ygk_12345tomreyn where exactly I have to define this ? which file ?14:49
tomreyni did not mean "post installation" originally, but "at the end of the installation", i.e. "late-commands". but this may not suffice for working around upgrades during installation.14:49
tomreynhttps://ubuntu.com/server/docs/install/autoinstall-reference14:50
ygk_12345tomreyn i need something to stop the unattended security from installing at all14:51
tomreynor this rather https://ubuntu.com/server/docs/install/autoinstall-quickstart14:51
tomreynwell, the installation is based on an image (with packages pre-installed), you can only modify it once the image is written to the installation location, which is also what the installer does.14:53
ygk_12345is the installer downloaded form the internet during the install ?14:54
ygk_12345I mean the subiquity installer ?14:54
tomreyndepends on what you choose. if you go with the one that's on the installer iso, then not, otherwise, if you choose to live update the installer, then it's downloaded, as a snap, and installed.14:55
ygk_12345tomreyn for an autoinstall, is the subiquity part of the iso files ?14:56
ygk_12345I mean where is this subiquity code stored ?14:56
ygk_12345is ti downloaded from the internet ?14:56
ygk_12345*is it14:56
rbasakIIRC, it's included in the image but there's an option to update from the Internet14:57
ygk_12345rbasak in which folder is the subiquiy stored in the ubuntu iso image when mounted ?14:58
ygk_12345can we search it ?14:58
ygk_12345i want to test if we can modify or is it hard coded ?14:59
rbasakIt's a snap, so I suspect it's not trivial to modify at runtime, if that's what you're asking. You'd have to unpack, or use "snap try", etc.14:59
rbasakI don't know if the implementation on the ISO is different to how snaps work normally.14:59
rbasakIt's all Free Software so ultimately you can view/modify everything of course, in the same way that Ubuntu developers do. It's just a question of how difficult it is in your particular circumstances.15:00
ygk_12345i want to search the subiquity code in the iso15:01
rbasakhttps://github.com/CanonicalLtd/subiquity15:02
rbasakThat'll be far easier than trying to examine the "built" subiquity on the ISO.15:02
ygk_12345rbasak I am interested t o know where these fies are stored in an iso. is it possible to search it ?15:03
rbasakI don't know, sorry. I'd have to look.15:03
znfhmm, so I'm trying to grow a RAID10 to RAID0 (I don't need the redundancy, data is easily replaceable)15:39
znfI've done:15:39
znfmdadm /dev/md3 --grow --level=015:39
znfwhich didn't really seem to work like expected, it ejected the mirror drives so it only kept half the drives as raid015:40
znfthen I read more, so I've done15:40
znfmdadm --grow /dev/md3 --raid-devices=22 --backup-file=/root/raid.bak --add /dev/sdo1 /dev/sdm1 /dev/sdk1 /dev/sdi1 /dev/sdw1 /dev/sdg1 /dev/sdu1 /dev/sde1 /dev/sds1 /dev/sdc1 /dev/sdr115:40
znfwhich goes trough a process of reshaping the array via a RAID415:40
znfwhich has finally completed after about ~10 hours15:40
znfbut now I'm "stuck" with a raid415:41
znfdo I just --grow to --level=0 again?15:42
znfthe answer was yes: just --grow16:41
asbachbHi. Is it normal that /sys/kernel/debug is loaded on server installations? It seems like it's just used for development purposes: https://de.wikipedia.org/wiki/Debugfs20:14
sarnoldasbachb: I don't have a 'clean' machine handy, I've probably run things that require it on all my machines, heh20:15
sdezielit is loaded by default AFAIK20:16
asbachbFound that: https://askubuntu.com/questions/954786/what-are-the-implications-of-disabling-debugfs-for-ubuntu20:16
sarnoldwell there it is, /lib/systemd/system/sys-kernel-debug.mount20:17
sarnoldasbachb: could you file a bug on this against the systemd package? this feels worth a conversation if this is really intentional / desirable / etc20:18
asbachbIf I get it right it's needed for ext4 fs checks.20:19
sarnoldhmm20:20
sarnoldit's got lots of neat uses but I didn't think any of them were *vital*20:21
sdezielKees Cook wanted to have it disabled back in 2011 https://lists.ubuntu.com/archives/kernel-team/2011-January/013418.html20:21
sarnoldyes that sounds like him :)20:23
sdezielit seems there was a general agreement to not have it mounted by default20:25
sdezielbut that was a long time ago. asbachb do you have a pointer to the ext4 fsck requiring this?20:25
asbachbsdeziel: Nah just that articale from 201120:25
sdezielasbachb: seems I can fsck.ext4 just fine without having debugfs mounted20:35
asbachbsdeziel: I guess e2fs contains debugfs which relies on debugfs mounts?20:40
sarnolddebugfs is definitely not needed for usual system use20:41
asbachbAny ideas how to at least deactivate it?20:41
sdezielmasking the .mount didn't work here20:42
sarnoldtry systemctl disable sys-kernel-debug.mount20:42
sarnoldo_O20:42
asbachbAh ok. It's mounted by systemd. Now I got it.20:44
sdezielhttps://paste.ubuntu.com/p/mxZyGWYtG7/ so masked but still mounted on boot, not nice20:48
asbachbsdeziel: Maybe a service which depends on that mount?20:50
sarnoldsdeziel: if you're up for another test... sys-kernel-debug-tracing.mount  ?20:50
sdezielsarnold: I could only find sys-kernel-tracing.mount which is equally refusing to be masked20:51
sdezielasbachb: in theory, masked units are not startable20:52
sarnoldsdeziel: hmm :(20:52
sdezielI'm testing with a lxd container so maybe there's some magic happening due to that20:53
sarnoldhmm. I'd kinda hope lxd containers couldn't mount it at all.20:53
stgraberthat could simply be because those are pre-mounted20:53
asbachbI guess it's premounted by lxd.20:54
asbachbAh stgraber faster. ^^20:54
stgraberjust checked and we indeed do pre-mount a bunch of things:20:54
stgraber»···»···"/proc/sys/fs/binfmt_misc",20:54
stgraber»···»···"/sys/firmware/efi/efivars",20:54
stgraber»···»···"/sys/fs/fuse/connections",20:54
stgraber»···»···"/sys/fs/pstore",20:54
stgraber»···»···"/sys/kernel/config",20:54
stgraber»···»···"/sys/kernel/debug",20:54
stgraber»···»···"/sys/kernel/security",20:54
stgraber»···»···"/sys/kernel/tracing",20:54
RoyK!pastebin20:55
ubot3For posting multi-line texts into the channel, please use https://paste.ubuntu.com | To post !screenshots use https://imgur.com/ !pastebinit to paste directly from command line | Make sure you give us the URL for your paste - see also the channel topic.20:55
asbachbThat's more or less my problem. I'm running an lxd container which tries to mount that sys-kernel-debug, but fails since it's cannot be remounted.20:55
RoyKstgraber: please20:55
stgraberRoyK: I wrote pastebinit, I know about it, thank you ;)20:55
RoyK!pastebinit20:55
ubot3pastebinit is the command-line equivalent of !pastebin - Command output, or other text can be redirected to pastebinit, which then reports an URL containing the output - To use pastebinit, install the « pastebinit » package from a package manager - Simple usage: command | pastebinit20:55
asbachbstgraber: Do you know the reason /sys/kernel/debug is mounted by default?20:56
stgraberthe reason why we have this logic in place in LXD is because unprivileged users aren't allowed to mount those, so an unprivileged container couldn't mount them. But some init systems (upstart at least) will fail to boot if they can't mount those.20:57
stgraberso instead LXD will pre-mount those things and then use apparmor to prevent actual use of those mount points20:57
sdezielon a physical machine, sys-kernel-debug.mount and sys-kernel-tracing.mount are mask'able20:57
stgrabersdeziel: right because on a physical machine, those are mounted by systemd, in a container, they're pre-mounted and systemd doesn't unmount things on boot20:58
sdezielindeed, now you've mentioned upstart being the reason for some of those FSes to be mounted by default. Upstart is probably no longer a concern, are you aware of other potential users of those?21:00
stgrabercentos 6 sure still is a thing21:04
sdezieloh, right upstart was a thing outside of Ubuntu21:04
stgraberyeah and even Ubuntu, 12.04 and 14.04 both have extended support so we can't really break them either21:05
asbachbstgraber: is it hard baked into lxd or can it be configured?21:06
stgraberit's hardcoded in LXD, you could use raw.lxc to clear it and set something else, but that will clear every single mount LXD does so you may run into some surprises21:07
asbachbstgraber: I see. Thanks.21:08
sdezielso back to the previous question: should it be mounted by default on a physical/virtual Ubuntu machine?21:14
sarnoldmy knee-jerk reaction is it ought to be available only when the admin wants it21:17
sdezielhttps://bugs.launchpad.net/ubuntu/+source/systemd/+bug/191285521:20
ubot3Launchpad bug 1912855 in systemd (Ubuntu) "debugfs shouldn't be mounted by default" [Undecided, New]21:20
sdeziel /sys/kernel/tracing is potentially also something that shouldn't be mounted by default21:21
sdezielhmm, tracefs was created to allow tracing without depending on debugfs due to its security implications ;)21:23
sarnoldthanks sdeziel21:25
sdezielI've only done the easy part ;)21:30
=== Napsterbater is now known as Guest4904
=== Napsterbater_ is now known as Napsterbater

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!