Jump to content











Photo
- - - - -

PXELINUX + creating USB boot images


  • Please log in to reply
6 replies to this topic

#1 ndog37

ndog37

    Member

  • Members
  • 83 posts
  •  
    New Zealand

Posted 10 September 2010 - 05:05 AM

We have a PXELINUX boot server and it is working well.

We network boot from PXE and push out a menu that looks like this.

LABEL NETBOOT
MENU LABEL Map \\ghostbox\images - ^Netboot 6.5
LINUX memdisk raw
INITRD /ghostbox_netboot_6.5.sys

LABEL MEMTEST
MENU LABEL ^Memtest86+ 4.10
LINUX /memdisk
APPEND iso
INITRD /mt410.iso


I have a bootable USB pen drive that I would like to convert to an img file and then load it via PXE boot, however the USB is 16GB, and the data is only 160MB. Using software to extract the data to .ima format ends up in a 16GB file.

Does anyone know how I can extract this bootable USB drive to a kind of pxe bootable format and without the huge file size.

Is this possible? Or does the filesystem stuff get in the way.

Another way I was thinking, which may work better would be to convert the USB to ISO and then ISO boot it via PXELINUX and memdisk, however this is something that I also can't figure out well.

Thanks all

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 September 2010 - 09:57 AM

I have a bootable USB pen drive that I would like to convert to an img file and then load it via PXE boot, however the USB is 16GB, and the data is only 160MB. Using software to extract the data to .ima format ends up in a 16GB file.


WHAT does the USB pen drive contain?
Like DOS, Linux, XP, whatever...
HOW it is partitioned/formatted?
Like which filesystem(s), how many partitions, etc.
WHICH bootloader/MBR it uses?
Like standard OS MBR, grub4dos, syslinux, whatever...

Most probably Clonedisk would do:
http://www.boot-land...?showtopic=8480
but cannot say without some more info, there may also be other and "better" ways.

:hyper:
Wonko

#3 erwan.l

erwan.l

    Gold Member

  • Developer
  • 1974 posts
  • Location:Nantes - France
  •  
    France

Posted 10 September 2010 - 06:06 PM

WHAT does the USB pen drive contain?
Like DOS, Linux, XP, whatever...
HOW it is partitioned/formatted?
Like which filesystem(s), how many partitions, etc.
WHICH bootloader/MBR it uses?
Like standard OS MBR, grub4dos, syslinux, whatever...

Most probably Clonedisk would do:
http://www.boot-land...?showtopic=8480
but cannot say without some more info, there may also be other and "better" ways.

:hyper:
Wonko


I will not answer about the booting part for now but will focus on the first part of the question : how to backup your 160mb out of the 16gb usb drive.

Use clonedisk and tick 'dont backup unpartitionned space' : it could do it, provided that the 160mb you mention is a partition, if not then you'll have to copy the files manually and to take care of the mbr / bs as well.

/Erwan

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 10 September 2010 - 06:59 PM

Let me ask a question which is seemingly unrelated:-

In both Windows & Linux host, what can we use as a pxelinux server apart from TFTPD32 ?


Actually it is NOT "seemingly" unrelated, it is TOTALLY unrelated.

A technical board is not a chatroom!

This is called thread hijacking:
http://www.urbandict.....ead hijacking

If you have a question start a thread with your question, DO NOT post questions on other people's threads unless STRICTLY related to the thread.

Here a member asked for help on a very specific question, not a "generic" one, and even if that was the case, your question is completely OT.

:hyper:
Wonko

#5 ndog37

ndog37

    Member

  • Members
  • 83 posts
  •  
    New Zealand

Posted 11 September 2010 - 02:58 AM

Thanks for your prompt replies.

I have downloaded clonedisk and will test it tonight or tomorrow when I have some time.

The USB disk is something I created following the advice of a website. I used a windows usb format tool which copies the DOS files (I believe) io.sys, himem.sys, command.com and makes it bootable. You then manually copy the rest of the files to the usb which the menu loads.

So it is a FAT partition with a DOS (win98?) boot loader.

Hope that makes sense to you.

Maybe there is another way, where I can create a disk image directly, using the disk format tool and coping the files directly to the disk image, rather then creating a bootable USB stick and then converting that to a pxe image... To me this would probably be better, since I would like to create more pxe bootable images in future, using images that I make.

In any case I am learning a lot here and I appreciate your efforts.

Thanks

#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13745 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 September 2010 - 09:14 AM

Maybe there is another way, where I can create a disk image directly, using the disk format tool and coping the files directly to the disk image, rather then creating a bootable USB stick and then converting that to a pxe image... To me this would probably be better, since I would like to create more pxe bootable images in future, using images that I make.


Sure there is. :)

If you are running 2K/XP or later, there are a few batches and a program or two capable of doing that.

Easiest would be:
http://www.boot-land...?showtopic=9033
or
http://www.boot-land...?...c=11857&hl=

The created image will have the 2K/XP MBR (which is allright) and the 2K/XP PBR (or bootsector - which is NOT allright), obviously the image must use FAT, since you already did it with a 16 Gb stick, it means that you used FAT32, which means that the DOS is 7.x or some other DOS version that supports FAT32.

You then need to use another program, like MBRFIX, to write the Win9x PBR (or you can use another bootloader, like grub4dos or syslinux, or whatever, or you can use NTLDR+BOOT.INI):
http://www.sysint.no...ting/mbrfix.htm


There is also another nice tool around:
http://www.boot-land...?showtopic=7975


Then you can copy to the image all the DOS files you want.

DOS 7.x and later (read as Win9x/Me) - unlike DOS 6.22 and earlier - NEED NOT to have IO.SYS as first file in the FAT filesystem, though it is always a good idea to copy to the filesystem files in this order:
  • IO.SYS
  • MSDOS.SYS
  • COMMAND.COM
  • all the other files and directories

:hyper:
Wonko

#7 bensf401

bensf401
  • Members
  • 1 posts
  •  
    United States

Posted 22 September 2015 - 04:38 AM

I know this is 5 years old but hoping you guys are still around and ndog37 was able to accomplish what he needed. If so what were your exact steps if you wouldn't mind sharing.

 

I'm trying to hack together my Dell Image Assist preboot environment USB drive to get a PXE bootable image to use with Syslinux. I have my Syslinux server working fine I just need to convert correctly what's on the USB drive to a Syslinux compatible ISO or IMG file. I'll check out clonedisk and the other suggestions posted above. Thanks.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users