PXE boot CentOS 7.2 diskless fails with “Failed to start Switch Root” The 2019 Stack Overflow Developer Survey Results Are InProblem setting up RHEL6 PXE serverPXE Boot FreeBSD ISO from a Linux PXE serverUnable to mount the file system from server to client while booting through networkCentOS 7 installer: blank screenCentOS 7 on Amazon ec2 hangs on rebootGetting “Too many slots” messages on CentOS 7 running as a domULinux diskless boot - NFS share not mounting during ramdisk bootPXE Boot Does Not Pass Kernel Boot Parameters to /proc/cmdline Centos 7.2Centos 7 ISCSI diskless boot with ibftInitramfs corrupted while PXE on Rocks node installation
What is the motivation for a law requiring 2 parties to consent for recording a conversation
Why doesn't shell automatically fix "useless use of cat"?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?
Why doesn't UInt have a toDouble()?
If a sorcerer casts the Banishment spell on a PC while in Avernus, does the PC return to their home plane?
Does HR tell a hiring manager about salary negotiations?
Dropping list elements from nested list after evaluation
How to obtain a position of last non-zero element
Are there any other methods to apply to solving simultaneous equations?
What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?
Is it possible for absolutely everyone to attain enlightenment?
Cooking pasta in a water boiler
Falsification in Math vs Science
Can withdrawing asylum be illegal?
Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?
Is it a good practice to use a static variable in a Test Class and use that in the actual class instead of Test.isRunningTest()?
Likelihood that a superbug or lethal virus could come from a landfill
Why “相同意思的词” is called “同义词” instead of "同意词"?
Mathematics of imaging the black hole
Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?
Did any laptop computers have a built-in 5 1/4 inch floppy drive?
What do I do when my TA workload is more than expected?
PXE boot CentOS 7.2 diskless fails with “Failed to start Switch Root”
The 2019 Stack Overflow Developer Survey Results Are InProblem setting up RHEL6 PXE serverPXE Boot FreeBSD ISO from a Linux PXE serverUnable to mount the file system from server to client while booting through networkCentOS 7 installer: blank screenCentOS 7 on Amazon ec2 hangs on rebootGetting “Too many slots” messages on CentOS 7 running as a domULinux diskless boot - NFS share not mounting during ramdisk bootPXE Boot Does Not Pass Kernel Boot Parameters to /proc/cmdline Centos 7.2Centos 7 ISCSI diskless boot with ibftInitramfs corrupted while PXE on Rocks node installation
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.
/var/lib/tftpboot/pxelinux.cfg/default contains:
default menu.c32
prompt 0
timeout 100
TOTALTIMEOUT 300
ONTIMEOUT CentOS
MENU TITLE Linux 7.2 PXE Boot Menu
LABEL CentOS
MENU LABEL CentOS 7.2 x86_64 em1
KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet
When PXE booting the client it gets quite far, but stops at:
Starting Switch Root...
Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!
I saved the diskless_initrd.img using
dracut -f diskless_initrd.img `uname -r`
and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.
I don't understand why this works with my CentOS 6.6 server but not here in 7.2.
centos7 pxe-boot dracut
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.
/var/lib/tftpboot/pxelinux.cfg/default contains:
default menu.c32
prompt 0
timeout 100
TOTALTIMEOUT 300
ONTIMEOUT CentOS
MENU TITLE Linux 7.2 PXE Boot Menu
LABEL CentOS
MENU LABEL CentOS 7.2 x86_64 em1
KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet
When PXE booting the client it gets quite far, but stops at:
Starting Switch Root...
Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!
I saved the diskless_initrd.img using
dracut -f diskless_initrd.img `uname -r`
and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.
I don't understand why this works with my CentOS 6.6 server but not here in 7.2.
centos7 pxe-boot dracut
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.
/var/lib/tftpboot/pxelinux.cfg/default contains:
default menu.c32
prompt 0
timeout 100
TOTALTIMEOUT 300
ONTIMEOUT CentOS
MENU TITLE Linux 7.2 PXE Boot Menu
LABEL CentOS
MENU LABEL CentOS 7.2 x86_64 em1
KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet
When PXE booting the client it gets quite far, but stops at:
Starting Switch Root...
Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!
I saved the diskless_initrd.img using
dracut -f diskless_initrd.img `uname -r`
and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.
I don't understand why this works with my CentOS 6.6 server but not here in 7.2.
centos7 pxe-boot dracut
I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.
/var/lib/tftpboot/pxelinux.cfg/default contains:
default menu.c32
prompt 0
timeout 100
TOTALTIMEOUT 300
ONTIMEOUT CentOS
MENU TITLE Linux 7.2 PXE Boot Menu
LABEL CentOS
MENU LABEL CentOS 7.2 x86_64 em1
KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet
When PXE booting the client it gets quite far, but stops at:
Starting Switch Root...
Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!
I saved the diskless_initrd.img using
dracut -f diskless_initrd.img `uname -r`
and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.
I don't understand why this works with my CentOS 6.6 server but not here in 7.2.
centos7 pxe-boot dracut
centos7 pxe-boot dracut
asked May 8 '17 at 19:31
John HupceyJohn Hupcey
112
112
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 3 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.
I found the problem in my process. Two things actually.
I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.
We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet
In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet
add a comment |
I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.
In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:
systemctl enable firewalld
systemctl start firewalld
The client now successfully mounted the remote filesystem and came up to the Linux login prompt.
Now to figure out which parts of that iptables file I really need in this instance.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f848899%2fpxe-boot-centos-7-2-diskless-fails-with-failed-to-start-switch-root%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.
I found the problem in my process. Two things actually.
I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.
We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet
In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet
add a comment |
You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.
I found the problem in my process. Two things actually.
I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.
We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet
In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet
add a comment |
You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.
I found the problem in my process. Two things actually.
I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.
We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet
In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet
You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.
I found the problem in my process. Two things actually.
I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.
We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet
In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet
edited Sep 7 '17 at 7:42
Jenny D
24.1k116196
24.1k116196
answered Sep 6 '17 at 21:47
JaredJared
11
11
add a comment |
add a comment |
I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.
In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:
systemctl enable firewalld
systemctl start firewalld
The client now successfully mounted the remote filesystem and came up to the Linux login prompt.
Now to figure out which parts of that iptables file I really need in this instance.
add a comment |
I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.
In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:
systemctl enable firewalld
systemctl start firewalld
The client now successfully mounted the remote filesystem and came up to the Linux login prompt.
Now to figure out which parts of that iptables file I really need in this instance.
add a comment |
I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.
In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:
systemctl enable firewalld
systemctl start firewalld
The client now successfully mounted the remote filesystem and came up to the Linux login prompt.
Now to figure out which parts of that iptables file I really need in this instance.
I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.
In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:
systemctl enable firewalld
systemctl start firewalld
The client now successfully mounted the remote filesystem and came up to the Linux login prompt.
Now to figure out which parts of that iptables file I really need in this instance.
answered Mar 5 '18 at 21:45
John HupceyJohn Hupcey
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f848899%2fpxe-boot-centos-7-2-diskless-fails-with-failed-to-start-switch-root%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown