Hello netbooting gurus,
Thank you in advance for any help, I really need it.
Short version:
mount: can't find / in /etc/fstab or /etc/mtab errors in initrd's linuxrc script on a diskless client.
Details:
I'm in the process of getting a bunch of RHEL3 systems to netboot off one central NFS/DHCP/TFTP server.
The bulk of my information on how to do this has come from www_intra2net_com/de/produkte/opensource/diskless-howto/howto.html
and www_redhat_com/mirrors/LDP/HOWTO/Diskless-root-NFS-other-HOWTO.html#toc4 as well as other various sites found on google. But mostly the first source. (Um, I'm sorry if I'm breaking a rule by posting a URL... but not listing my sources would be grossly detrimental to the coherency of this post, and -- I feel -- needlessly so. Replace _ with . of course)
I've got everything working right up to the point where the initrd image is loaded and the linuxrc script begins to execute.
The script has a problem trying to remount / as read-write. Here is all the relevant information I can think of:
NFS exports:
Code:
/diskless/root/ *(ro,async,no_root_squash)
dhcpd.conf:
Code:
... the usual ...
next-server <ip of NFS server>;
option root-path "<ip of NFS server>:/diskless/root/";
/tftpboot/pxelinux.cfg/default:
Code:
prompt 1
default test
timeout 100
label test
kernel vmlinuz-2.4.21-27.ELsmp
append init=/linuxrc root=/dev/ram0 initrd=initrd.img.gz ramdisk_size=204080 noapic acpi=off
Now a quick run though of what's inside initrd.img.gz.
/bin is setup with Busybox v1.00-pre4 for most utils except the following:
* find (b/c busybox does't support -exec for find)
* mount (because I want a more verbose mount)
* pivot_root (because I don't trust busybox to do it right)
Now let's have a look at the linuxrc file:
Code:
#!/bin/sh
echo "Remount / read-write"
mount -v -n -o remount,rw / && echo "Worked!"
... other stuff, the line above fails so I'm leaving it off till that problem is solved ...
Ok, so. Here's what happens when I boot my diskless client.
PXE gets IP from DHCP server.
TFTP sends over vmlinuz and initrd
The kernel uncompresses and does it's typical stuff.
We start to execute the linuxrc script.
And we get:
Code:
warning: can't open /etc/fstab: no such file or directory
warning: can't open /etc/mtab: no such file or directory
mount: can't find / in /etc/fstab or /etc/mtab
...
Eventually kernel panics b/c it can't write to a file in /etc
During bootup "/" is a tmpfs based filesystem until the boot script switches to the real root. There's no reason it shouldn't be read-write and remounting it as read-write shouldn't be a problem.
Anyone have any ideas here?