Struggling Newbie with ZFSBootMenu getting network in fresh Ubuntu install

I am extremely new to OpenZFS… well brand new. After recent 2.5 admins show, I decided to give ZFSBootMenu a try as I was migrating home servers anyways and upgrading systems so… I figured it would be a perfect time to start learning OpenZFS. I am not in a technical field by trade… just a home hobbyist that likes sovereignty over my own data. That is just to warn you about the level of technical skill that I actually possess. I followed the procedure for installing Ubuntu via the guide for ZFSBootMenu. At first I was trying 24.04 and everything went fine, except upon reboot I had no network despite same ethernet cable plugged into my computer as before. I know very little about configuring network interfaces so I made a couple of feeble attempts and then decided to start the whole process over again, this time before exiting the chroot, I installed ubuntu-drivers-common and ubuntu-server via apt and rebooted with fingers crossed… same thing.
So then I decide I am an idiot for not just using the version of ubuntu the guide was written for and proceeded to go through the whole process with 22.04 instead and the same steps running through the install twice and still getting no network.
I know there is probably something extremely obvious that I am missing as there are too many unknown unknowns for me (thanks D.Cheney for that term). There seems to be an assumed level of knowledge in the documentation that I simply do not possess. If any of you could be so kind as to nudge me in the right direction I would greatly appreciate it.

1 Like

My understanding is that 24.04 uses Netplan to manage networks and I have zero experience with that. Perhaps 22.04 does things “the old way” but I don’t have much experience with that either.

I have fiddled with Debian networking more than I really care to (and much prefer things that “just work.”) There is a description of network management at https://wiki.debian.org/NetworkConfiguration. Some of these (e.g. interfaces) are pretty basic and should work with Ubuntu as well.

Otherwise I suggest looking for similar resources for Ubuntu/Netplan.

Edit: Something else to consider is if your network devices even got created. The command ip addr should show something like:

root@trixi:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:5f:01:e3:49:98 brd ff:ff:ff:ff:ff:ff permaddr e4:5f:01:e3:49:90
    altname end0
    inet 192.168.1.46/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 215sec preferred_lft 215sec
    inet6 2601:249:1a80:22f0:e65f:1ff:fee3:4998/64 scope global dynamic mngtmpaddr proto kernel_ra 
       valid_lft 86238sec preferred_lft 14238sec
    inet6 fe80::e65f:1ff:fee3:4998/64 scope link proto kernel_ll 
       valid_lft forever preferred_lft forever
root@trixi:~# 

(You do not need to run this as root.) If you are using Ethernet, there should be a device named eth<*> or enp<*> or perhaps something similar. If you don’t see this try lspci to identify your Ethernet H/W and make sure you have the firmware for it if needed.

1 Like

Thank you so much for getting me on the right path! It turns out that there was no yaml in the netplan folder to apply to configure the network. I put in a simple config in there from the ubuntu documentation and then executed netplan apply and viola! everything works! I still feel like I may have missed some crucial step in the installation process that was assumed that I would know by the ZFSBootMenu documentation that caused this network issue… but hey! It gave me the opportunity to learn something new and now I have been through the installation process enough times I am getting more familiar with that too lol.

1 Like

You are entirely correct, and honestly I could probably have done a better job of differentiating the level of general OS expertise required for doing debootstrap installs. Essentially, the issue is that you’re getting an EXTREMELY minimal operating system when you begin with debootstrap: there’s no graphical desktop, the network isn’t pre-configured, and there are a couple of other papercuts.

If you’re already pretty familiar with the plumbing of linux distros in general, and your distro in particular, none of this is at all onerous to overcome: apt install ubuntu-desktop and boom, you got desktop; cd /etc/netplan and edit up a basic .yaml, and boom you got networking, etc etc etc. But if all you’ve ever done is started an install wizard and let it do its thing, then yeah, there’s going to be more work after you’re “done” than you expected.

We might want to do a follow-up on 25A and talk about common papercuts and how to overcome them, thank you very much for giving feedback here!

4 Likes

I’ll be looking for that episode. I’ve got zfsbootmenu on my to do list. So far, I’m loving what it does for my KVM situation. Thanks so much for sanoid, btw!

1 Like

I had forgotten about that part. I’m accustomed to following the instructions at https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Bookworm%20Root%20on%20ZFS.html Which 1) are for Debian and 2) do not cover ZFSBootMenu but do cover some of these ancillary topics. There is information for Ubuntu that might have been helpful had I thought to link it. https://openzfs.github.io/openzfs-docs/Getting%20Started/Ubuntu/Ubuntu%2022.04%20Root%20on%20ZFS.html#step-4-system-configuration

2 Likes

You didn’t know how little I knew to be fair hahaha! It was really fun and I learned a little more about ubuntu and linux along the way! I can’t wait to get into actually learning to use openzfs after getting everything set up. I have been “using” btrfs for awhile now and by that I mean that it was the format of my root drive but I had not gotten into digging into it at all and after so many times hearing how much better zfs is than btrfs… I figured that if I was going to put in the time to learn something, it might as well be something that much more experienced and knowledgeable people than I am recommend. I really appreciate your willingness to help me out. I had started to dig into netplan a bit before posting here but hadn’t really had the confidence that I was on the right track until you brought it up and after that it only took me minutes to find the issue and fix it. That system configuration link is amazing! Thank you! Great jumping off point for me to understand the system a bit better!

1 Like

I’m glad to be able to help. Like the great Canadian philosopher Red Green said, “We’re all in this together.”

And many thanks to Jim Salter for providing this forum where we can share.

2 Likes

I hit this issue recently. First the short version:

Run ip a to find your network devices:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> ...
  • lo is the local loopback interface.
  • The one starting with e (enp1s0 in the example) is the ethernet interface
  • If you have one starting with w it is probably wifi.

(Not cast iron rules, but right 99% of the time in my experience)

Create a file - /etc/netplan/99_default_network.yaml with the content below - adjusting it to name the network device you have found from the ip a output:

network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0:
      dhcp4: true

Then run

netplan apply

And you should be on the network. With the above file, the network will come up when the machine runs.

For more on netplan, the ubuntu server network docs are decent.

3 Likes

I had this similar issue. I first thought I had to get ubuntu-desktop installed first so I booted back into Ubuntu live partition to chroot and later figured out netplan yaml. I found Sithuk’s script to be much better as it did configure Ubuntu Desktop and networking. But some things like the browser still isn’t built in. So I installed Ubuntu normally, booted in and installed apt install zfsutils-linux and zfs-initramfs and booted back into the live USB. Then, I shrunk the partition, created a zpool using the guide but modified it for the partition (and changed compatibility to 2.2 rather than 2.1 as 22.04 has OpenZFS 2.2.x and I enabled SHA256 checksum) and rsynced all the files with rsync -avxHAXWS --numeric-ids from the old partition to the new. I configured the rest mostly based off of the guide. Since I installed alongside Bitlocker Windows and ensured encrypted ZFS, it worked well. I removed the swap image and didn’t create the swap partition as setting up encrypted swap was going to be annoying. Then I updated fstab and I installed ZFSBootMenu with rEFInd. Then, I used shim and added sbat to rEFInd installed from Ubuntu package and made it Secure Boot aware. I could create a guide if anyone is interested. But if you just want a script, Sithuk’s script works a lot more easily but you will be missing things like a browser. You can then snap or apt install firefox and likely other packages not installed as well.

1 Like

I suspect firefox is missing because Canonical installs firefox now as a snap. Unfortunately snaps still appear to be unable to be installed in a chroot environment. Bug report:

Until that issue is fixed or Canonical creates a workaround then there is a risk of missing packages with chroot based installs that will have to be manually installed from within the fresh install.

I’ve added the issue to the github readme for the install script.

2 Likes

I’ve now updated the script so that Canonical’s snap packages are correctly installed.

3 Likes

Thank you for publishing (and maintaining) your work!

1 Like