Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
1
answers
1985
views
Booting mfsBSD via PXE with UEFI
I'm trying to boot mfsBSD ISO via PXE on a host with UEFI boot enabled. It was a pretty simple task with BIOS boot, the ipxe config for this task looked like this: kernel --name freebsd http://pxe.host/memdisk initrd http://pxe.host/mfsbsd.img imgargs freebsd harddisk raw boot Since memdisk way is n...
I'm trying to boot mfsBSD ISO via PXE on a host with UEFI boot enabled.
It was a pretty simple task with BIOS boot, the ipxe config for this task looked like this:
kernel --name freebsd http://pxe.host/memdisk
initrd http://pxe.host/mfsbsd.img
imgargs freebsd harddisk raw
boot
Since memdisk way is not supported with UEFI boot method and it seems like there is no other way to boot mfsBSD directly, I switched to booting GRUB2 first:
kernel --name grub2 http://pxe.host/grub2.efi
boot
So now I'm trying to boot an mfsBSD ISO from there, here's how my
I've tried changing
grub.cfg
looks like:
insmod efinet
insmod tftp
insmod loopback
insmod iso9660
insmod ufs2
insmod part_msdos
insmod gfxterm
insmod vbe
menuentry "mfs12.1.iso" {
set isofile=(tftp)/mfs12.1.iso
loopback loop $isofile
echo "ISO mounted"
set root=(loop)
kfreebsd /boot/kernel/kernel.gz
echo "kernel loaded"
kfreebsd_loadenv /boot/device.hints
kfreebsd_module /boot/kernel/ahci.ko
echo "ahci.ko loaded"
kfreebsd_module /mfsroot.gz type=mfs_root
set kFreeBSD.vfs.root.mountfrom="ufs:/dev/md0"
echo "set kFreeBSD.vfs.root.mountfrom"
set kFreeBSD.mfs_type="mfs_root"
echo "set kFreeBSD.mfs_type"
set kFreeBSD.mfs_name="/mfsroot"
echo "set kFreeBSD.mfs_name"
set kFreeBSD.mfsbsd.autodhcp="YES"
echo "set kFreeBSD.mfsbsd.autodhcp"
}
Unfortunately, the boot hangs every time with no information on screen:

kFreeBSD.vfs.root.mountfrom
to "cd9660:/dev/md0"
with no result, tried different mfsBSD versions and also built an EFI-enabled ISO using this solution: https://github.com/mmatuska/mfsbsd/pull/100
Is there anything I am missing in this setup? I would greatly appreciate any help.
Konstantin Kelemen
(31 rep)
Jan 20, 2020, 03:27 PM
• Last activity: Jul 21, 2025, 08:06 PM
0
votes
1
answers
2022
views
PXE boot times out after initial set up
When i boot my RHL vm into pxe mode by changing it to boot from the network, the connection times out From the sequence i read of the PXE process described [here]https://docs.oracle.com/cd/E24628_01/em.121/e27046/appdx_pxeboot.htm#EMLCM12199[4] it seems the dhcp server is not replying to the request...
When i boot my RHL vm into pxe mode by changing it to boot from the network, the connection times out
From the sequence i read of the PXE process described [here]https://docs.oracle.com/cd/E24628_01/em.121/e27046/appdx_pxeboot.htm#EMLCM12199
it seems the dhcp server is not replying to the request.
The DHCP server is on the same instance as the TFTP service and the DHCP service works to provide IPs to the VM's themselves. TFTP service wasnt running but i started it and got the same error.
Is there any other information i might provide to get an answer?
here is a screenshot of the first error and also the dhcp reference when i tried to use the dhcp command in the pxe menu:
Update:
the dhcp server is assigning an IP now. I know this because the net0: IP is in the range of the DHCP service.
So, the error is referencing nothing to boot but i have the pxelinux.0 file in the correct location and the DHCP tftp configuration is set to. Not sure what the problem is now.
Update 2 This continues to evolve as i apply different solutions. I found other users with the same error had applied the Oracle Virtualbox extension pack because this is required for the PXE usage. I think this resolved one issue and exposed another. After installing that extension pack to my Virtualbox install i now get a TFTP open Timeout:
i checked the status of the tftp server with systemctl status tftp.socket and it shows active.
Not sure where the disconnect is now.





colonuts panics
(13 rep)
Dec 21, 2018, 08:15 PM
• Last activity: Jun 21, 2025, 04:06 PM
0
votes
1
answers
131
views
PXE reading the file name incorrectly
I’m setting up a PXE boot environment using a DHCP server and a Realtek RTL8168 NIC (bulit-in ethernet on my mainboard). I’ve configured DHCP Option 67 to send the boot file name (netboot.xyz.efi), but during the PXE boot process, the client is displaying the file name with a single weird character....
I’m setting up a PXE boot environment using a DHCP server and a Realtek RTL8168 NIC (bulit-in ethernet on my mainboard). I’ve configured DHCP Option 67 to send the boot file name (netboot.xyz.efi), but during the PXE boot process, the client is displaying the file name with a single weird character. This results in boot failure (file not found).
My PXE server is using
Here is my router configuration, it is a Huawei HG8145V5-20 (modified firmware by ISP).
Edit: This looks like a firmware bug. I give up.
tftpd-hpa/noble,now 5.2+20150808-1.4build1 amd64
I've verified that in the tftp root directory, netboot.xyz.efi
existed (downloaded from [netboot.xyz](https://netboot.xyz/downloads))

dhcptest v0.7 - Created by Vladimir Panteleev
https://github.com/CyberShadow/dhcptest
Run with --help for a list of command-line options.
Listening for DHCP replies on port 68.
Sending packet:
op=BOOTREQUEST chaddr=BD:2E:47:6A:89:7C hops=0 xid=8B6211E2 secs=0 flags=8000
ciaddr=0.0.0.0 yiaddr=0.0.0.0 siaddr=0.0.0.0 giaddr=0.0.0.0 sname= file=
1 options:
53 (DHCP Message Type): discover
Received packet from 10.0.1.1:67:
op=BOOTREPLY chaddr=BD:2E:47:6A:89:7C hops=0 xid=8B6211E2 secs=0 flags=8000
ciaddr=0.0.0.0 yiaddr=10.0.1.68 siaddr=0.0.0.0 giaddr=0.0.0.0 sname= file=
8 options:
53 (DHCP Message Type): offer
54 (Server Identifier): 10.0.1.1
51 (IP Address Lease Time): 60 (1 minute)
1 (Subnet Mask): 255.255.255.0
3 (Router Option): 10.0.1.1
6 (Domain Name Server Option): 1.1.1.1, 1.0.0.1
66 (TFTP server name): 10.0.1.5
67 (Bootfile name): netboot.xyz.efi


Choomai
(1 rep)
Apr 6, 2025, 04:41 AM
• Last activity: May 12, 2025, 12:17 PM
1
votes
2
answers
1338
views
How to boot OpenWRT FROM PXE?
I have downloaded OpenWRT files for PC from [OpenWRT site][1]. I have installed `DHCP` and `TFTP` (in my LAN) and can boot (other) kernels from them. Now I want to boot these OpenWRT files. I wrote in PXE config DEFAULT minimallinux SAY Now booting Minimal Linux... LABEL minimallinux MENU LABEL Mini...
I have downloaded OpenWRT files for PC from OpenWRT site . I have installed
DHCP
and TFTP
(in my LAN) and can boot (other) kernels from them.
Now I want to boot these OpenWRT files.
I wrote in PXE config
DEFAULT minimallinux
SAY Now booting Minimal Linux...
LABEL minimallinux
MENU LABEL Minimal Linux
KERNEL vmlinuz
INITRD rootfs-squashfs.img.gz
It boots, loads kernel, then loads image, then starts boot printouts and finaly crashes with kernel panic and reboots
VFS:Cannot open root device "(null)" or unknown-block(0,0): error-6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown un-blokc(0,0)
I also tried
KERNEL vmlinuz
APPEND initrd=rootfs-squashfs.img.gz boot=live toram=rootfs-squashfs.img.gz
and some other combinations but failed.
Any hints appreciated :)
Dims
(3425 rep)
Aug 23, 2019, 06:21 PM
• Last activity: Apr 28, 2025, 05:43 PM
-1
votes
0
answers
64
views
setting up PXE and DHCP server on RHEL VM
So I am trying to setup a kickstart server with pxeboot and dhcp server (for ks) on RHEL 8 VM. When I capture network traffic I do not see any pxe/tftp traffic coming to the VM or the host.... I tried following: host: RHEL 8.10 kickstart server: RHEL 8.10 VM client: RHEL 7 physical host on other sub...
So I am trying to setup a kickstart server with pxeboot and dhcp server (for ks) on RHEL 8 VM. When I capture network traffic I do not see any pxe/tftp traffic coming to the VM or the host....
I tried following:
host: RHEL 8.10
kickstart server: RHEL 8.10 VM
client: RHEL 7 physical host on other subnet using pxeboot
on server side, I opened ports as follows on kvm host and VM both:
# firewall-cmd --add-service dhcp --perm
# firewall-cmd --add-service tftp --perm
# firewall-cmd --permanent --new-policy tftp-client-data
# firewall-cmd --permanent --policy tftp-client-data --add-ingress-zone HOST
# firewall-cmd --permanent --policy tftp-client-data --add-egress-zone ANY
# firewall-cmd --permanent --policy tftp-client-data --add-service tftp
# firewall-cmd --reload
All config is on KVM VM acting as kickstart server. Only reason i included/mentioned KVM host in this post is - I suspect we need some config there too... I am not sure.
dhcp and tftpserver service is enabled and running just fine.
dhcp.conf file has 2 subnets defined. 1 for local VM (to get the dhcp server up and running) and one for client. (If you do not have subnet for dhcp server itself server will not start)
When I boot the client with PXE boot option. I can see it is waiting for pxe / tftp server but I do not see any traffic on the host or VM. and eventually client times out.
from client:
What can I check on host and VM side?
Thank you.

Rajeev
(256 rep)
Apr 24, 2025, 11:33 PM
• Last activity: Apr 25, 2025, 04:02 PM
0
votes
0
answers
22
views
FAI, PXE & multiple network interfaces - exclude all but one
A class of Linux machines we maintain/build has up to 8 network interfaces, all but one aren't connected in the build phase. I'd like to speed up the build process by telling the initrd to ignore all but the connected one, but can't seem to find kernel parameters to add to the boot options to do so....
A class of Linux machines we maintain/build has up to 8 network interfaces, all but one aren't connected in the build phase.
I'd like to speed up the build process by telling the initrd to ignore all but the connected one, but can't seem to find kernel parameters to add to the boot options to do so.
The PXE part is not the problem, it's the intrd probing all interfaces so it can then pull down the base image via NFS and then proceed w/ the actual install on the target machine. We'll look into hiding the interfaces from BIOS (as Marcus suggested), even though then having to wait through 2 lengthy POSTs extra probably defeats the purpose (making the turn around time shorter).
Can anyone think of a different approach to avoid the lengthy wait for each present nic to time-out on net boot?
tink
(7648 rep)
Mar 15, 2025, 08:43 PM
• Last activity: Mar 15, 2025, 09:25 PM
1
votes
2
answers
324
views
Booting working linux image UEFI / PXE / GRUB
I am trying to set up a server to boot opensuse-15.5 via PXE on an UEFI environment and GRUB2. I found [this](https://www.suse.com/c/step-by-step-instructions-for-building-a-multiple-architecture-opensuse-leap-pxe-server/) tutorial for Suse that worked quite well. I've got a client getting an IP add...
I am trying to set up a server to boot opensuse-15.5 via PXE on an UEFI environment and GRUB2.
I found [this](https://www.suse.com/c/step-by-step-instructions-for-building-a-multiple-architecture-opensuse-leap-pxe-server/) tutorial for Suse that worked quite well.
I've got a client getting an IP address, downloading few files from the TFTP on the same machine, and I also have a NFS server set up.
The issue is, every tutorial I found seems focus on installing a new OS in the client, and that is not what I need.
What I do need, is for a very basic, minimalist OS to be loaded in order to be able to run few commands from the terminal. Nothing else. I don't need to load a Live image or run an installer.
Following the instructions in the tutorial I get to the point where the client fails connecting to the repositories to start installing the OS.
What I did after that, was to replace the *initrd* and *linux* images for those I got from an OS installation in the same client I am trying to boot. Also, I made an image of the root file system in the client (the same installation) and placed it in the server, in order to make it accessible through NFS.
After this, the result was that the client loaded *initrd*, then *linux*, but it stopped before finishing at a point where it's (probably) trying to set up the graphics card. The line mentions *drm and i915* (Apologies, I don't have the client in front of me right now but I will update with the right message tomorrow).
I am not even sure of the linux image I have to load and the parameters I have to pass to GRUB in order to make it all work. I've been trying to understand from the GRUB's manual and other sources, but I've got more questions than certainties.
Can anybody tell me...:
which commands should I add to *grub.cfg* (and which ones should I get rid of)?
which linux image should I use?
and probably any source of information that come to mind?
Thanks very much for your time.
Gabs.
EDIT: The crashing point had nothing to do with graphics/drm/i915. The last message displayed (for about a minute) would show **graphics/drm/i915** but the issue would actually be immediately after that, at **dracut initqueue hook**. As far as I understand, it would somehow start to look for a memory stick that was mounted and included in *fstab* at the moment of making the image of the root partition with *dd*.
After remaking the image (and sending it to the server via NFS this time), I can see **that** issue is sorted (see picture)
The issue now, as seen in the next picture, is at **switch root** stage. Which I really don't know the meaning of but I'll do some research about.
The next picture is **net/grub.cfg**. I edited this file and got rid of the *install* and *instsys* commands because I thought they were irrelevant (as I am not trying to install an OS). I also tried this **grub.cfg** without the *root* and *nfsroot* commands which (according to my understanding) would use the file system in the hard drive, instead of the one in the server, and the whole set up seems to work.
It is only when it needs to get the root file system from the NFS server that I've got the error in the second picture. Apologies, the 3rd picture is blurry.
At this point in time, I imagine there is something wrong with the file system. I made the image with **dd**, moved it to the server, and mount it with **mount -o loop /image /srv/tftpboot/openSUSE-XXX/rootfs**. I read it's not the same to image a partition as to image a whole disk. Also, that *btrfs* is somehow special in regards to imaging. Is there a particular way to do this?
Apologies for the delay to update. Thanks again for your help and time to comment.



Gabriel
(11 rep)
Jan 20, 2025, 07:55 PM
• Last activity: Feb 20, 2025, 10:18 PM
0
votes
1
answers
38
views
terraform resource dependency with count(loop)
I'm trying to create stack of multiple vms on KVM_HOST with terraform. The catch is, I'm using pxeboot & kickstart to do installation. Kickstart file needs to carry some dynamic information, like static IPs, hostname etc, therefore I have to create it for each vm, and this kickstart file needs to st...
I'm trying to create stack of multiple vms on KVM_HOST with terraform. The catch is, I'm using pxeboot & kickstart to do installation. Kickstart file needs to carry some dynamic information, like static IPs, hostname etc, therefore I have to create it for each vm, and this kickstart file needs to stay there till vm reads it & starts installation. Then next kickstart file is created for vm 2, and it needs to stay there till vm2 reads it for installation. So there should be some delay in creating these resources, either with loop or depend_on parameter, but what I'm getting is, kickstart files for all vms are generated right away, last one is overriding, of course, so correct info is not passed.
here's two resources which I need to loop in sequence for number of variable value qty
variable "vm_count" {
type = number
default = 1
}
below are resources
resource "null_resource" "delay" {
count = var.vm_count
provisioner "local-exec" {
command = "sleep 150"
}
depends_on = [libvirt_domain.vm]
}
resource "local_file" "kickstart_file" {
count = var.vm_count
content = templatefile("ks.tpl", {
ip = "192.168.1.${117 + count.index}"
netmask = var.netmask
gateway = var.gateway
dns = var.dns
hostname = "${var.hostname}-${count.index + 1}"
disk_size_rounded = ((var.disk_size - 1) * 1024) -1
})
filename = "/var/www/html/kickstart/ks-terraform.cfg"
}
resource "libvirt_domain" "vm" {
count = var.vm_count
name = "${var.hostname}-${count.index + 1}"
memory = var.memory
vcpu = var.cpu
arch = "x86_64"
cpu {
mode = "host-passthrough"
}
boot_device {
dev = ["hd", "network"]
}
disk {
volume_id = libvirt_volume.default_disk[count.index].id
}
graphics {
type = "vnc"
listen_type = "address"
autoport = true
}
network_interface {
bridge = "virbr0"
macvtap = false
}
depends_on = [local_file.kickstart_file, null_resource.delay]
}
how can I improve the logic with depends on or for_each?
Sollosa
(1993 rep)
Feb 11, 2025, 02:11 PM
• Last activity: Feb 11, 2025, 07:18 PM
0
votes
0
answers
46
views
how to make terraform pass static IP information to kvm virtual machine with variables, in a kickstart pxeboot enabled env?
I have a kvm host, with bridge network, so the vms get IP info directly from router itself. I have created a pxeboot env with dnsmasq acting as dhcp proxy, and kickstart as method of installation passed via pxeboot menu. So far all working fine. but here's the problem, whenever I want to set static...
I have a kvm host, with bridge network, so the vms get IP info directly from router itself.
I have created a pxeboot env with dnsmasq acting as dhcp proxy, and kickstart as method of installation passed via pxeboot menu. So far all working fine.
but here's the problem, whenever I want to set static IP on a vm, I have to modify kickstart file with IP information. this is manageable for small number of vms, but now I introduced terraform for vm provisioning , and I want IP information to be passed on with use of terraform variables to kickstart file.
so below is line of kickstart with static IP info
network --bootproto=static --device=enp1s0 --ip=192.168.1.220 --netmask=255.255.255.0 --gateway=192.168.1.1 --nameserver=8.8.8.8 --noipv6 --activate
and here's variables that I have defined in terraform code
variable "vm_ip" {
default = "192.168.1.200"
}
variable "vm_netmask" {
default = "255.255.255.0"
}
variable "gat_eway" {
default = "192.168.1.1"
}
variable "name_server" {
default = "8.8.8.8"
}
any idea how to pass these variables to kickstart, so vm can get static IP with use of terraform variables?
Sollosa
(1993 rep)
Feb 3, 2025, 06:48 PM
• Last activity: Feb 3, 2025, 08:11 PM
0
votes
0
answers
77
views
pxeboot with dnsmasq as dhcp proxy for rockylinux
first, I installed apache & started its service ``` yum install httpd && systemctl enabled httpd --now ``` then I mounted dvd iso & copied its content to apache dir ``` mount -o ro ~/Downloads/rockylinux9.iso /mnt/iso cp -rv /mnt/iso/* /var/www/html/install-media/ ``` and copied kickstart file under...
first, I installed apache & started its service
yum install httpd && systemctl enabled httpd --now
then I mounted dvd iso & copied its content to apache dir
mount -o ro ~/Downloads/rockylinux9.iso /mnt/iso
cp -rv /mnt/iso/* /var/www/html/install-media/
and copied kickstart file under
cp ~/kickstart-rockylinux9.cfg /var/www/html/install-media/kickstart/
then I installed tftp-server & syslinux & started tftp-server
yum install tftp-server syslinux
then I created these dirs & copied kernel files to below path
mkdir -p /var/lib/tftpboot/{images,pxelinux.cfg}
cp /var/www/html/install-media/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpboot/images/
then I copied menu files from syslinux dir
cp /usr/share/syslinux/{menu.c32,pxelinux.0} /var/lib/tftpboot/
finally created menu file /var/lib/tftpboot/pxelinux.cfg/default with below content
default menu.c32
prompt 0
timeout 300
ontimeout 2
menu title PXE Boot Menu
label 1
menu label ^1 - Install Rocky Linux 9
kernel images/vmlinuz
append initrd=images/initrd.img showopts method=http://192.168.1.254/install-media/ devfs=nomount ks=http://192.168.1.254/install-media/kickstart/kickstart-rockylinux9.cfg
Now the critical part is dnsmasq.conf, as my physical host is on bridged network with kvm installed on it. so dnsmasq is supposed to proxy dhcp request to my router
# cat /etc/dnsmasq.con
# Enable proxy DHCP for PXE
port=0
dhcp-range=192.168.1.0,proxy
# Specify PXE options
dhcp-boot=pxelinux.0,,192.168.1.254
enable-tftp
tftp-root=/var/lib/tftpboot
here's my kickstart file
# Generated by Anaconda 34.25.5.9
# Generated by pykickstart v3.32
#version=RHEL9
# Use graphical install
graphical
# Remove CDROM installation media line
# cdrom
# Specify the HTTP repository
repo --name="AppStream" --baseurl=http://192.168.1.254/install-media/
%addon com_redhat_kdump --disable
%end
# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=enp1s0 --noipv6 --activate
network --hostname=ks-sample2
# Packages to install
%packages
@^minimal-environment
%end
# Firstboot configuration
firstboot --enable
# Disk and partition configuration
ignoredisk --only-use=vda
clearpart --none --initlabel
part /boot --fstype="xfs" --ondisk=vda --size=1024
part pv.50 --fstype="lvmpv" --ondisk=vda --size=70655
volgroup rl --pesize=4096 pv.50
logvol swap --fstype="swap" --size=7167 --name=swap --vgname=rl
logvol / --fstype="xfs" --size=63484 --name=root --vgname=rl
I am unable to boot, after getting IP info properly from dhcp
it says, No boot devices found.

Sollosa
(1993 rep)
Jan 21, 2025, 07:42 AM
6
votes
2
answers
2378
views
Diskless workstations
For various reasons I need a setup with one server, and two diskless workstations. The workstations are to be "fat clients", which means I want to enable them to use their own CPU, memory, etc, for everything. Ideally, the workstation users should not have to notice that they are running diskless at...
For various reasons I need a setup with one server, and two diskless workstations.
The workstations are to be "fat clients", which means I want to enable them to use their own CPU, memory, etc, for everything. Ideally, the workstation users should not have to notice that they are running diskless at all (except for the PXE booting, obviously...).
The workstations should run OpenSuse (some version between and including 11.2 and 11.4) since that is what we use. They don't necessarily have to run a vanilla openSuse install, but as close as possible.
The general idea is to PXE boot the workstations, and then let them mount their (root) filesystems on the server via NFS.
I tried simply copying an existing OpenSuse 11.4 installation to a directory which I then exported via NFS. The kernel and initrd were then exposed via PXE/TFTP. The problem is that the initrd from the install is tailored to the machine it was installed on, so using it as is did not work.
I have made some attempts to use LTSP (KIWI-LTSP for OpenSuse) with very limited success.
So, now to my actual question(s):
**1) Apart from modifying the initrd by hand to work with the diskless workstations, is there anything else I could use to aid me?**
**2) One idea I had was to use the same root ("/") for both workstations, and then mount stuff like /var and /tmp as tmpfs. Are there any pitfalls to avoid here?**
**3) Any other ideas on how to accomplish this setup? All ideas are very welcome!**
kigurai
(183 rep)
Mar 30, 2011, 08:55 AM
• Last activity: Jan 20, 2025, 08:41 PM
0
votes
1
answers
181
views
open source PXE boot for Linux?
On a simple LAN if I have `server A` that is running RHEL-8.10 installed from *rhel-8.10-x86_64-dvd.iso* or similar which then has a service that allows `servers B..Z` on the LAN to PXE boot from? What would that PXE server software be called that would allow that functionality and for creating boot...
On a simple LAN if I have
server A
that is running RHEL-8.10 installed from *rhel-8.10-x86_64-dvd.iso* or similar which then has a service that allows servers B..Z
on the LAN to PXE boot from? What would that PXE server software be called that would allow that functionality and for creating bootable Linux *images*? Is there such a thing that is FOSS ?
I am interested in making servers B..Z
diskless that PXE boot a Linux OS from server A
.
ron
(8647 rep)
Dec 3, 2024, 04:01 PM
• Last activity: Dec 3, 2024, 10:52 PM
0
votes
0
answers
41
views
How do I create a restorable Clonezilla image from a rootfs directory?
I've built a Debian rootfs for an embedded Linux platform using `debootstrap` et al. My goal is to make this installable to my devices over the network. I previously built [my own solution](https://github.com/rgov/netinstall) using iPXE but I'm evaluating switching to Clonezilla. However, I am not c...
I've built a Debian rootfs for an embedded Linux platform using
debootstrap
et al. My goal is to make this installable to my devices over the network.
I previously built [my own solution](https://github.com/rgov/netinstall) using iPXE but I'm evaluating switching to Clonezilla. However, I am not cloning an existing drive; I want to make the restorable image from my rootfs directory, and populate the necessary metadata fields about the partitions for Clonezilla to recreate on restore.
What is the process for "manually" creating a Clonezilla restore image? E.g., should I create a disk image with mkfs && mount -o loop
and then clone it? Is there some incantation of partclone
that supports this?
(A process that doesn't require root and/or that works inside a Docker container would be preferred, since that's easier to deploy via CI.)
rgov
(253 rep)
Nov 4, 2024, 10:25 PM
• Last activity: Nov 4, 2024, 10:54 PM
1
votes
2
answers
353
views
Unable to PXE install with DVD Repo in Preseed
I have set up an nginx instance where it hosts the entirety of the DVD debian 11 iso file. This because I want to use it as a repo. It's unsigned, but the Release file and packages are there as it should be. This with the objective of deploying debian 11 on several hosts via PXE in a closed network....
I have set up an nginx instance where it hosts the entirety of the DVD debian 11 iso file. This because I want to use it as a repo. It's unsigned, but the Release file and packages are there as it should be.
This with the objective of deploying debian 11 on several hosts via PXE in a closed network. Thing is, when I use my repo, it's unable to detect any disks on where to install.
Here's my preseed file:
d-i mirror/http/hostname string local.place.here:83
d-i mirror/http/directory string /debian/
d-i debian-installer/allow_unauthenticated boolean true(this because the DVD repo is unsigned, and I know I can sign, but not a priority at the moment)
If I do like so, I am greeted with the following error:
While, if I change the preseed file to use the official Debian repos, it works fine.
d-i mirror/http/hostname string ftp.debian.org
d-i mirror/http/directory string /debian/
I've seen suggestions to create a new initrd.gz with the missing drivers, but that does not seem to be the case, because using the same initrd.gz it works on the official repos, so I suspect something is missing on the DVD, or some config file, in other for this to work.
This must be done on a closed network, and having limited space also, it's unfeasible to mirror the entirety of the Debian repo, hence the idea of using the DVD, and the DVD installs fine on its own in a host. The nginx instance does not seem to have any problem presenting the files, as I'm able to download files picked at random. So in sum, I'm not sure what's missing in order to have this to work.
Does anyone have any suggestion? Thank you.

DeAlto
(11 rep)
Feb 24, 2022, 05:49 PM
• Last activity: Sep 11, 2024, 07:48 AM
1
votes
1
answers
116
views
ubuntu-live-server installation through PXE user-data config error
I am trying to install Ubuntu live server. Everything works fine till the system requests the cloud-init configs. I have tried to change my user-data file several times. Ether it throughs an error "An error occurred. Press enter to start shell (image 1) [![Image 1][1]][1] then I change the configura...
I am trying to install Ubuntu live server. Everything works fine till the system requests the cloud-init configs. I have tried to change my user-data file several times. Ether it throughs an error "An error occurred. Press enter to start shell (image 1)
then I change the configuration file user-data file, it passes from waiting for cloud-init step and loads (I suppose ) user data file then it throws another error:
Here is my user-data file:


#cloud-config
# Locale and Timezone
locale: en_US.UTF-8
timezone: UTC
# Preserve the hostname
preserve_hostname: true
# Users configuration
users:
- name: user
gecos: ubuntu-server
groups: adm, cdrom, dip, lxd, plugdev, sudo
lock_passwd: false
passwd: some-hashed-password
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh_pwauth: true
# Disk setup for flexible sizes
# The partitioning will use the entire disk size
disk_setup:
/dev/sda:
table_type: gpt
layout: true
overwrite: false
partition:
- size: 1024 # 1GB for /boot
type: 0xEF00 # EFI System Partition
- size: 2048 # 2GB for /boot
type: 0x8300 # Linux Filesystem for /boot
- size: -1 # Use remaining space for root (LVM)
# LVM setup to use remaining disk space
lvm:
vg:
ubuntu-vg:
devices:
- /dev/sda3 # Third partition is for LVM
fs_setup:
- label: boot
filesystem: ext4
device: /dev/sda2 # Boot partition
- label: root
filesystem: ext4
device: /dev/mapper/ubuntu--vg-ubuntu--lv # LVM root partition
# Mount points configuration
mounts:
- [ /dev/sda2, /boot ]
- [ /dev/mapper/ubuntu--vg-ubuntu--lv, / ]
# Growpart to automatically resize partitions
growpart:
mode: 'auto'
devices: ['/']
resize_rootfs: true # Automatically resize the root filesystem
# Network setup (adjust the interface as needed)
network:
version: 2
ethernets:
ens160:
dhcp4: true
# Packages to install
packages:
- openssh-server
- htop
- curl
# Run custom commands after first boot
runcmd:
- echo "System successfully initialized!"
- apt-get update && apt-get upgrade -y
# Reboot after cloud-init is done
power_state:
mode: reboot
# Final message after boot
final_message: "The system is ready! You can now log in."
Could someone suggest me how to figure it out and make it work?
AdkhamSec
(13 rep)
Sep 9, 2024, 12:58 PM
• Last activity: Sep 9, 2024, 01:43 PM
4
votes
2
answers
8914
views
PXE Boot: "Failed to load ldlinux.c32"
I'm trying to create a PXE server on my raspberry pi, but if I try to boot, the client shows the Error "Failed to load ldlinux.c32". This is my folder structure of the tftp folder: [![folder structure][1]][1] Here is my pxelinux.cfg configuration: DEFAULT vesamenu.c32 PROMPT 0 TIMEOUT 300 MENU TITLE...
I'm trying to create a PXE server on my raspberry pi, but if I try to boot, the client shows the Error "Failed to load ldlinux.c32". This is my folder structure of the tftp folder:
Here is my pxelinux.cfg configuration:
DEFAULT vesamenu.c32
PROMPT 0
TIMEOUT 300
MENU TITLE PXE Network Boot Menu
LABEL local
MENU LABEL BOOT FROM LOCAL DISK
MENU DEFAULT
LOCALBOOT 0
LABEL memtest
MENU LABEL memtest86+ v4.20
KERNEL memtest
And this is my DHCP configuration:
subnet 10.0.0.0 netmask 255.255.252.0 {
option ntp-servers de.pool.ntp.org;
option domain-name ".pudding.net";
option domain-name-servers 10.0.0.5;
option broadcast-address 10.0.3.255;
option subnet-mask 255.255.252.0;
option routers 10.0.0.1;
allow client-updates;
allow unknown-clients;
max-lease-time 1814400;
default-lease-time 604800;
range 10.0.0.100 10.0.0.200;
filename "/pxelinux.0";
next-server 10.0.0.5;
}
I configured it like this tutorial: Tutorial
It doesn't worked for me, with the same error, because of this I copied the structure from a friend, it doesn't worked with the same error. But it works for him.
Has anyone an idea, how to fix this problem? I don't know very well about syslinux and I would be happy if anyone can help me!

Isti
(41 rep)
Jun 11, 2019, 06:33 PM
• Last activity: Aug 16, 2024, 07:24 PM
0
votes
0
answers
225
views
How to specify correct kernel/initrd for PXE boot using syslinux and dnsmasq?
I have a dnsmasq server for DNS, DHCP, and TFTP for pxeboot. The DNS/DHCP options are working correctly, but my client complains that some files are missing when pxe booting. I assume I have something in my pxelinux.cfg/default wrong, but I'm not sure what. My dnsmasq.conf: ``` no-resolv no-poll int...
I have a dnsmasq server for DNS, DHCP, and TFTP for pxeboot. The DNS/DHCP options are working correctly, but my client complains that some files are missing when pxe booting. I assume I have something in my pxelinux.cfg/default wrong, but I'm not sure what.
My dnsmasq.conf:
no-resolv
no-poll
interface=enp5s0
dhcp-range=enp5s0,10.0.0.2,10.0.0.254,72h
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/opt/lib/pxe
listen-address=10.0.0.1
listen-address=127.0.0.1
server=
My pxelinux.cfg/default file:
default
label gentoo (squashfs/http)
kernel /gentoo/kernel
initrd /gentoo/network.igz
append root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot net.ifnames=0
File structure of /opt/lib/pxe:
├── gentoo
│ ├── kernel
│ └── network.igz
├── ISOs
│ └── admincd-amd64-20240721T164902Z.iso
├── ldlinux.c32
├── pxelinux.0
└── pxelinux.cfg
└── default
Output of syslog:
Aug 3 23:50:31 yvonnel dnsmasq-tftp: error 0 TFTP Aborted received from 10.0.0.128
Aug 3 23:50:31 yvonnel dnsmasq-tftp: sent /opt/lib/pxe/pxelinux.0 to 10.0.0.128
Aug 3 23:50:31 yvonnel last message buffered 1 times
Aug 3 23:50:32 yvonnel dnsmasq-tftp: sent /opt/lib/pxe/ldlinux.c32 to 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/b84b89f6-9bab-48ea-a79c-0ca669694079 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/01-90-1b-0e-32-30-9a not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A000080 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A00008 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A0000 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A000 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A00 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A0 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0A not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/pxelinux.cfg/0 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: sent /opt/lib/pxe/pxelinux.cfg/default to 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.c32 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.img not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.bss not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.bin not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.bs not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: file /opt/lib/pxe/.0 not found for 10.0.0.128
Aug 3 23:50:32 yvonnel dnsmasq-tftp: unsupported request from 10.0.0.128
I'm setting up the server to boot clients into the admin gentoo live CD which I extracted into components (kernel, rootfs, initrd) using the instructions here under the "Diskless install using PXE from the LiveCD" option.
jnasworld223
(1 rep)
Aug 4, 2024, 07:08 AM
• Last activity: Aug 4, 2024, 11:33 AM
0
votes
1
answers
187
views
Can grub pass a PXE script to iPXE?
I'm trying to configure a system to boot the Ubuntu live system from a PXE server. The DHCP server on the network doesn't support PXE. The machine has grub and I've installed iPXE. I can select the Network Boot option from the grub menu, press `Ctrl+B` and manually set up the PXE options to get it t...
I'm trying to configure a system to boot the Ubuntu live system from a PXE server. The DHCP server on the network doesn't support PXE. The machine has grub and I've installed iPXE. I can select the Network Boot option from the grub menu, press
Ctrl+B
and manually set up the PXE options to get it to boot. Is there a way to automate this so that selecting the grub menu option will automatically run a PXE script when it loads iPXE? I don't mind if this is a script that's stored on a local filesystem or if grub passes a URL for a script to iPXE.
Tom
(563 rep)
Aug 3, 2024, 08:38 PM
• Last activity: Aug 4, 2024, 05:58 AM
0
votes
0
answers
114
views
Pxeboot - how to set network interface speed?
I can successfully do a PXE boot but the initial load of initrd and kernel is very slow because it drops back to 100Mbit instead of Gigabit. (This probably means it is actually causing all sorts of chaos with mismatched speed on the switch. It seems slower than I'd expect for even 100M) Once the ker...
I can successfully do a PXE boot but the initial load of initrd and kernel is very slow because it drops back to 100Mbit instead of Gigabit. (This probably means it is actually causing all sorts of chaos with mismatched speed on the switch. It seems slower than I'd expect for even 100M)
Once the kernel/initrd are loaded and it boots them, back up to gigabit speed.
This is a boot config file I've used:
DEFAULT vesamenu.c32
PROMPT 0
# Option 1 - Local Boot
LABEL bootlocal
menu label ^Boot From Disk
menu default
LOCALBOOT -1
LABEL centos9
menu label ^Network boot
kernel images/centos9/vmlinuz
append initrd=images/centos9/initrd.img ip=dhcp inst.ks=http://192.168.1.128/ks/client1.cfg
Any ideas on how to set the interface to full duplex in the PXE environment??
Maybe some Lua script to set it?
Max
(1 rep)
Jul 14, 2024, 01:13 PM
0
votes
1
answers
1912
views
linuxefi causes "you need to load kernel first"
I am aware of the multiple questions regarding this matter but this one seems to be different. This is the Grub configuration our PXE boot server provides: ``` net_ls_addr sleep -i 5 set retcode=$? clear if [ $retcode == 1 ]; then quit fi if [ $retcode == 0 ]; then quit fi if [ $retcode == 3 ]; then...
I am aware of the multiple questions regarding this matter but this one seems to be different. This is the Grub configuration our PXE boot server provides:
net_ls_addr
sleep -i 5
set retcode=$?
clear
if [ $retcode == 1 ]; then
quit
fi
if [ $retcode == 0 ]; then
quit
fi
if [ $retcode == 3 ]; then
terminal_output gfxterm
set gfxmode="800x600;640x480;auto"
set theme=theme.txt
fi
menuentry 'Install Custom CentOS 7 Linux x86_64 (CC7)' {
insmod progress
clear
#set net_default_server=linuxsofturl
echo -n 'loading kernel ...'
linuxefi (http)/aims/boot/CC7_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/7/os/x86_64/
clear
echo -n 'loading initrd ...'
initrdefi (http)/aims/boot/CC7_X86_64/initrd
}
This, as mentioned, causes a "you need to load the kernel first". Until now it was working fine.
To add further background, the following menu entries used to work until two weeks ago:
menuentry 'Install CentOS 8 Linux x86_64 (C8)' {
insmod progress
clear
echo -n 'loading kernel ...'
linuxefi /aims/boot/C8_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/8/BaseOS/x86_64/os/ inst.addrepo=CUSTOM,http://linuxsofturl/centos/8/CUSTOM/x86_64/ inst.addrepo=locmap,http://linuxsofturl/internal/repos/potd8-stable/x86_64/os/ ks=http://linuxsofturl/linux/centos8/default.ks
clear
echo -n 'loading initrd ...'
initrdefi /aims/boot/C8_X86_64/initrd
}
menuentry 'Install Custom CentOS 7 Linux x86_64 (CC7)' {
insmod progress
clear
#set net_default_server=linuxsofturl
echo -n 'loading kernel ...'
linuxefi (http)/aims/boot/CC7_X86_64/vmlinuz ip=dhcp inst.repo=http://linuxsofturl/centos/7/os/x86_64/
clear
echo -n 'loading initrd ...'
initrdefi (http)/aims/boot/CC7_X86_64/initrd
}
menuentry 'Install Scientific Linux Custom 6 x86_64 (SLC6)' {
insmod progress
clear
echo -n 'loading kernel ...'
linux (http)/aims/boot/SLC6X_X86_64/vmlinuz ip=dhcp repo=http://linuxsofturl/slc6X/x86_64/
clear
echo -n 'loading initrd ...'
initrd (http)/aims/boot/SLC6X_X86_64/initrd
}
menuentry 'Install RHEL 8.2 x86_64 (license required)' {
insmod progress
clear
echo -n 'loading kernel ...'
linux (http)/aims/boot/RHEL_8_2_X86_64/vmlinuz ip=dhcp repo=http://linuxsofturl/enterprise/rhel/server/8/8.2/x86_64/
clear
echo -n 'loading initrd ...'
initrd (http)/aims/boot/RHEL_8_2_X86_64/initrd
}
It seems that either using linux
+ (http) or linuxefi
without HTTP protocol (so it will use TFTP, which will be slow) seems to do the trick, but this has always worked until now for a reason.
EDIT: As a sidenote, this is the log output from the TFTP server, note the partial content 206 HTTP error:
2020-09-14T15:06:36.618691+02:00 aimstest01 httpd: 128.142.32.27 - - [14/Sep/2020:15:06:36 +0200] "GET /aims/boot/CC7_X86_64/vmlinuz HTTP/1.1" 200 6762688 114153 "-" "GRUB 2.02~beta2"
2020-09-14T15:07:11.137769+02:00 aimstest01 httpd: 128.142.32.27 - - [14/Sep/2020:15:06:37 +0200] "GET /aims/boot/CC7_X86_64/vmlinuz HTTP/1.1" 206 6762688 34080353 "-" "GRUB 2.02~beta2"
djuarez
(357 rep)
Sep 14, 2020, 08:39 AM
• Last activity: Jun 25, 2024, 01:00 AM
Showing page 1 of 20 total questions