[07:06] <Airborne> Hey everyone I was pointed here from #ubuntu, I'm trying to set up an hdd on ubunutu server 20.04. I've followed various guides and forum post on formatting and mounting the drive and adding it to fstab without success. Anyone able to help me trouble shoot my issue(s)?
[13:59] <jrwren> Airborne: probably, but without an error message or unexpected behavior, no one would know
[20:13] <Kilroy> could I please have a hand fixing this error? I can ssh in but I just cant get out of my house with my server 
[20:13] <Kilroy> kilroy@sturtz:~$ ping 1.1.1.1
[20:13] <Kilroy> ping: connect: Network is unreachable
[20:18] <ahasenack> default route
[20:18] <ahasenack> ?
[20:18] <ahasenack> iptables OUTPUT rules?
[20:18] <ahasenack> (be sure to check both iptables-legacy and iptables-nft)
[20:19] <Kilroy> how do I chech the router?
[20:20] <tomreyn> "ip route" will show how routing is setup on this computer
[20:20] <Kilroy> 169.254.0.0/16 dev br-a4ad7a0ad07a scope link metric 1000 
[20:20] <Kilroy> 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
[20:20] <Kilroy> 172.18.0.0/16 dev br-a4ad7a0ad07a proto kernel scope link src 172.18.0.1 
[20:20] <Kilroy> 192.168.1.0/24 dev enp0s25 proto kernel scope link src 192.168.1.6 metric 100 
[20:21] <Kilroy> enp0s25 is my network device
[20:28] <tomreyn> Kilroy: please use a pastebin for pasting multi-line output in the future.
[20:28] <tomreyn> you seem to have no default route set
[20:29] <tomreyn> so your computer would not know where to send traffic to ip addresses / CIDRs not explicitly listed on this routing table
[20:29] <tomreyn> 1.1.1.1 is not explicitly listed there
[20:37] <Kilroy> ok
[20:45] <Kilroy> Ok I added a route and now I get this From 192.168.1.6 icmp_seq=1 Destination Host Unreachable
[20:47] <kenyon> you don't just add a route. if you don't have a route, it's probably because your network is misconfigured or doesn't have internet accesss
[20:50] <tomreyn> what's the route you set / the routing table you have now?
[20:50] <Kilroy> 255.255.255.0
[20:51] <tomreyn> that's an ip address, not a route
[20:51] <Kilroy> oh then what should I set it to?
[20:52] <tomreyn> i don't know what "it" is
[20:52] <Kilroy> the route
[20:53] <tomreyn> you probably want to set a *default* route
[20:54] <tomreyn> via your upstream gateway on the 192.168.1.0/24 network
[20:54] <tomreyn> on the enp0s25 interface
[20:54] <tomreyn> i am guessing this based on what you said so far
[20:54] <Kilroy> yea, how do I do that? 
[20:55] <tomreyn> using the "ip route" command
[20:57] <tomreyn> the syntax is: ip route add default {NETWORK/MASK} dev {DEVICE}
[20:57] <tomreyn> or:  ip route add default {NETWORK/MASK} via {GATEWAYIP}
[20:58] <Kilroy> like this ip route add 192.168.1.0/24 via 192.168.1.6
[20:59] <tomreyn> this adds a static route for destinations in 192.168.1.0/24 to be routed through 192.168.1.6. probably not what you want.
[20:59] <tomreyn> (and a different syntax than the one i provided abive)
[21:00] <Kilroy> ok
[21:00] <Kilroy> like this ip route add default 192.168.1.0/24 via 192.168.1.?
[21:00] <Kilroy> or would the 0 be 6?
[21:00] <Kilroy> I don't know what I messed up I did not change anything 
[21:01] <tomreyn> you probably started docker or something
[21:01] <Kilroy> yea 
[21:01] <Kilroy> I use dcoker
[21:01] <Kilroy> *docker 
[21:01] <Kilroy> is that why I have 5 different devices? 
[21:02] <tomreyn> i don't know what you mean there
[21:02] <tomreyn> do you mean network interfaces?
[21:02] <Kilroy> https://0bin.net/paste/LSGGhqWI#gHTuJMUwhYT7ariUPbi6jT+gmUyqjrf4jGekmcVS1rH
[21:02] <Kilroy> yea
[21:04] <tomreyn> i count 9 records there
[21:05] <tomreyn> docker most likely added the "docker0" interface, maybe the br-a4ad7a0ad07a interface, too
[21:06] <tomreyn> i'm not sure whether the veth* interfaces are from, but those are probably either docker guests or other virtual network interfaces.
[21:06] <ahasenack> can you paste your full `ip route` output?
[21:07] <tomreyn> enp0s25 and ens1 are probably physical network interfaces (ens1 is down)
[21:07] <tomreyn> lo is the loopback device
[21:09] <Kilroy> https://0bin.net/paste/YuL2TjeS#4cYnVYEe8hv1mUrHLTrAFc-T6zeEuLoFEJt+zYq3eHy
[21:09] <Kilroy> I don't know what the veth* are
[21:12] <ahasenack> those two default routes look wrong
[21:12] <ahasenack> 192.168.1.6 is a local ip, right?
[21:12] <ahasenack> 255.255.255.0 makes no sense, did you add that, or was it there already?
[21:13] <Kilroy> yea I added that 
[21:13] <Kilroy> I thought that was the route
[21:14] <ahasenack> what system is this? ubuntu? what version?
[21:15] <Kilroy> ubuntu 20.04
[21:15] <ahasenack> what do you have in /etc/netplan/*?
[21:16] <Kilroy> https://0bin.net/paste/+jVpLRMb#KmyH9gUSUwOmb+j-JncoJguQ62MLJzhGO1szKlZVclK
[21:16] <ahasenack> did you add the gateway4 to that first file?
[21:17] <ahasenack> and the other files?
[21:17] <Kilroy> I did not add it to the file directly, I have not touched the netplan files
[21:18] <ahasenack> can you paste the whole files?
[21:18] <Kilroy> that is all there is in then
[21:18] <Kilroy> that is all there is in them
[21:18] <ahasenack> you used tail
[21:18] <Kilroy> yea
[21:18] <ahasenack> it did not truncate the output to the last few lines?
[21:18] <Kilroy> nope
[21:18] <Kilroy> there is nothing there
[21:19] <ahasenack>  /etc/netplan/00-installer-config.yaml should also start with "network:", like the one below
[21:19] <ahasenack> the output is truncated
[21:19] <ahasenack> do you know how tail works?
[21:19] <Kilroy> oh my mistake sorry
[21:20] <Kilroy> https://0bin.net/paste/BOhlHiaJ#lUAVgjpI8LnURmfDoT-/TyhDjIt8KYkixkt/gXXg0vW
[21:21] <ahasenack> is "version: 2" the last line, or is the output truncated again?
[21:22] <ahasenack> sorry, I have to feed the cats
[21:22] <ahasenack> keep in mind we don't know your network, but my guess is that your default route should be 192.168.1.1
[21:22] <ahasenack> good luck
[21:22] <Kilroy> thanks, let me poke and screw around a bit more 
[21:23] <Kilroy> thank you for your help ahasenack
[21:23] <tomreyn> and gateway4 is probably not "255.255.255.0", maybe that's your netmask
[21:25] <tomreyn> https://netplan.io/reference/
[21:30] <Kilroy> ok I gtg, I am going to see what I have in backups
[21:38] <chkimes> I have a potentially misguided goal of booting Ubuntu Server via PXE
[21:38] <chkimes> I got all the DHCP mess stood up, started serving an EFI grub, stole the vmlinuz and initrd from my VM and put it behind TFTP
[21:38] <chkimes> and then struggled
[21:39] <chkimes> first issue was that I couldn't find any existing 20.04 server ISOs that don't immediately try to start installing
[21:39] <chkimes> so my hope of a Live Server ISO was dashed
[21:40] <chkimes> I flailed around with packing my own ISO and trying to boot into that, but I'm getting all sorts of busybox problems trying to chroot into it from the initramfs
[21:41] <chkimes> It should also be heavily emphasized that I have no idea what I'm doing and have gotten this far through furious googling
[21:41] <chkimes> so my questions are: how bad of an idea is this and should I give up and try a different path? what are some good resources or documentation to learn about how to accomplish this?
[21:53] <ahasenack> there is a link someone pasted the other day
[21:53] <ahasenack> I think it was this: https://www.molnar-peter.hu/en/ubuntu-jammy-netinstall-pxe.html
[21:54] <ahasenack> for 22.04, but maybe relevant for 20.04
[21:58] <chkimes> awesome I'll give that a read, I'm not dead set on 20.04 it just seemed like a reasonable start
[22:00] <tomreyn> this documentation really ought to be here: https://ubuntu.com/server/docs
[22:12] <chkimes> so in reading through the Jammy doc, it seems geared towards autoinstall - however my goal is actually to be as stateless as possible and run the OS from RAM
[22:12] <chkimes> or write it to disk and rebuild it on every boot, either way
[22:15] <chkimes> I think this is actually possible using casper to boot the desktop livecd iso, since it has a "try" option that doesn't install
[22:16] <chkimes> but desktop comes with a ton of junk so I'm trying to accomplish the same with server
[22:25] <tomreyn> wouldn't this "write 'the OS' to disk and rebuild it on every boot" be very inefficient? the iso images are stateless, of course, but this also means they age (software updates do not persist). and, maybe more important, they still contain a lot of data to start with, i.e. not just kernel and initrd.
[22:25] <tomreyn> chkimes: maybe it's worth to discuss your use case more, so other approaches could be considered.
[22:26] <chkimes> effectively DHCP + PXE in a datacenter context, lots of hardware that needs bootstrapping
[22:27] <chkimes> the goal would be to manage the boot images to match whatever we need, but I'm just trying to get to the point where anything works first
[22:31] <tomreyn> i think the classic approach there is to load userspace (/root) via nfs
[22:32] <chkimes> so I was figuring that I could load an initramfs, download a custom iso of my /root, mount it, then switch_root to it
[22:32] <chkimes> but so far I've been pretty unsuccessful at that
[22:35] <tomreyn> sorry, i meant /, not /root
[22:35] <tomreyn> and i don't have a recipe
[22:40] <chkimes> reporting back, I was able to get somewhere finally
[22:40] <chkimes> I've been messing with this since last night
[22:40] <chkimes> Following these steps here to generate an ISO: https://github.com/mvallim/live-custom-ubuntu-from-scratch
[22:41] <chkimes> I tried this route of using casper but it never quite worked
[22:41] <chkimes> the trick was the ignore_uuid kernel param
[22:41] <chkimes> linux (tftp)/vmlinuz.casper url=http://192.168.0.201/ubt2.iso ip=dhcp root=/dev/ram0 ramdisk_size=2000000 ignore_uuid
[22:42] <chkimes> casper loaded my custom iso from the URL then brought me to a login screen
[22:45] <chkimes> login prompt, I should say - I axed all the UI
[22:53] <tomreyn> don't forget to write a blog post if you happen to work it all out.
[22:53] <tomreyn> others will appreciate
[22:59] <chkimes> any recommendation on where to post? I don't host a personal site or anything
[23:00] <tomreyn> chkimes: hmm, no, not really, there sued to be debian-administration, but this is down now, and also this is really ubuntu specific. you could settle with community.ubuntu.com
[23:01] <tomreyn> or just github pages or the like
[23:42] <znf> I'm actually quite curious what that guy wanted to do - nfs root?
[23:42] <znf> also, Hetzner publishes their installimage stuff https://github.com/hetzneronline/installimage