Jump to content











Photo
- - - - -

grub2 freedos attach virtual floppy disk

grub2

  • Please log in to reply
1 reply to this topic

#1 Thermionix

Thermionix
  • Members
  • 3 posts
  •  
    Australia

Posted 05 August 2014 - 07:55 AM

Hi all,

 

I'm interested in loading freedos under grub2 and attaching a virtual floppy to it

 

The aim being to have a folder on the disk containing several tar.gz files, each of which would show up as a menu entry - such that it is quick to add a new dos utilities (i.e. several different bios update files)

 

Below are a few different theoretical examples to append wdidle3.exe into FDSTD.288.imz

menuentry "memdisk FDSTD.288.imz" {
	loopback loop /bootisos/wdidle3_1_05.img
	linux16 /boot/grub/memdisk # magic : append files from (loop)?
	initrd16 /bootisos/FDSTD.288.imz
}

menuentry "concatenate initrd" {
        # wdidle3_1_05.img fat16 img containing wdidle3.exe
	linux16 /boot/grub/memdisk
	# magic : memdisk to accept concatenated images
	initrd16 /bootisos/FDSTD.288.img \
		/bootisos/wdidle3_1_05.img
}

menuentry "concatenate files" {
	loopback loop /bootisos/FDSTD.288.gz
	loopback loop1 /bootisos/wdidle3_1_05.tar.gz
	# magic : new grub2 command? to build ramdisk
	# append files from (loop) and (loop1)
	freedos (rd)/kernel.sys
}

menuentry "wimboot FDSTD.288" {
	loopback loop /bootisos/FDSTD.288.gz
	loopback loop1 /bootisos/wdidle3_1_05.tar.gz
	linux16 /boot/grub/wimboot
	# magic : rewrite wimboot to !bootmgr
        # it'd be possible to loop over all files in loop+loop1 and append automatically
	initrd16 \
		newc:kernel.sys:(loop)/kernel.sys \
		newc:command.com:(loop)/command.com \
		newc:wdidle3.exe:(loop1)/wdidle3.exe
}

I'd prefer to reuse something if possible

Any existing modules/bins/code/examples/tips ?

Don't hesitate to post!



#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 05 August 2014 - 10:02 AM

Is there a reason (possibly valid) to *need* GRUB2? :unsure:

 

 

What you posted is "wishful thinking" (i.e. you just "invented" some non existing commands/methods, i.e. "pseudo-code" for the sake of explaining the matter), right? :dubbio:

 

I mean, though cannot really say about GRUB2, the final result (and not necessarily getting it through the methods you hinted) would be easy in grub4dos.

 

You know *like*:

insmod fat
find --set-root /bootisos/myfreedos.ima.gz
map -- mem /bootisos/myfreedos.ima.gz (fd0)
map --hook
fat copy /bootisos/wdidle3.exe (fd0)/
root (fd0)
chainloader /kernel.sys
boot

More ideas (and more complex code) here:

http://reboot.pro/to...-drive-in-ram/ 

and here:

http://www.rmprepusb...rials/grubutils

 

:duff:

Wonko







Also tagged with one or more of these keywords: grub2

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users