1

Topic: PXE boot support

Is it possible to boot one of the images from the network. This would really help out in my lab environment I use unattended to do all of my Linux/Windows installs and often need to use gparted to format disks with unusual disk controllers.

BTW I made a weak attempt at using the usb images but failed.

Thanks
Ty

2

Re: PXE boot support

this looks like a livemedia question smile

tomorrow i'll ask someone who has a great deal of experience with this kind of stuff. Hopefully his answer will help.

3

Re: PXE boot support

I don't have a clue or a place to test it. If people want this to work I'm going to need a hand.

4

Re: PXE boot support

This might be a good start. As for testing I am capable of testing once you have something ready.

http://www.damnsmalllinux.org/talk/node/248

Thanks
Ty

5

Re: PXE boot support

tmorton, i think you are getting the wrong idea about us and OSS in general smile
We are not sitting here, eagerly waiting for someone to give us something to do. If you want this functionality (and i must admit, it sounds cool) you have to do some research yourself.

e.g. what is the concept?
boot - get kernel - get network up -  grab live image from the internet/network - start it...

something like that?

etc etc.. please participate to keep this fun for everybody involved.

6

Re: PXE boot support

ah well, after reading the link you provided i think we have a lot of info to start with. In the future i should first read links and then respond instead of the other way around.

sorry for sounding harsh, must be the lack of caffeine smile

Patrick, what do you think of all this?

7

Re: PXE boot support

In your defense My second message did come out wrong. My initial question was just weather or not anyone has done this before. I in no way meant it to sound like hey you guys have nothing going on why don't you implement this functionality. I am sure you guys have plenty to work on and I know this is not your full time job. I apprecite the effort that has gone into the project. My apologies.

Ty

8

Re: PXE boot support

Hi Guys

Thanks for this great LiveCD, but I wanted to boot this system vi PXE, too wink
Hope you implemented in the future versions.

Greetings from Germany
Snikch

9

Re: PXE boot support

First, I would love to hear everything about pxe because, I don't know much about it. But I do know a little. A while back a friend wanted to boot DSL (damn small linux) using PXE, but the problem he was having, is that he could load the kernel and initrd from the pxe (tftp) server, but not the main filesystem. So, I told him why not just put the DSL file system in the initrd file. Now the initrd file became a big ass file (50MB+) to load over the network. But in the end It worked. DSL booted and search and found the filesystem, couldn't you just do the same thing with gparted's filesystem? and you do need the ram. Just a thought.

10

Re: PXE boot support

tmorton wrote:

This might be a good start. As for testing I am capable of testing once you have something ready.

http://www.damnsmalllinux.org/talk/node/248

Thanks
Ty

well this is my idea, i guess i should read before i post.

11

Re: PXE boot support

Hi,

is there already a solution?
I'm searching for a pxe boot solution, too.



Hannes

12

Re: PXE boot support

Has really nobody an idea how to boot gparted via pxe???

13

Re: PXE boot support

Hannesdance wrote:

Has really nobody an idea how to boot gparted via pxe???

Well, I've a modified USB-Image in my PXE. I'm going to write a little work-through and post it here.
Maybe you have to wait until tomorrow :)

Regards,
  David

14

Re: PXE boot support

And here it is: GParted via PXE

After some attempts I succeeded in booting GParted via PXE. Because I read that some of you wanted the same, I'll post my steps how I got it working.

For sure, we need GParted. I used the USB-Version (0.3.1.1). If the ISO works either and if the steps are similar, I don't know smile Then we will need the tool ext2resize. It is available at http://ext2resize.sf.net and also as Debian package. That's all smile

At first I'll explain a bit how the GParted image works. When we boot from the stick, a little linux image will be loaded from the initial ramdisk (initrd.gz). When it is starting up, it will check each USB-port if there is an stick attached which includes a file named "gparted" in its root directory. If such a port was found, the stick is mounted and the image and GParted will be loaded.
If we want to boot via PXE, we do not have any stick attached to the system, so that check will fail. We also do not want do deliver an additional file (gparted) via the PXE. The solution is to include that file into the initrd and modify the startup script.

Sounds quite easy, doesn't it? wink So, let's start.

First of all, we have to extract the zip archive. Then unzip the initial ramdisk:
# gunzip initrd.gz
The initrd has a proper size but it's to small to include the gparted file (it has a size of round about 23MB). So we have to enlarge the ramdisk. Before we can do that, we have to define the file sizes of initrd and gparted:
# du -m initrd
14    initrd
# du -m gparted
23 gparted
The initrd has a size of 14MB, gparted is 23MB. I've enlarged my initrd with 25MB, so there is enough free space.
Enlarging is done by
# dd if=/dev/zero of=initrd bs=1M seek=14 count=25
That means we'll find the point that is 14MB in the image and append 25MB from there on. The resulting image will have a size of 29MB. Then, we've to run ext2resize on that image to enlarge the file system either:
# ext2resize initrd

Now we will mount that image into the new subfolder image (using a loop-device) to be able to edit it:
# mkdir image
# mount initrd image/ -o loop
If we have a look into that folder, we will find there a complete folder structure as on every other linux system, too. Now, we can copy the gparted-file into the /tmp-folder of the image:
# cp gparted image/tmp

Then we have to edit the startup script of the initial ramdisk. It is named linuxrc and can be found in the image-folder.
In that file, there is a section that tests the USB devices. It starts with the line
  USB_LIST=""
and ends in from of the line
  if [ -f /dev/ramboot ]; then
I have simply deleted them all smile
After that line, the stick will be mounted to /tmp. But we have the gparted-file already there, so we do not need mounting it. Delete that line and the following one with the sleep command. The first line after
  if [ -f /dev/ramboot ]; then
should be
  losetup /dev/loop0 /tmp/gparted >/dev/null 2>&1
Some lines below, the stick will be mounted again, delete that line
  mount -n -t msdos $GPARTED_USB_DEVICE /tmp
either.
Save the file.

Now we've modified everything, we just have to do some clean up.
Unmount the image and gzip the initrd:
# umount image
# gzip initrd

Serve the new initrd.gz with the provided linux-kernel. The other files in the folder are just needed if you boot from the stick, they provide a boot loader.
If you're using pxelinux, you have to do the following:
create a folder gparted in your tftp-root and copy the files in there:
# mkdir gparted
# cp /any/where/initrd.gz gparted
# cp /any/where/linux gparted
Add the following lines to the pxelinux-configuration-file (/tftproot/pxelinux.cfg/default by default)
LABEL gparted
  MENU LABEL GParted
  kernel /gparted/linux
  append noapic initrd=/gparted/initrd.gz root=/dev/ram0 init=/linuxrc ramdisk_size=65000
If you want to use the "Low memory"-version of GParted, set the ramdisk_size to a smaller number, eg. 16384.

That's all. Enjoy GParting wink

Regards,
  David

15

Re: PXE boot support

dtibbe:

Can I dowload your working modified pxe gparted thingie from some place? I would like to incorperate this into an official release and give you credit. It would be nice to use yours because we know it works and I have no way to test it.

One major upcoming problem. Starting with the next release I'm using the same compression that the Slax and Puppy guys are using for their squashfs. The initrd and gparted file are going to be compressed with LZMA compression and Squashfs combined. This takes 4mb off the total size of the download. It would be much easier on people if I just made an official pxe release. In order to mount the initrd they will need the kernel that is on the livecd or patch the one on their running system.

People like you make open source worth it. Thanks.

16 (edited by skyman 2007-02-27 23:17:47)

Re: PXE boot support

I would like to revisit this. I am also trying to make the iso pxe bootable.

I am trying to use this (http://www.byteclub.net/wiki/Gentoo_live) as a guide but I think dtibbe's method would be simpler.

If anyone has made the image he talks about or has complete instructions it would be much appreciated.

17 (edited by Patrick Verner 2007-03-05 02:06:26)

Re: PXE boot support

Hello skyman, I made the old GParted LiveCD and I started a new project called Parted Magic. I'm working on this today and I need somebody to test it. When I get it done are you willing to test it? Drop me an e-mail if you are interested. I'm going to make a new product called partedmagic-pxe for the next release cycle. That way you guys can just unzip it to your server without having to hack it every version.

Here it is:

http://www.partedmagic.com/downloads/te … -test1.zip

Patrick Verner
www.partedmagic.com

18

Re: PXE boot support

Patrick, this works well. I've tested on an asus PSCH-SATA based system, and a compaq SR1420NX, using the onboard interfaces on each. The only modification I made was to the pxe config file so it would automatically load with my pxelinux configuration (from RHEL):

default pmagic
label pmagic
  kernel /pmagic/bzImage
  append noapic initrd=/pmagic/initrd.gz root=/dev/ram0 init=/linuxrc ramdisk_size=100000

Once booted the product works as expected. Thanks!

19

Re: PXE boot support

Thanks a lot,
I converted the USB-version into the PXE-version and it worked wonderful!

But is there a possibility to convert the CD-Version, too?
I'm asking, cause only the CD-Version is updatet, but the USB-Version is an old one and wasn't updated sice months....


So far
Hannes