Would PLoP support VHD-files?

Started by Bobby_ii, November 10, 2010, 19:40:19 PM

Previous topic - Next topic

Bobby_ii

have VHD-files its own boot-sector? It seem's that yes.
Now we may to boot from VHD only on kernel-level (2 ways).
2 boot from VHD now we need to boot "bootmgr" that load only {VHD_file}\Windows\system32\winload.exe or modified linux kernel from vmlite. But VHD-drive (file) should have its own boot-sector (that is used when booting under virtual machine). Is the way to boot from the boot-sector inside VHD-container?

Elmar

i don't understand how vhd should be supported?

Bobby_ii

I think, like USB - thru the driver :-) (sorry i'm 0 in programming)
.vhd - virtual drive format, have the same logical structure as physical drives.
   Win7 & Ubuntu may load from .vhd drives in physical environment (don't using virtual machines), but they use boot loader from physical drive & load from .vhd thru kernel, i need to load the boot manager from .vhd (for example, truecrypt boot manager installed in bootrecord of .vhd) and load system installed on .vhd.
I think, there is no big difference between attaching usb-drive & .vhd-container (exept the path to this .vhd container that shoud be given explicitly (sorry for broken english)).

... sorry for my appinion ....
now (i think) structure is: PLOP_boot_loader->USB_CD_drivers->boot_loader_on_selected_drive
structure for support VHD (or others aka wubi) containers should be next:
PLOP_boot_loader->fat_support(extfs2-4,fat**,ntfs :-))->container_structure_support(aka driver)->boot_loader_on_selected_container
so there is 1 important and no_easy_2_relise think - fat support :-(.

Elmar

ok i understand, but the next problem is to get the vhd file structure to be able to convert the virtual (and i am sure compressed) sectors back to "real" sectors. do you have docs?

Bobby_ii

"This specification is provided under the Microsoft Open Specification Promise."
VHD - available under free license for developers and users (tr. from russian :-)).
http://technet.microsoft.com/en-us/virtualserver/bb676673.aspx  (in general)
http://download.microsoft.com/download/f/f/e/ffef50a5-07dd-4cf8-aaa3-442c0673a029/Virtual%20Hard%20Disk%20Format%20Spec_10_18_06.doc   (concrete, doc format)

VHD hardly to be compressed - it is the emulation of physical drive, i.e. empty space in begining. It may use file system compression, for example, ntfs-compression when partitioning/formatting, but it is not .vhd feature.

Elmar

i did a quick view over the doc and it looks good. it should be easy to write a small program to provide access to the virtual sectors and run a bootloader/boot manager from the vhd file. when i write the program, then it will be a single program and not part of the plop boot manager (maybe they merge later). the first version will work only with vhd files on fat16/32 partitions. its easier to implement fat than ntfs. currently i am busy, so it will need some time until its written.

regards
elmar

Bobby_ii

I think that it would be easy to implement .vhd support to GRUB then to PLOP, but thank you.

Elmar

Quote from: Bobby_ii on November 11, 2010, 07:36:08 AM
I think that it would be easy to implement .vhd support to GRUB then to PLOP, but thank you.

what has it to do with grub?

Bobby_ii

#8
This task is particaly solved by vmlite - they create vhd.mod and modified grub2.
I think, vmlite add .vhd support like .iso or wubi .disk support to grub 2.
But they doesn't clearly solved my problem. And they does't gave sources now - only promised to gave after all jobs complete :-). Also they promised to realise XP booting from vhd, but I don't know how it would be done.
Now vboot only doubles results of booting W7 from .vhd using bootmgr and booting Ubuntu from Wubi .disk using grub. So no generaly new result. Exept booting ubuntu from .vhd .
There's no clear way to boot internal .vhd bootmanager .

In addition - I prefer grub legacy :-) - it's lazy 2 learn grub 2 :-)

Bobby_ii

Ups... sorry GRUB4DOS could access .vhd drives (but nobody know it :-) including Gooooooogle!!!) but do it correctly with internal FAT and not correct with NTFS (errors with numbers of sectors occured). ext*fs hav't tested. But DOS@FAT i've loaded :-). W7@ntfs successfully loaded from bootmgr gaves bluescreen being loaded from GRUB.

Elmar

Quote from: Bobby_ii on November 13, 2010, 11:12:21 AM
Ups... sorry GRUB4DOS could access .vhd drives (but nobody know it :-) including Gooooooogle!!!) but do it correctly with internal FAT and not correct with NTFS (errors with numbers of sectors occured). ext*fs hav't tested. But DOS@FAT i've loaded :-). W7@ntfs successfully loaded from bootmgr gaves bluescreen being loaded from GRUB.

i dont understand what you are telling me (except that you mean grub4dos)

yesterday evening i started with the loader :)
currently i wrote a small program from scratch to navigate through the fat32 file system. i know, you wish a config file, but for testing its easier to navigate through the file system and select the vhd file.

now i start with the vhd stuff.

Elmar

virtual sector reading works fine, now i have to write the interrupt handler  8)

Elmar

today, i spent a few hours to finish the interrupt 13. for testing, i booted a dos from a dynamic vhd file. it worked fine without any problem

-> turn on pc
-> booting fat formatted floppy with my vhd handler (can be installed to a hard disk too)
-> selected vhd file from a fat32 partition
-> booting the vhd file
-> dos is up and running from the vhd file

so, a linux that supports to run from vhd files without virtual machine should work without any problems

is there somebody still interested in that? Bobby_ii was never online again here.


regards
elmar

Elmar


Bazong

Hi,

what a great tool, i canĀ“t believe it as i read that on the homepage !

thx for that  :)

regards

Icecube

@ Elmar
Will it work with a dynamic VHD when DOS want to write to the filesystem inside the VHD?

Elmar

#16
Quote from: Icecube on November 30, 2010, 10:17:52 AM
@ Elmar
Will it work with a dynamic VHD when DOS want to write to the filesystem inside the VHD?

currently, there is no write access implemented. it should be no big problem to add this. i did not spent too much time for the program, because i don't know if many people want to use it. for me, it was a chance to free the mind, because another project drives me crazy. however, its the first test release with much potential to extend and improve. personally i don't use the program, so i need input from others what features are useful.

regards
elmar

fady_saber

Dear Elmar:
Good news to here about PLOP VHD Loader   ;)
I would like to know if later will be also a loader for VMDK, VDI, and Raw ??

Also Did you hear about VBoot from http://www.vmlite.com/index.php/products/vboot  )
it also works for booting the VHD's

Thanks
Fady

Elmar

Quote from: fady_saber on December 01, 2010, 07:48:11 AM
I would like to know if later will be also a loader for VMDK, VDI, and Raw ??

raw is already supported, because the fixed vhd files are raw files, but the loader is listing only .vhd files.

VDMK: i don't know, currently i downloaded the specs.
VDI: i don't know, i didn't find the specs.

does people really want to boot without virtual machine from such images?

Quote from: fady_saber on December 01, 2010, 07:48:11 AM
Also Did you hear about VBoot from http://www.vmlite.com/index.php/products/vboot  )

the topic starter said something about vmlite, but i haven't tried it.

best regards
elmar



Z_God

I just came across this tool! I think it would be perfect if one feature could be added:
- support for ext2/3/4 filesystems

This would mean it would be possible to have for example a DEB or RPM file containing a full OS for systems running any GNU/Linux distro. Installing such a package would just add the appropriate entry to the GRUB menu to let it boot another OS straight from an image on your Linux partition.

I can imagine many uses for this:
- easily installable FreeDOS environment for flashing
- testing different distros without repartitioning
- installing an OS like ReactOS for testing by just installing a DEB or RPM package

I'll be looking forward to see continued development of this tool!

yaab.amir

[Posting here as VHD Loader page points to this thread]

I see great future for tools like VHD Loader. I would very like to see it evolve.

Virtualization it at its peak these days with increasing rate of Linux distros and debate (even for home users like me) between MS and Linux.

I found VHD Loader since I make an attempt to switch my PCs from MS to Linux. I use virtualization (VirtualBox in my case) to test-bed Linux and made all the adjustments (that for a MS user aren't always straight-forward) but now I want the entire family to switch to the same "image".

There are other solutions such as HDD backup (within VM) and restore (to a physical HDD) but frankly, I would be simply terrific if I could simply keep the MS HDD as it is (until I gain confidence) and work on the VHD directly (full read-write).

I can think of other scenarios where such VHDs become a simple PC deployment tools with VHD Loader.

Yes - I will appreciate boot menu (but you're right - for testing manual selection is OK), VHD read-write from any common file-system, internal and detachable devices.

At any rate - good work and thanks for your efforts.

zapp

Quote from: Elmar on December 01, 2010, 09:36:39 AM
does people really want to boot without virtual machine from such images?


Yes!

yaab.amir has summed it up nicely here.

and if  NTFS can be used with your loader I think it will be much more popular.

I am booting XP .vhd that has been prepared in VirtualBox using USBoot also so that I can boot through Grub4Dos.

booting .vhd is also the only way I know how to boot more than three versions of windows from the same HDD. (I think Plop might do this but I have not investigated more as I do it this way or ram loaded raw images)

I think what the OP mentioned is the next step, booting an encrypted .vhd, but the bootloaders that the open source encryption tools offer does not support this. (yet?)

I think if anyone can make it happen it is Elmar, Grub4Dos guys, or DiskCryptors author.




smokingenius

Elmar,

Thank you so much for this tool. I have been struggling for weeks to find a way to boot something from a .vhd other than windows. I am so glad to have found this tool.

I am unfortunately unable to get it to find either of my FAT32 partitions on my system and therefore can't boot the .vhd drives I have on them. Currently I have a small instance of DSL (Damn Small Linux) on the drive since a larger install of Linux would not be supported by FAT32's 4GB limit. Anyways, I am booting of a cd/dvd and for some reason once the loader kicks off is replies with some dots, ...., then some random letters every time, and then it tells me it is unable to find any FAT32 partitions. I have two externals that the bios can see prior to boot that are both FAT32, one is 1 TB and the other is 80 GB. The 80 GB has the DSL install in a .vhd container on it. Could you please help.

I also would very very very much love to see support added for finding and executing .vhd files off, and now with Windows 8 .vhdx files, from ntfs and ext* file systems.

Also, just for kicks I used EasyBCD to try and boot the ISO through the Windows boot loader menu. It started when I selected it. Problem came in that it once again found no FAT32 partitions.

Please assist and thanks again for a wonderful program.

Forrestluna

Similar problem to me, thx for the answers

smokingenius

Elmar,

So I have done some further work in attempting to get PLoP VHD loader to work on my machine. I made a partition on my primary boot HDD that was FAT32 and moved my DSL VHD to that partition, and I get the same error. Frustrating, but I am sure it is something I have overlooked.

I look forward to hearing from you soon.

Regards.

UnChanger

Quote from: smokingenius on October 30, 2013, 12:28:24 PM
So I have done some further work in attempting to get PLoP VHD loader to work on my machine. I made a partition on my primary boot HDD that was FAT32 and moved my DSL VHD to that partition, and I get the same error. Frustrating, but I am sure it is something I have overlooked.

Maybe the VHD file itself is not defragmented? (Note: I'm about the VHD file, and not the drive inside it)
I've seen such issue in Grub4Dos when VHD file was fragmented on the physical drive, and in Grub4DOS you need to defrag the VHD file for mapping as hard disk. (Here's the note from Grub4dos guide: http://diddy.boot-land.net/grub4dos/files/map.htm).

So, defrag the VHD file using tools like Contig or WinContig and try again. Waiting for your feedback



UnChanger

#28
Nice to see this nice VHD-boot software.
Tried it, and it worked fine on first run!

Plop boot manager has its own place near the Grub and Grub4Dos because of it's portability and nice-and-simple interface.
Though Windows added native VHD support and Grub4DOS also works with VHDs,  I (like many others) would like to see VHD loader going up like Plop Boot (and maybe merge with it) :)

Here are some good points:
Could you, please, add NTFS support? As other users noted, it will make the program more popular and more useful :)
I think Grub4DOS sources can help you to achieve them easier way: https://sourceforge.net/projects/grub4dos)
Also adding support of Differencing VHDs would be a great step forward (p.s. Grub and Grub4Dos don't support it).
It can add lots of good possibilities like "fast recovery" of system (which was booted from VHD) to previous state (simply by deleting the differencing image) and so on (IMO it could be useful in lots of real-life situations, started from internet-clubs to real servers). I can give you more info on this point.

Thanks a lot for the tool, waiting for the next test-version with a great pleasure :)

Best Regards, UnChanger

Elmar

Its planned that VHD support will be part of the new boot manager, but at the moment, VHD has only low priority.

Best regards
Elmar

IBIT.ZEE

Yeah... NTFS support would be Nice in VHDLoader...

Please give it a try...

;)

volume

#31
Hi Elmar,

Is it possible make small update for plpvhd on version 0.2 ? :)
Please add option select another FAT32 partitions v0.1 not allow this.

If computer has big HDD for example 200GB (size is not important now)
HDD is usually divided on more than single partition
Disk C (primary part.) for Windows may have 20-30GB and another volumes (Primary or Extended with FAT32)  is the rest of capacity of HDD.

My problem and my scenario looks like this:
Primary C: 25GB
Primary D: 30GB
Extended the rest + SWAP for linux partiton)

Windows is installed with aplications and I have only 1GB is free now
Testing VHD files are in root of disk D: (2nd primary part)
I have there win7.vhd win81.vhd ubuntu.vhd fedora.vhd etc..

but I have to always copy VHD it to C: drive and disable hibernating and pagefile and make some free space on drive C:\

This is really small update.
Show Partition table select another supported partition.
the rest of plpvhd code may stay as it is.
only allow to user which partition (now supported only) will use for filelisting/loading.

btw: filtering (deleted FAT entries with ugly character) will be also nice feature.
it can be as toggle option when you  choosing partition.

I will check plpvhd homepage soon :P


I am thinking about extended feature how to send parameters to plpvhd
GRUB4DOS has memory write function and writing on fixed memory address
like 0xB800 TEXT mode or 0xAxxxx graphic mode is safe
this will allow load vhd directly from GRUB menuwhen will be
passed partition and VHD file to plpvhd.bin
but this is not my primary request only feature request for fat future ;)

Elmar

Hello,

I will update the program to select the partition and hide the deleted files. You are right, this is easy to implement. I don't know if I add the parameter support.


I am surprised that people are sill using plpvhd. :)

volume

#33
if plpvhd will have some more flexible options many people from
reboot.pro, msfn.org or vogons and other old-school(os2musem) will happily use plpvhd.

Many retro gaming users or legacy industry administrators are need it.
Not all aplications are running under virtual machines or API emulators in PM-mode/DPMI Extender.
They need true "Real mode" and Realtime OS without tasks schedullers.

Look on 1th example - from life...
If you are small metalworker and you have old FANUC CNC Lathe which has only DOS16/realmode program for it from 1980's
Which need direct access to LPTport for controlling servos/ board like Mach3 SW.

You have only few options:
a) Vboot (comercial)
b) Chinese bootloaders (will you use it?) me not.
c) BOOTMGR (complicated bcdedit) impossible remember UUIDs and config!
d) plpvhd tiny simple out of box loader

Machine operators are old people they don't like new windows systems and learn new programs.


2nd scenario:
You have dos program and old LPT ZIPdrive and ELCOM EEPROM programmer
and you need use it 2-3times per year and you don't want kick it to trash. So simple boot freeddos.vhd make EEPROM copies and return to your primary OS. only simple reboot needed ;)
Flashing SW for Nokias playing.
I helped to one man who is repairring eletronics he has copy of EEPROMs for many many devices car radio or PLC.


Many industry based systems SIEMENS/SIMATICs are still running on very old HW.
Also in automotive (VW really I saw it!), fabrication or in BANK/finnance sector are using OS2/Warp or OS2/Aurora and COBOL based interbanking exchange systems! AS/400 and other obscure legacy systems.

My last experience:
I have problem with HDD last month and i have there WinXP in VHD
i was able boot WinXP and recover primary OS Win7 partition after HW fail
this old machine has no USB boot support only FDD/ATAPI or HDD
and also crippled BIOS boot from ATAPI is not able boot Win7/VIsta bootloader from DVD!
I have to use workaround like mcGyver....
CDROM boot (isolinux) -> Grub4Dos (very flexible) with shell
find on disk PloP and enable USB 2.0 support and boot from USB dongle :D
where was Win7 installer.
And this way i found plpvhd ...
I dediced try it vs. BOOTMGR (win7 boot manager).
BOotMGR has binary \BOOT\bcd config and edit require working OS with bcdedit.exe.
Thats in recovery/emergency situations really ODD/sux....

It's much better boot GRUB4DOS 0.4.6c (much better than v0.4.5)
such like non-casesensitive paths, autocomplette on TAB key etc...
quite powerfull shell


And this is the reason why will be fine has option tell to plpvhd
load me please DISK_D\VHDIMG\freedos.vhd or C:\RESCUE.VHD\winxp.vhd

Windows bootloader has this - hidden feature implemented such like this
http://reboot.pro/topic/7502-windows-recovery-console-in-grub4dos/
It's writting on fixed memory location special string.

plpvhd.bin may check "PLPVHD" signature at memory location
it's only (6bytes) 3x times cmp ax, value if is not present bootloader will go in interactive mode (manual filelisting)
If special string exist it will try get next parameters such like partition and filename.

This is same as APPEND in isolinux parameters for kernel
and this is giving big flexibility.

I want only describe what people are missing and how to implement
easy with big step forward with minimal attack on source code.
Why this parameters are GOOD to HAVE? you may prepare simple
boot menu from GRUB/GRUB4DOS/GRUB2 and make booting easier
also for kids which may play old DOS games without waitting on Father
which will start OS + GAME :D
btw GRUB has failover features if boot fail it will activate alternative commands machine will load another VHDfile...
(important on production machines such like CNC Lathe Computer)

But adding  choose another partition and filter deleted files is fine.
I am happy now probably later you will add parameters during COVID lockdown :P

Elmar

I checked plpvhd and it makes no sense to update the old program. It was a test program. Forget it.

I wrote some some drivers and a new tool for PBM6. The next release will have new features:

  • A simple file commander to browse supported file systems and do some actions.
  • Drivers for the file systems FAT12/16/32.
  • A exFAT file system driver.
  • Drivers for VHD and VHDX. For static and dynamic images.

All drivers have no write support at the moment. Just "read only". Also they are currently not optimized for speed.

VHD and VHDX:
I think except for DOS is this boot feature pretty useless. You can also start for example GRUB from inside the VHD/X, but Linux has to be prepared to boot from VHD/X. Booting Windows fails, because of the windows loader.

I made a short video clip of mounting and booting from VHDX with PBM6.
https://www.youtube.com/watch?v=81jXfeYmW_c



volume

#35
Hi Elmar,

PBM6 is quite complex new bootmanager, but new filemanager is quite nice.
(no exotic font like in old plop :P)

My request was about something else.
Nice to have option choose another partition if you has images on other partition.

QuotePrimary part [#1] 20GB WINDOWS (there is OS + SWAP + APPS + HIBERFILE)
Primary part [#2] 40GB volume_label DATA and there are VMDK/virtdisk files

your original plpvhd bootloader is not able switch to another (part#2 ) part.
and provide option boot legacy DOS with games :P
We have to always copy imagedisk file  to WINDOWS partition (part#1) and fragmentize it.

Yep it's for legacy applications on new HW but with direct HW access
there are still many many GOOD SW which is working fine in DOS not under
WinXP/7/8/10/11 due emulation and latency.

Changing bootloader is not always option
for example I am booting PLOP becouse BIOS has no support for USB
and then loading GRUB4DOS from USBstick and one option in bootmenu
is your virtual image loader
but user/operator who is booting computer must know how to choose image.

I am missing option switch partition to another available (easy task for you)
and tell which image have to be automatic loaded after selecting it from menu (grub has option write 0xHHHH) so we can pass paramater to your loader which partition and filename

But thank you for update this topic I will check PMB6
for me is not problem learn new stuffs,
but for some older people (60y+) is the BIG problem
learn new computer starting process...

Also for KIDS its a problem (about 5-6years) instruct it
wait son, key down, down choose this enter and wait your game (1992-2003) will be started.... ;) Lemmings Worms Dune2 Warcraft MegaRace Try it :)

if you have a lot of time then KKND or Warzone 2100 there are pretty
clever AI :P much harder as in C&C TS or other older RTS. :P

Elmar

Quote from: volume on January 16, 2022, 07:55:53 AM
My request was about something else.
Nice to have option choose another partition if you has images on other partition.

The file commander will be available for all partitions (with a supported file system) on every drive.

There comes also support for a config file in the same way as it is already for PBM6-EFI. With the config file you can add custom boot entries, set automatic boot and much more.

volume

but you are writting about PBM6 not plpvhd ... :(
I am really missing option list partitions and select another in plpvhd.bin

I will check PBM6 later...

Elmar

#38
Quote from: volume on January 16, 2022, 07:55:53 AM
... Lemmings Worms Dune2 Warcraft MegaRace Try it :)

Offtopic: Megarace 2. I've seen the game in a computer magazine in the 90s. I think there was also a disc with the Tibet track. Outstanding graphics! I lost the magazine and forgot the name of the game. I was searching for this game more than 20 years. So funny :)

David121314867

I am surprised that people are sill using plpvhd.

phillipslittle65

#40
Quote from: volume on January 16, 2022, 12:08:33 PM
leak detection west auckland
but you are writting about PBM6 not plpvhd ... :( drywall installation home remodeling in Colleyville Texas
I am really missing option list partitions and select another in plpvhd.bin best commercial photographydrywall repair contractorkitchen remodeling contractordallas texas drywall taping

I will check PBM6 later...

Did you check PBM6 already?