LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2018, 02:17 AM   #1
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Rep: Reputation: Disabled
PXE Boot question


This question is different from the one(s) I asked before. PXE boot for us is to be used to install "first" image to brand new circuit boards.

After some online reading, it seems some SSDs would have been pre-formated/partitioned when new, while others won't. Assuming we need to deal with the latter case, would it be similar (or the same) as if we haven't connected the SSD to the board?

When I PXE boot a board without SSD (external, disconnected), the boot up initialization hangs up with a message "Waiting for removable media". What is the requirement for this "removable media"? I suppose I could try to address this with NFS mount. Can I also specify root=/dev/ram0? bzImage and Initrd both seem small enough to fit into this 64MB RAM disk, but the rootfs could be much bigger. Would this be a problem?

Also, I've seen USB thumb drive based boot-up (with .hddimg) actually could provide "Serial console install" also. The command line seems to have "LABEL=install". Can I "append" this in pxelinux.cfg/default to implement install the downloaded image on SSD?
 
Old 04-25-2018, 07:15 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
PXE boot doesn't by its nature download anything. It fetches what it needs to run the system from a remote machine. If you want it to image a disk, you must have some program to tell it so. PXE just gets the system booted enough to connect to a remote machine and load the system into memory.
 
Old 04-25-2018, 10:42 AM   #3
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by AwesomeMachine View Post
PXE boot doesn't by its nature download anything. It fetches what it needs to run the system from a remote machine. If you want it to image a disk, you must have some program to tell it so. PXE just gets the system booted enough to connect to a remote machine and load the system into memory.
Thanks. That's true. Is there any directive (e.g. to say root=/dev/ram0) to have it installed anything on RAM disk, in order to stop it from accessing or waiting for other storage devices that may not be present. I'll try out this idea today, though I've been trying out many things in the BIOS boot options area.
 
Old 04-25-2018, 01:17 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Might need to know what you are working on.

PXE is a standard but few boards (nic roms/bios's) support those standards exactly. Many of the web how to's give different solutions to problems.

Your pxe image will/may have to be built for pxe or may need memdisk or other way to copy to some temp area. Not all images pxe boot.

Also look at gpxe/ipxe.

Tell us what web example you are using too.

Last edited by jefro; 04-25-2018 at 01:55 PM.
 
Old 04-25-2018, 03:41 PM   #5
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Okay, jefro.

I've a Intel Xeon D processor, running Yocto Linux (Poky), 2.1 released in 2016. This is an embedded (networking/telecom) system. The system boots up with BIOS instead of core/U-boot. The problem I'm trying to solve is that we'll have new boards coming in with blank SSD. So we need PXE to boot the system up, in order to allow us to install new image on the SSD.

I've setup a DHCP server on a Centos 6.9 Linux, that also runs tftp server. I could verify with console message on PXE client side, and DHP server side, as well as tcpdump that DHCP protocol is complete successfully, and so is tftp transferring a bunch of files (bzImage, initrd, libutil.c32, menu.c32, lib com.c32, pxelinux.cfg/default), as expected. The pxelinux.cfg/default has the following content (probably not simplest/cleanest):


DEFAULT menu.c32
prompt 0
timeout 300
totaltimeout 301
ONTIMEOUT local

MENU TITLE PXE Menu

LABEL Network Boot
MENU LABEL PXE Boot
kernel images/bzImage
append initrd=images/initrd

LABEL local
MENU LABEL Boot with next boot device
LOCALBOOT -1


The system would network-boot up to Linux prompt, so long as I have either a USB thumb drive inserted, or SSD connected. I'm a little worried about the system unable to come up if SSD is blank (the one I used is no longer new/blank, and might have different format etc.). So I disconnect both USB drive and SSD, but find system hangs "waiting for removable media".

I'm currently trying to find out if there're simple kernel/boot options I could add to above pxelinux.cfg/default that would instruct the boot up process to use RAM disk instead of depending on other media, removable or otherwise. Once network boot is complete, my plan is to transfer the same .hddimg I previously used on USB bootable image onto the SSD (possibly with manual partitioning, and format with a file system, e.g. ext3/4) with pretty much a similar "dd" command. Is there such a boot option? I've come across reliance on NFS as well. Again, if RAM disk based book-up works, it may be simplest.

As for web examples, I'd looked into a number of them, including Youtube videos. Here're some of them (along with syslinux.txt and pxelinux.txt):

https://www.cisco.com/c/en/us/td/doc...xe-install.pdf
https://wiki.centos.org/HowTos/PXE/PXE_Setup/Menus

I'm aware of gpxe and ipxe. Would I need to re-program my BIOS to get them working? Or I need to look into chain-booting etc. (which would complicate things further)?

Last edited by rksyeung; 04-25-2018 at 04:46 PM.
 
Old 04-25-2018, 07:21 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
One last question. Are these being deployed to areas and you having untrained people automate install???

If you are simply loading software at some workbench then you have other ways. Boot to usb and clone or copy disk image or partitions. Suppose you could pxe boot to clonezilla too.

We have to assume you are booting to CSM mode or other non-uefi.

Not sure what you want to happen here. When you say it boots to prompt only if you have a drive installed makes me wonder. PXE has been around for a while for diskless systems. Stopping looking for media makes me think some issue in image seeking dual named resource.


Gpxe/Ipxe is only useful really if your pxe bios is borked or you wish to boot from other than tftp usually. You'd need to either burn the nic or use a usb to boot initially. Just boot to usb (hard drive order)

Kind of a lot going on with network booting. Try other images maybe opensuse pxe or other known working images or filesystem sourced boot media.

I might not get back here for a week..

Last edited by jefro; 04-25-2018 at 07:24 PM.
 
Old 04-25-2018, 10:08 PM   #7
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
One last question. Are these being deployed to areas and you having untrained people automate install???

If you are simply loading software at some workbench then you have other ways. Boot to usb and clone or copy disk image or partitions. Suppose you could pxe boot to clonezilla too.

We have to assume you are booting to CSM mode or other non-uefi.

Not sure what you want to happen here. When you say it boots to prompt only if you have a drive installed makes me wonder. PXE has been around for a while for diskless systems. Stopping looking for media makes me think some issue in image seeking dual named resource.


Gpxe/Ipxe is only useful really if your pxe bios is borked or you wish to boot from other than tftp usually. You'd need to either burn the nic or use a usb to boot initially. Just boot to usb (hard drive order)

Kind of a lot going on with network booting. Try other images maybe opensuse pxe or other known working images or filesystem sourced boot media.

I might not get back here for a week..
Hi jefro -

We'd be dealing 1st image installation on many boards in our manufacturing at production time. The board doesn't have USB connector support; thus the USB boot-up route won't work/apply. I'm using USB thumb drive for the evaluation platform but actual product/system will not have support.

At some point disk image cloning also won't work. I was told each disk image is encrypted eventually and they would all be different even though same executable S/W is installed. In my boot device priority, I set it to UEFI (not legacy); no legacy device is shown there in BIOS.

The hang-up of initialization looking for removable device presumably is already outside domain of PXE boot. It's the actual image (bzImage and initrd). I'm thinking it may be trying to install roofs on the "real" root device. And I'm also thinking that such root device could be remote disk over NFS. That's why I'm currently looking into NFS, trying to satisfy the kernel init. When I read up on how diskless systems boot up via PXE, that's what happens - NFS mount has to happen.

I'll try to share my pxelinux.cfg/default file for the NFS options/parameters. I'd tested both the client and server could mount if I do it manually on the client side. Somehow, it's not happening yet if I use configuration file. Not sure what could be missing.
 
Old 04-29-2018, 04:16 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Maybe look at this: https://clonedeploy.org/
 
Old 04-30-2018, 12:57 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I understand now why you wish to pxe boot.

There are so many variables in this I can't really answer.

Yocto, unknown to me board, current pxe config and this development usb port/vs production.

At some point you will have to boot to some image to get the installer working. I have only peeked at yocto and as I recall you have an image of some form. What you'd want would be some minimal distro or automate write to the mmc or ssd.

For an non automated install you could pxe over some mini distro and try applying your image.

I'd work on first getting some known to work pxe image over to this board.

I've almost always used memdisk but that was a long time ago.

Uefi also holds some promise on this. That intel board ought to support all the doc's intel provides on uefi pxe but then you will need to make yocto to be uefi.

Just be warned that even if you boot to legacy/csm the bios may not act as you'd think.
 
Old 04-30-2018, 01:28 PM   #10
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
Thanks again jefro. I'd cross-post my question in networking section. Since then, I'd also found a workable solution that addressed my current issue. Please see here: https://www.linuxquestions.org/quest...6/#post5849033

I'd like to figure out why NFS mount couldn't work for me, however. One suspicion is that the kernel I installed in earlier stage (PXE boot) also starts Avahi that allocates DHCP IP address. This potentially collides with my boot option of ip=dhcp when NFS is about to mount. I'd need to sort out a few things, including how I could turn off Avahi, and perhaps increase verbosity of kernel logging so I could confirm my hypothesis better.
 
Old 04-30-2018, 03:12 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
You will have to get a working example of something to start. Wireshark and maybe other tools may help located requests and replies. Some of the programs used could have logs too.
 
Old 05-16-2018, 06:57 AM   #12
PauloCe
LQ Newbie
 
Registered: May 2018
Posts: 21

Rep: Reputation: Disabled
PXE boot with lenovo thinkpad t61

Dear,
I know the topic does not deal with Boot PXE with lenovo thinkpad t61, but I need to help with PXE boot on the Lenovo Thinkpad T61. I searched the internet for a tutorial to guide me in this task, but I did not find anything. Can anybody help me?
Features: PXE boot with Lenovo T61, to access windows server 2012.
Thanks!
 
Old 05-16-2018, 10:11 AM   #13
rksyeung
Member
 
Registered: Feb 2018
Posts: 71

Original Poster
Rep: Reputation: Disabled
I recall seeing a number of network/PXE boot articles and Youtube videos, some are for Windows. Where're you stuck? You need to enable in BIOS option ROM PXE boot option, and select network boot device. For my case, I use UEFI instead of legacy devices in the "boot" menu at BIOS.
 
Old 05-16-2018, 11:22 AM   #14
PauloCe
LQ Newbie
 
Registered: May 2018
Posts: 21

Rep: Reputation: Disabled
PXE boot with lenovo thinkpad t61

rksyeung,
I saw some videos on youtube. When I follow the steps of the articles and videos, I can not conclude. seems to be missing some option in the bios of the T61. I can not find anything specific for Lenovo Thinkpad T61.
Can you help me?
 
Old 05-16-2018, 11:24 AM   #15
PauloCe
LQ Newbie
 
Registered: May 2018
Posts: 21

Rep: Reputation: Disabled
Quote:
Originally Posted by rksyeung View Post
I recall seeing a number of network/PXE boot articles and Youtube videos, some are for Windows. Where're you stuck? You need to enable in BIOS option ROM PXE boot option, and select network boot device. For my case, I use UEFI instead of legacy devices in the "boot" menu at BIOS.

rksyeung,
I saw some videos on youtube. When I follow the steps of the articles and videos, I can not conclude. seems to be missing some option in the bios of the T61. I can not find anything specific for Lenovo Thinkpad T61.
Can you help me?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
issue with uefi pxe boot on rhel 6.5 as pxe server geekmaxwell Linux - Networking 3 04-02-2014 02:27 PM
[SOLVED] Phoenix BIOS PXE boot question astrogeek Slackware 3 12-01-2012 05:34 AM
pxe boot "PXE-T01 file not found" ssharma_02 Linux - Networking 16 05-18-2011 03:21 PM
When I boot with PXE Boot into openSuse, error says 'invalid or corrupt kernel image' rfelsburg SUSE / openSUSE 0 05-13-2010 08:51 PM
PXE boot server config question kevmcool Linux - Newbie 1 03-13-2010 06:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration