From 84b618fb7bbfd3e5e378f5992e8fb770c391b813 Mon Sep 17 00:00:00 2001 From: Gregory Kurtzer Date: Wed, 26 Jan 2022 01:59:34 +0000 Subject: [PATCH] Fixed booting issues with `/bin` directory existing in overlay. --- Makefile | 4 ++-- etc/ipxe/{arm_image.ipxe => bigimage.ipxe} | 8 ++++---- etc/ipxe/default.ipxe | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) rename etc/ipxe/{arm_image.ipxe => bigimage.ipxe} (58%) diff --git a/Makefile b/Makefile index bdd53e22..194d3fc0 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,6 @@ files: all install -d -m 0755 $(DESTDIR)$(WWCHROOTDIR) install -d -m 0755 $(DESTDIR)$(WWPROVISIONDIR) install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR) - install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/bin/ install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/warewulf/bin/ install -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/warewulf/ install -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/warewulf/ipxe @@ -152,6 +151,7 @@ files: all cp -r etc/ipxe $(DESTDIR)$(SYSCONFDIR)/warewulf/ cp -r overlays/* $(DESTDIR)$(WWOVERLAYDIR)/ chmod 755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/init + chmod 755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/warewulf/wwinit chmod 600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/etc/ssh/ssh* chmod 644 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/etc/ssh/ssh*.pub.ww install -m 0755 wwctl $(DESTDIR)$(BINDIR) @@ -180,7 +180,7 @@ wwclient: cd cmd/wwclient; CGO_ENABLED=0 GOOS=linux go build -mod vendor -a -ldflags '-extldflags -static' -o ../../wwclient install_wwclient: wwclient - install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/bin/wwclient + install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/warewulf/bin/wwclient bash_completion: diff --git a/etc/ipxe/arm_image.ipxe b/etc/ipxe/bigimage.ipxe similarity index 58% rename from etc/ipxe/arm_image.ipxe rename to etc/ipxe/bigimage.ipxe index 5014dec5..1308b998 100644 --- a/etc/ipxe/arm_image.ipxe +++ b/etc/ipxe/bigimage.ipxe @@ -12,10 +12,10 @@ echo set base http://{{.Ipaddr}}:{{.Port}} kernel --name kernel ${base}/kernel/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -initrd --name container ${base}/container/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -initrd --name kmods ${base}/kmods/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -initrd --name system ${base}/overlay-system/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -initrd --name runtime ${base}/overlay-runtime/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +imgextract --name container ${base}/container/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +imgextract --name kmods ${base}/kmods/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +imgextract --name system ${base}/overlay-system/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +imgextract --name runtime ${base}/overlay-runtime/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot boot kernel initrd=container initrd=kmods initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot diff --git a/etc/ipxe/default.ipxe b/etc/ipxe/default.ipxe index 4512d637..32868718 100644 --- a/etc/ipxe/default.ipxe +++ b/etc/ipxe/default.ipxe @@ -12,10 +12,10 @@ echo set base http://{{.Ipaddr}}:{{.Port}} kernel --name kernel ${base}/kernel/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -imgextract --name container ${base}/container/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -imgextract --name kmods ${base}/kmods/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -imgextract --name system ${base}/overlay-system/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot -imgextract --name runtime ${base}/overlay-runtime/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +initrd --name container ${base}/container/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +initrd --name kmods ${base}/kmods/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +initrd --name system ${base}/overlay-system/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot +initrd --name runtime ${base}/overlay-runtime/{{.Hwaddr}}?assetkey=${asset}&uuid=${uuid} || goto reboot boot kernel initrd=container initrd=kmods initrd=system initrd=runtime wwid={{.Hwaddr}} {{.KernelArgs}} || goto reboot