Re: Failed to netboot NBD rootfs
On Thu, Feb 06, 2025 at 04:07:28PM +0100, Thomas Pellegatta wrote:
> Hello,
>
> I can’t find any solution on the internet so I’m reaching you by email.
>
> I’m trying to achieve netboot on one of my devices. To do so I made a
> dedicated image:
>
> truncate -s 10G debian-nbd.img
>
> mkfs.btrfs debian-nbd.img
>
> sudo mount -t btrfs -o loop debian-nbd.img /mnt
>
> rsync -avPAHXxe path/to/existing/debian/rootfs /mnt
>
> sudo umount /mnt
>
> Then I created a NBD conf /etc/nbd-server/conf.d/diskless.conf:
>
> [node]
>
> exportname = /path/to/debian-nbd.img
>
> And I edited /etc/nbd-server/config:
>
> [generic]
>
> user = root
>
> group = root
This misses an includedir option:
includedir = /etc/nbd-server/conf.d
Without that option, your "diskless.conf" is ignored, and thn obviously
the export is unknown.
Also, using the root user is the default, but I don't recommend it. It's
safer to use a non-root user and to grant read/write permissions for the
file you're trying to export.
--
w@uter.{be,co.za}
wouter@{grep.be,fosdem.org,debian.org}
I will have a Tin-Actinium-Potassium mixture, thanks.
Reply to: