[07:06] 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] Airborne: probably, but without an error message or unexpected behavior, no one would know === MJCD is now known as ook === ook is now known as MJCD [20:13] 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@sturtz:~$ ping 1.1.1.1 [20:13] ping: connect: Network is unreachable [20:18] default route [20:18] ? [20:18] iptables OUTPUT rules? [20:18] (be sure to check both iptables-legacy and iptables-nft) [20:19] how do I chech the router? [20:20] "ip route" will show how routing is setup on this computer [20:20] 169.254.0.0/16 dev br-a4ad7a0ad07a scope link metric 1000 [20:20] 172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown [20:20] 172.18.0.0/16 dev br-a4ad7a0ad07a proto kernel scope link src 172.18.0.1 [20:20] 192.168.1.0/24 dev enp0s25 proto kernel scope link src 192.168.1.6 metric 100 [20:21] enp0s25 is my network device [20:28] Kilroy: please use a pastebin for pasting multi-line output in the future. [20:28] you seem to have no default route set [20:29] so your computer would not know where to send traffic to ip addresses / CIDRs not explicitly listed on this routing table [20:29] 1.1.1.1 is not explicitly listed there [20:37] ok [20:45] Ok I added a route and now I get this From 192.168.1.6 icmp_seq=1 Destination Host Unreachable [20:47] 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] what's the route you set / the routing table you have now? [20:50] 255.255.255.0 [20:51] that's an ip address, not a route [20:51] oh then what should I set it to? [20:52] i don't know what "it" is [20:52] the route [20:53] you probably want to set a *default* route [20:54] via your upstream gateway on the 192.168.1.0/24 network [20:54] on the enp0s25 interface [20:54] i am guessing this based on what you said so far [20:54] yea, how do I do that? [20:55] using the "ip route" command [20:57] the syntax is: ip route add default {NETWORK/MASK} dev {DEVICE} [20:57] or: ip route add default {NETWORK/MASK} via {GATEWAYIP} [20:58] like this ip route add 192.168.1.0/24 via 192.168.1.6 [20:59] 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] (and a different syntax than the one i provided abive) [21:00] ok [21:00] like this ip route add default 192.168.1.0/24 via 192.168.1.? [21:00] or would the 0 be 6? [21:00] I don't know what I messed up I did not change anything [21:01] you probably started docker or something [21:01] yea [21:01] I use dcoker [21:01] *docker [21:01] is that why I have 5 different devices? [21:02] i don't know what you mean there [21:02] do you mean network interfaces? [21:02] https://0bin.net/paste/LSGGhqWI#gHTuJMUwhYT7ariUPbi6jT+gmUyqjrf4jGekmcVS1rH [21:02] yea [21:04] i count 9 records there [21:05] docker most likely added the "docker0" interface, maybe the br-a4ad7a0ad07a interface, too [21:06] i'm not sure whether the veth* interfaces are from, but those are probably either docker guests or other virtual network interfaces. [21:06] can you paste your full `ip route` output? [21:07] enp0s25 and ens1 are probably physical network interfaces (ens1 is down) [21:07] lo is the loopback device [21:09] https://0bin.net/paste/YuL2TjeS#4cYnVYEe8hv1mUrHLTrAFc-T6zeEuLoFEJt+zYq3eHy [21:09] I don't know what the veth* are [21:12] those two default routes look wrong [21:12] 192.168.1.6 is a local ip, right? [21:12] 255.255.255.0 makes no sense, did you add that, or was it there already? [21:13] yea I added that [21:13] I thought that was the route [21:14] what system is this? ubuntu? what version? [21:15] ubuntu 20.04 [21:15] what do you have in /etc/netplan/*? [21:16] https://0bin.net/paste/+jVpLRMb#KmyH9gUSUwOmb+j-JncoJguQ62MLJzhGO1szKlZVclK [21:16] did you add the gateway4 to that first file? [21:17] and the other files? [21:17] I did not add it to the file directly, I have not touched the netplan files [21:18] can you paste the whole files? [21:18] that is all there is in then [21:18] that is all there is in them [21:18] you used tail [21:18] yea [21:18] it did not truncate the output to the last few lines? [21:18] nope [21:18] there is nothing there [21:19] /etc/netplan/00-installer-config.yaml should also start with "network:", like the one below [21:19] the output is truncated [21:19] do you know how tail works? [21:19] oh my mistake sorry [21:20] https://0bin.net/paste/BOhlHiaJ#lUAVgjpI8LnURmfDoT-/TyhDjIt8KYkixkt/gXXg0vW [21:21] is "version: 2" the last line, or is the output truncated again? [21:22] sorry, I have to feed the cats [21:22] 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] good luck [21:22] thanks, let me poke and screw around a bit more [21:23] thank you for your help ahasenack [21:23] and gateway4 is probably not "255.255.255.0", maybe that's your netmask [21:25] https://netplan.io/reference/ [21:30] ok I gtg, I am going to see what I have in backups [21:38] I have a potentially misguided goal of booting Ubuntu Server via PXE [21:38] 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] and then struggled [21:39] first issue was that I couldn't find any existing 20.04 server ISOs that don't immediately try to start installing [21:39] so my hope of a Live Server ISO was dashed [21:40] 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] 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] 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] there is a link someone pasted the other day [21:53] I think it was this: https://www.molnar-peter.hu/en/ubuntu-jammy-netinstall-pxe.html [21:54] for 22.04, but maybe relevant for 20.04 [21:58] awesome I'll give that a read, I'm not dead set on 20.04 it just seemed like a reasonable start [22:00] this documentation really ought to be here: https://ubuntu.com/server/docs [22:12] 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] or write it to disk and rebuild it on every boot, either way [22:15] 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] but desktop comes with a ton of junk so I'm trying to accomplish the same with server [22:25] 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] chkimes: maybe it's worth to discuss your use case more, so other approaches could be considered. [22:26] effectively DHCP + PXE in a datacenter context, lots of hardware that needs bootstrapping [22:27] 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] i think the classic approach there is to load userspace (/root) via nfs [22:32] 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] but so far I've been pretty unsuccessful at that [22:35] sorry, i meant /, not /root [22:35] and i don't have a recipe [22:40] reporting back, I was able to get somewhere finally [22:40] I've been messing with this since last night [22:40] Following these steps here to generate an ISO: https://github.com/mvallim/live-custom-ubuntu-from-scratch [22:41] I tried this route of using casper but it never quite worked [22:41] the trick was the ignore_uuid kernel param [22:41] linux (tftp)/vmlinuz.casper url=http://192.168.0.201/ubt2.iso ip=dhcp root=/dev/ram0 ramdisk_size=2000000 ignore_uuid [22:42] casper loaded my custom iso from the URL then brought me to a login screen [22:45] login prompt, I should say - I axed all the UI [22:53] don't forget to write a blog post if you happen to work it all out. [22:53] others will appreciate [22:59] any recommendation on where to post? I don't host a personal site or anything [23:00] 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] or just github pages or the like [23:42] I'm actually quite curious what that guy wanted to do - nfs root? [23:42] also, Hetzner publishes their installimage stuff https://github.com/hetzneronline/installimage