Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I boot from a root filesystem (maybe squashfs or dd image)?
2017-10-02, 12:27 (This post was last modified: 2017-10-02 13:17 by MultimediaMan.)
Post: #9
RE: How can I boot from a root filesystem (maybe squashfs or dd image)?
What Distro are you running?

For most RH-based distros you need to install/ specify:

The dracut-network package.

Pay heed to this webpage: https://access.redhat.com/documentation/...esssystems

Particularly:
Code:
after installing the dracut-network package, add the following line to /etc/dracut.conf:
add_dracutmodules+="nfs"

RHEL 6.7-6.9 and RHEL 7.x have somewhat broken NFSroots Support... it's there, but for some reason the default kernel and initrd won't work with NFSroots. The solution is to substitute the OEM vmlinuz and initrd with the Netinstall ISO or the Install ISO in /images/pxeboot/

NFS v4 is supported, but it is difficult to troubleshoot sometimes. If you use NFS v3 you MUST disable SELinux.

I prefer to boot the vmlinuz/initrd directly from the NFS mount using the iPXE NFS option. It makes updating kernels and initrds less of a chore because they essentially behave exactly as a local disk or iSCSI/FCoE-based installation from an update perspective.

Basic boot arguments:

Example:

Code:
#!ipxe

set nfs_server nas1.private.${15}

set nfs_nic_one enP3p3s0f0 ; set nfs_nic_two enP3p3s0f3  

set nfs_args vers=3,rw,defaults

set arg0 splash=off
set arg1 vga=0x314
set arg2 showopts
set arg3 disable_ipv6=1
set arg4 selinux=0
set arg5 enforcing=0
set arg6 ip=${nfs_ip}:${nfs_server}:${def_gateway}:${nfs_netmask}:${hostname}:bond0:none:​9000
set arg7 bond=bond0:eth${nfs_nic_one},eth${nfs_nic_two}:mode=1

dhcp netX
initrd nfs://${nfs_server}/boot_${hostname}/boot/initrd
chain nfs://${nfs_server}/boot_${hostname}/boot/vmlinuz initrd=initrd root=nfs:${nfs_server}:/boot_${hostname}:${nfs_args} ${arg0} ${arg1} ${arg2} ${arg3} ${arg4} ${arg5} ${arg6} ${arg7}

Notes:
For RHEL/CentOS version 7+, SLES 12+, and Ubuntu 14+: if you use NFS v3 you MUST specify NFS v3 in the NFS parameters otherwise the OS may default to NFS v4 (Confirmed in SLES 12).
Yes, booting from a Bond is possible, you just have specify the bond as part of the boot parameters. It doesn't hurt to have the bond configured in the running OS as well... by specifying the NFS adapter in the boot parameters, you effectively give the OS "Super Duper Root" to protect the interface which provides NFS (at nearly all costs)...basically there isn't a whole lot you can do with that particular interface in the running OS.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I boot from a root filesystem (maybe squashfs or dd image)? - MultimediaMan - 2017-10-02 12:27



User(s) browsing this thread: 1 Guest(s)