Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RAW Read and Write to DISK
2015-07-18, 11:08
Post: #1
RAW Read and Write to DISK
does someone know a way to use ipxe to download a img file and save it to the local disk? or reading the disk and uploading it to a http server?
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-07-19, 00:44
Post: #2
RE: RAW Read and Write to DISK
iPXE does "not" have any disk support.
The exception being the ability to log data to an specific partition type that can be used in case no other log facility is available, commit: https://git.ipxe.org/ipxe.git/commit/3ec...4454ba1513

Other then disk access, iPXE is also missing any kind of filesystem support, maybe you could chain to grub to do this, but I don't think grub has any kind of fs write support eighter?

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-07-19, 10:52
Post: #3
RE: RAW Read and Write to DISK
it is not necessary to have filesystem support.
what i would like to do is
imgfetch http://server/image.img
imgverify image.img http://server/image.sig
imgwrite /dev/sda image.img
which would write the img file to disk (including the mbr/gpt in the img file)

this way one could build a rescue system without anything but ipxe.
Visit this user's website Find all posts by this user
Quote this message in a reply
2015-08-19, 15:16
Post: #4
RE: RAW Read and Write to DISK
What's driving your desire for iPXE-only? I would do this by booting into a minimal Linux initrd. Gentoo have a decent guide.

You would give iPXE something like:
Code:
#!ipxe
dhcp
kernel disk-write/kernel
imgfetch disk-write/initrd
imgfetch disk-write/sda.img /sda.img
boot

The image fetched to /sda.img will appear in that location once you've booted.

The /init in your initrd could then be something like:
Code:
#!/bin/busybox sh

dd if=/sda.img of=/dev/sda
echo Completed.
sleep 10
shutdown -r now
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)