LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   PXE boot slack 14.1 (https://www.linuxquestions.org/questions/linux-networking-3/pxe-boot-slack-14-1-a-4175495028/)

SAJM 02-15-2014 10:39 AM

PXE boot slack 14.1
 
Here is what I have.
An XP laptop running tftpd32.
A 5G USB stick with slackware 14.1 ISO loaded and the usb-and-pxe-installers directory.
Another laptop I'm trying to load linux into.

I can connect to the laptop, allocate an ip address and download pxelinux.0

The boot prompt comes up, but what do I load there? Nothing runs. I did run etherboot.img and something loaded the screen flashed and the laptop rebooted.

My F: drive is as follows:

F:\>dir
Volume in drive F is USBSLACK
Volume Serial Number is D44D-DB0A

Directory of F:\

10/02/2014 13:47 64 slackware-14.1-source-dvd.iso.md5
10/02/2014 13:47 222,243 slackware-14.1-source-dvd.iso.txt
10/02/2014 16:06 3,485,065,216 slackware-14.1-source-dvd.iso
10/02/2014 13:47 198 slackware-14.1-source-dvd.iso.asc
14/02/2014 23:50 15,697 usbimg2disk.sh
15/02/2014 16:00 <DIR> etherboot
14/02/2014 23:54 882 pxelinux.cfg_default
14/02/2014 23:56 31,203 README_PXE.TXT
14/02/2014 23:56 9,197 README_USB.TXT
14/02/2014 23:54 51,340,288 usbboot.img
06/02/2014 13:19 11,816 pxelinux.0
10 File(s) 3,536,696,804 bytes
1 Dir(s) 462,077,952 bytes free


Directory of F:\etherboot

15/02/2014 16:00 <DIR> .
15/02/2014 16:00 <DIR> ..
14/02/2014 23:54 433 dhcpd.conf
14/02/2014 23:55 440 dnsmasq.conf
14/02/2014 23:55 1,474,560 etherboot.img
14/02/2014 23:55 3,087 etherboot_img.build
14/02/2014 23:55 1,474,560 etherboot_pcmcia.img
14/02/2014 23:54 4,567 ETHERBOOT_README.TXT
14/02/2014 23:55 2,498 populate_tftpboot.sh
14/02/2014 23:55 2,667 populate_tftpboot_symlinks.sh
14/02/2014 23:54 36,064 RAWRITE.EXE
14/02/2014 23:54 2,138 RAWRITE12.DOC
14/02/2014 23:54 13,052 RAWRITE12.EXE
14/02/2014 23:56 36,064 RAWRITE13.EXE
14/02/2014 23:54 6,170 RAWRITENT.DOC
14/02/2014 23:54 24,576 RAWRITENT.EXE
14/02/2014 23:55 588 rc.dhcpd
14/02/2014 23:55 547 rc.tftpd
16 File(s) 3,082,011 bytes
2 Dir(s) 462,077,952 bytes free


I find the online help rather contradictory with one site saying load this and another saying load that. I'm sure they are all right but my depth of knowledge cannot understand all the scripts described. I thought some script would run, unpack the ISO file and it would all work like I was installing from a CD. Seems I'm wrong.

Thanks

jefro 02-15-2014 02:43 PM

Not exactly sure what you are seeing. What does ls or other command line tools show?


http://diddy.boot-land.net/pxe/files/tftpd32.htm shows most of the options needed. Be sure to test the transfer size for best number.
I have only sent over data from the tftp folder. Haven't used mounted usb's.



There are a few hundred tutorials on pxe subject. All are different by the way. A slightly different way is to use gpxe/ipxe so that one might use internet to get data or local source other than tftp. Tftp is connectionless and could fail on bad connections.

This link has most of the tips. http://docs.slackware.com/slackware:pxe_install
http://docs.slackware.com/slackware:install

Both suggest you can use the dvd to boot a client.

SAJM 02-15-2014 03:17 PM

Quote:

Originally Posted by jefro (Post 5118323)
Not exactly sure what you are seeing. What does ls or other command line tools show?


http://diddy.boot-land.net/pxe/files/tftpd32.htm shows most of the options needed. Be sure to test the transfer size for best number.
I have only sent over data from the tftp folder. Haven't used mounted usb's.



There are a few hundred tutorials on pxe subject. All are different by the way. A slightly different way is to use gpxe/ipxe so that one might use internet to get data or local source other than tftp. Tftp is connectionless and could fail on bad connections.

This link has most of the tips. http://docs.slackware.com/slackware:pxe_install
http://docs.slackware.com/slackware:install

Both suggest you can use the dvd to boot a client.

After loading PXElinux.0 I get the following

......
Trying to load: pxelinux.cfg/default
Could not find kernel image: linux
boot:

Now if I load huge.s it starts loading then the laptop just locks up and i have to remove the batteries to restart.

The file you suggested odin1440.img loads, but my monitor just displays crazy colourful patterns. I have to power off to recover.

jefro 02-15-2014 07:12 PM

Maybe this??? https://www.linuxquestions.org/quest...oading-555403/

allend 02-15-2014 07:41 PM

Do not bother with trying to use XP and tftpd32. Instead, boot that computer from your USB stick and run pxesetup.
http://www.linuxquestions.org/questi...1/#post4967100

SAJM 02-16-2014 05:21 AM

Quote:

Originally Posted by allend (Post 5118441)
Do not bother with trying to use XP and tftpd32. Instead, boot that computer from your USB stick and run pxesetup.
http://www.linuxquestions.org/questi...1/#post4967100


Sadly my old laptop won't boot from a USB stick :-(

allend 02-16-2014 06:09 AM

I meant that you could boot the Slackware install media on your computer running XP and use pxesetup to make that a PXE server. This would all be run without affecting your XP install.

SAJM 02-16-2014 08:20 AM

Quote:

Originally Posted by allend (Post 5118612)
I meant that you could boot the Slackware install media on your computer running XP and use pxesetup to make that a PXE server. This would all be run without affecting your XP install.

I have the laptop connected to the XP TFTP server and it is assigned an ip address. The problem is what do I enter at the boot: prompt to start the install. Nothing I seem to try works. The laptop hangs up, does nothing or displays crazy colours on the screen and then reboots.

SAJM 02-16-2014 09:44 AM

Quote:

Originally Posted by SAJM (Post 5118676)
I have the laptop connected to the XP TFTP server and it is assigned an ip address. The problem is what do I enter at the boot: prompt to start the install. Nothing I seem to try works. The laptop hangs up, does nothing or displays crazy colours on the screen and then reboots.

Amongst the many discussions on PXE booting there seem to be 2 common threads. One is to boot huge.s and the other is vlinuz.

Booting huge.s loads on my laptop but gets to a stage where it wants me to "Insert root floppy and press ENTER" This is suprising because I understood linux has not been bootable from a floppy for years.

I simply cannot find the file vmlinuz on the slackware ftp site.

etherboot.img seems logical to me but that has display issues on my laptop, although it does load as I mentioned earlier.

I seem to be going round and round the same thing and must be missing the obvious.

SAJM 02-17-2014 09:51 AM

Quote:

Originally Posted by SAJM (Post 5118698)
Amongst the many discussions on PXE booting there seem to be 2 common threads. One is to boot huge.s and the other is vlinuz.

Booting huge.s loads on my laptop but gets to a stage where it wants me to "Insert root floppy and press ENTER" This is suprising because I understood linux has not been bootable from a floppy for years.

I simply cannot find the file vmlinuz on the slackware ftp site.

etherboot.img seems logical to me but that has display issues on my laptop, although it does load as I mentioned earlier.

I seem to be going round and round the same thing and must be missing the obvious.

I tried to load hugesmp.s and the same thing happened as with huge.s. The file downloaded from tftpd32, unpacked and loaded onto the laptop. again it asked for the root floppy (remember this laptop has no floppy) If I ignored the floppy and pressed enter anyway the laptop just locked up and required a power restart.

allend 02-17-2014 07:09 PM

I suspect that you are not loading the initrd image with the kernel image. On my PXE boot setup on Slackware I have this in the directory containing the files to be accessed by PXE.
Code:

bash-4.2$ tree /var/ftpd
/var/ftpd
|-- README.TXT
|-- VERSIONS.TXT
|-- f2.txt
|-- initrd.img
|-- kernels
|  |-- huge.s
|  |  |-- System.map.gz
|  |  |-- bzImage
|  |  `-- config
|  |-- hugesmp.s
|  |  |-- System.map.gz
|  |  |-- bzImage
|  |  `-- config
|  `-- memtest
|      |-- README
|      `-- memtest
|-- message.txt
|-- pxelinux.0
`-- pxelinux.cfg
    `-- default

The content of pxelinux.cfg/default is
Code:

default hugesmp.s
prompt 1
timeout 1200
display message.txt
F1 message.txt
F2 f2.txt
label huge.s
  kernel kernels/huge.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
label hugesmp.s
  kernel kernels/hugesmp.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=hugesmp.s
label speakup.s
  kernel kernels/hugesmp.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=hugesmp.s
label memtest
  kernel kernels/memtest/memtest

Note the append lines to create the ramdisk including the Slackware installer image.

SAJM 02-17-2014 07:39 PM

Quote:

Originally Posted by allend (Post 5119628)
I suspect that you are not loading the initrd image with the kernel image. On my PXE boot setup on Slackware I have this in the directory containing the files to be accessed by PXE.
Code:

bash-4.2$ tree /var/ftpd
/var/ftpd
|-- README.TXT
|-- VERSIONS.TXT
|-- f2.txt
|-- initrd.img
|-- kernels
|  |-- huge.s
|  |  |-- System.map.gz
|  |  |-- bzImage
|  |  `-- config
|  |-- hugesmp.s
|  |  |-- System.map.gz
|  |  |-- bzImage
|  |  `-- config
|  `-- memtest
|      |-- README
|      `-- memtest
|-- message.txt
|-- pxelinux.0
`-- pxelinux.cfg
    `-- default

The content of pxelinux.cfg/default is
Code:

default hugesmp.s
prompt 1
timeout 1200
display message.txt
F1 message.txt
F2 f2.txt
label huge.s
  kernel kernels/huge.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
label hugesmp.s
  kernel kernels/hugesmp.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=hugesmp.s
label speakup.s
  kernel kernels/hugesmp.s/bzImage
  append initrd=initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=hugesmp.s
label memtest
  kernel kernels/memtest/memtest

Note the append lines to create the ramdisk including the Slackware installer image.

Thanks

I have that script and several others quoted by numerous help pages on the subject. They have different names but all contain the same script. It does not load. The only file I can get across via tftp is pxelinux.0 which gives me a boot: prompt!

The more I read up on the subject the more confused I get. My PXE boot tree which I downloaded from a Slackware 14.1 mirror (and is displayed on an earlier post) looks nothing like yours. It seemed logical to me to download the PXE/USB and ethernet boot directory, after all that's what I'm trying to do, is this wrong?

allend 02-18-2014 05:22 AM

From README_PXE.TXT in the usb-and-pxe-installers directory of the Slackware install media. (Originally written for Slackware 13.37 but has not changed)
Quote:

The tftp directory structure:

As you can see in the DHCP section, the DHCP server has been configured
to offer any interested PXE client (i.e. your computers network card) the
file "/slackware-13.37/pxelinux.0" - this file contains the bootable code
that first downloads and starts a Linux kernel, and then downloads and
extracts the root filesystem containing the setup program and everything
else that we need. This filename "/slackware-13.37/pxelinux.0" indicates
a pathname relative to the root of the TFTP server. The PXE client will
use the tftp protocol to fetch this bootloader. So this is what we do:
create this directory "slackware-13.37" and copy the required files into it.
First, the pxelinux bootloader itself:

mkdir /tftpboot/slackware-13.37
mkdir /tftpboot/slackware-13.37/pxelinux.cfg
cp /usr/share/syslinux/pxelinux.0 /tftpboot/slackware-13.37/

Also, we need the files from the Slackware CDROM that show the
informative messages in the beginning. Assuming your local copy of the
Slackware release can be found in "/mirror/slackware/slackware-13.37"
(change paths in the below commands if your location is different) :

cp /mirror/slackware/slackware-13.37/isolinux/message.txt /tftpboot/slackware-13.37/
cp /mirror/slackware/slackware-13.37/isolinux/f2.txt /tftpboot/slackware-13.37/

Very important: we need the initial ramdisk image (initrd.img) and the pxelinux configuration file that contains the instructions for the PXE clients:

cp /mirror/slackware/slackware-13.37/isolinux/initrd.img /tftpboot/slackware-13.37/
cp /mirror/slackware/slackware-13.37/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware-13.37/pxelinux.cfg/default

And lastly, we need all the kernels that the Slackware installer lets you
choose from:

cp -a /mirror/slackware/slackware-13.37/kernels /tftpboot/slackware-13.37/
Your PXE boot tree is not working and does not match with mine (built from the above instructions). Might be worth a try. ;-)

SAJM 02-18-2014 06:01 AM

Quote:

Originally Posted by allend (Post 5119913)
From README_PXE.TXT in the usb-and-pxe-installers directory of the Slackware install media. (Originally written for Slackware 13.37 but has not changed)

Your PXE boot tree is not working and does not match with mine (built from the above instructions). Might be worth a try. ;-)

I have done as you suggested but do not understand the following:

cp /mirror/slackware/slackware-13.37/isolinux/initrd.img /tftpboot/slackware-13.37/
cp /mirror/slackware/slackware-13.37/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware-13.37/pxelinux.cfg/default

has the file "pxelinux.cfg_default" been renamed "default"

allend 02-18-2014 06:15 AM

Quote:

cp /mirror/slackware/slackware-13.37/isolinux/initrd.img /tftpboot/slackware-13.37/
Notice the trailing forward slash at the end of the command. It copies the "initrd.img" file into the top of the PXE boot tree.
Quote:

cp /mirror/slackware/slackware-13.37/usb-and-pxe-installers/pxelinux.cfg_default /tftpboot/slackware-13.37/pxelinux.cfg/default
That command copies the "pxelinux.cfg_default" file into the pxelinux.cfg subdirectory of the PXE boot tree and renames it to "default".

The output of the tree command in post#11 is your friend.


All times are GMT -5. The time now is 12:09 PM.