SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
And now i want to boot a diskless using a nfs root. I installpkg -root /nfsroot all needed files (/a /l /n package series).
And this is where i'm stuck. I think i have to do a new initrd, and make some changes to /tftpboot/slack/pxelinux.cfg/default
I already did that :
default linux initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 nfsroot=192.168.223.1:/nfsroot rw
But when i boot i got a kernel panic unable to mount rootfs blahblah.
So is the new initrd the answer ?
Do i have to compile a more generic kernel on my main machine, in order to mkinitrd/transfer it on the diskless ?
Keep on slackin'
Last edited by Linux.tar.gz; 10-16-2008 at 04:25 PM.
If you are configuring a diskless machine which will mount its root
file system over NFS at boot time, say Y here and to "Kernel
level IP autoconfiguration" above and to "Root file system on NFS"
below. You cannot compile this driver as a module in this case.
There are two packages designed for booting diskless machines over
the net: netboot, available from
<http://ftp1.sourceforge.net/netboot/>, and Etherboot,
available from <http://ftp1.sourceforge.net/etherboot/>.
I wonder if netboot and etherboot are mandatory as the pxe installer booted the kernel more than fine.
And now i want to boot a diskless using a nfs root. I installpkg -root /nfsroot all needed files (/a /l /n package series).
And this is where i'm stuck. I think i have to do a new initrd, and make some changes to /tftpboot/slack/pxelinux.cfg/default
I already did that :
default linux initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 nfsroot=192.168.223.1:/nfsroot rw
But when i boot i got a kernel panic unable to mount rootfs blahblah.
So is the new initrd the answer ?
Do i have to compile a more generic kernel on my main machine, in order to mkinitrd/transfer it on the diskless ?
Keep on slackin'
Nice of you to comment on the PXE installer. I always wonder who uses it.
To boot a diskless machine using a NFS filesystem, you will indeed have to rewrite the init script inside the initrd.img. This is not trivial but can be done.
An interesting Wiki article describing a way to use ZipSlack for a diskless client setup is available on Linux.Ars.
You'll find it covers the whole process of setting up the NFS server, the initrd and the linurc script (the actual script that does all the initialization inside the initrd).
Let me know if that Wiki article helped you - if so, I will try to adapt it for modern-day Slackware.
Well this article is by far the most complete i've read. I'm going to put it in practice next week.
I don't understand (yet) why we have to use ZipSlack (maybe the system is already complete, no need to installpkg -root).
For your nice installer, i used it only for learning purpose, and i learnt well as i succeeded launching the Slack setup program. I may be using it in the near future as it avoid me to put a CD/DVD in the machines ^_^.
In fact, i used to install many Slack by nfs as the process is faster than CD/DVD (especially if the server got a SATA disk, or better if the install set mounted in a ram filesystem).
And it's very important for people who own a laptop with broken CD/DVD player and no floppy.
When using diskless machines, the price is lowered by ~120€. No CD/DVD drive, no floppy, no hard drive.
And when (it's currently my case) you have 15+ diskless machines, no need to draw a picture...
So maybe indeed it will be good to howtorize a Slackware diskless procedure.
Nice of you to comment on the PXE installer. I always wonder who uses it.
To boot a diskless machine using a NFS filesystem, you will indeed have to rewrite the init script inside the initrd.img. This is not trivial but can be done.
An interesting Wiki article describing a way to use ZipSlack for a diskless client setup is available on Linux.Ars.
You'll find it covers the whole process of setting up the NFS server, the initrd and the linurc script (the actual script that does all the initialization inside the initrd).
Let me know if that Wiki article helped you - if so, I will try to adapt it for modern-day Slackware.
Cheers, Eric
Hi,
Eric, I just went to the referenced wiki and read it. To adapt the technique to modern Slackware would be a great tool.
Back on it.
First, it seems that zipslack is now larger than 100M.
I had to enlarge the .img to 200M.
And now i can't mount umsdos. I have a custom kernel, and i don't see where to enable it in menuconfig.
So i rebooted to 2.4.33.3.
I completed the phase 1. Here's the ###beta### script, and don't forget to edit it :
#!/bin/sh
dd if=/dev/zero of=zipslack.img count=1 bs=200M
/sbin/mkdosfs -F 16 zipslack.img
su
mkdir -p /mnt/zipslack /var/clients/default
mount -t msdos -o loop zipslack.img /mnt/zipslack
cd /mnt/zipslack
##### Change to your username
unzip -qq /home/user/zipslack.zip
cd
umount /mnt/zipslack
##### Change to your username
mount -t umsdos -o loop /home/user/zipslack.img /mnt/zipslack
cd /mnt/zipslack
find . -xdev -print0 | cpio -pa0Vdmu --sparse /var/clients/default
cd
umount /mnt/zipslack
rmdir /mnt/zipslack
Last edited by Linux.tar.gz; 05-22-2007 at 07:26 AM.
Phase 2 : I had to enlarge initrd to 40M and move all files in /var/clients/default/linux to /var/clients/default/
####this script is beta too####
#!/bin/sh
dd if=/dev/zero of=initrd count=1 bs=40M
su
mke2fs initrd
tune2fs -c0 -i0 initrd
#####Some people like i have already that :
mkdir -p /mnt/loop
mount -o loop -t ext2 initrd /mnt/loop
cd /var/clients/default
for pkg in aaa_base etc glibc-solibs bin coreutils util-linux \
sed gawk grep bash elflibs tcpip; do grep -A10000 \
'^FILE LIST:$' var/log/packages/${pkg}* | sed \
's/\/incoming\//\//' | grep -v '^FILE LIST:$' | sed \
's/\.new$//' | grep -v '^install\/' | cpio -paVdmu --sparse /mnt/loop; done
As said before I corrected some /var/clients stuff as zipslack is contained in a "linux" folder. So i had to put root system in /var/clients/default and change some stuff eveywhere else.
Now i have this error message, using root=/dev/ram0 :
Warning: unable to open an initial console
So, according to some info i googled around i did this in the loopbacked initrd, inside dev directory :
mknod console c 5 1
And the next error message is :
/bin/sh: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory
I begin to be confused and i wonder if the howto really works. If someone can help, i'll say "yes".
Last edited by Linux.tar.gz; 05-24-2007 at 05:15 AM.
I now installpkg -root /mnt/loop libtermcap-1.2.3-i486-6.tgz and generated another initrd.
And the system goes further with more error messages about missing /proc/dev/net and many missing commands in linuxrc. I came to the conclusion that the script generating the initrd from zipslack is bloated.
1st question :
Which technique is better: the script extracting from zipslack, or a installpkg -root ?
2nd question :
Is it possible and viable :
Install a minimal system on the diskless (with a disk just for this moment) and making the initrd on it.
In the linuxrc script:
Changed CHROOT=/usr/bin/chroot to CHROOT=/bin/chroot
Put the MAC address grepping stuff on the same line as commented.
Because i saw a message complaining about libblkid.so.1
installpkg -root /mnt/loop e2fsprogs-1.39-i486-1.tgz
Less error messages now.
And no idea about missing /proc/dev/net
I installed module-init-tool because modprobe was missing in the initrd. That corrected the error message from missing /proc/dev/net to missing /proc/net/dev.
There's a nfsroot.txt in the document folder in the kernel sources.
I had to recompile kernel to enable the network card driver INSIDE the kernel.
I also enabled, in the networking options section, IP kernel level autoconfiguration for dhcp and bootp.
And also the root filesystem on nfs option.
Plus added this to /etc/dhcpd.conf :
option root-path "/var/clients/default";
Last edited by Linux.tar.gz; 05-23-2007 at 10:56 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.