Jump to content











Photo
- - - - -

Boot WTFPlay from VHD


Best Answer samotc , 5 days ago

Thank you very much for your help.
First of all, I will read carefully the threads that you recommend, as you will see, my grub4dos level is low, and linux even more scarce, but in this life with patience, everything can be learned.
Then I will try to put into practice what I learn in those threads and see if I get the desired results, if not, I will have learned something else.
Thanks to this forum I know how little I know.
Go to the full post


  • Please log in to reply
4 replies to this topic

#1 samotc

samotc
  • Members
  • 3 posts
  •  
    Spain

Posted 5 days ago

Hello everyone.
I have been using WTFPLAY for several years, I think it is a great player, perhaps the best, although the Bughead with Windows Server Core loaded in RAM in some things I like better.
I have tried F2k, JRMC, and HQPlayer 4 and find them light years away from either of these 2.
As I find it uncomfortable to boot  usb_pen from bios + f12 every time I want to start wtfplay, I have managed to add it to the windows boot menu by giving an entry, from it, to grub4dos and it starts perfectly and also saves the settings and playlist.
The problem arises when I want to do this same with wtfplay in vhd. Here I get it to boot in multiple ways, but it doesn't save the settings or the playlist.
The vhd I have created with winimage; in grub4dos I map it as (hd2)
and I set root to (hd2,1), which is exactly how I do it when booting from usb. Chainloader I put it as (0x82) +1 in both ways (USB and VHD) and I start it with the command
"boot /efi/boot/bootx64.efi" or "boot /uefiboot.img".
Of the 2 ways it boots, both in USB and in VHD, but in "VHD mode" DOES NOT SAVE THE CONFIGURATIONS.
What am I doing wrong?
Is there a way to "trick" WTFPlay into thinking that it is booting from the USB pen?
If anyone has any ideas I will be very grateful
Best regards, enjoy the music.
report.gif  
 

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 5 days ago

I have not even the faintest idea of what you are talking about, what is this "WTFPLAY"?

Do you have a link to its homesite?

Is it this one?

http://wtfplay-project.org/

 

Post the menu.lst you are using to boot from the USB and the one you are using for the VHD.

 

In gru4dos the target of the chainloader command is normally  a volume (i.e. something like (hd0,0) ) or a MBR (i.e. something like (hd0)) or an OS loader (i.e. something like (hd0,0)/bootmgr) and the boot command is:

1) self standing (no parameters)
2) only needed on command line as it is implied as last command in a menu.lst entry

 

Besides, grub4dos only works in BIOS (not in UEFI) so how can you boot an EFI loader?

 

So I wonder about your report, maybe you are using some derivative of grub4dos or using it together with some other loader/softeare? :unsure:

 

 

:duff:

Wonko



#3 samotc

samotc
  • Members
  • 3 posts
  •  
    Spain

Posted 5 days ago

Thanks for the quick reply.
Sure enough, that's the link
WTFPlay is a Linux audio player that loads from a usb pen and runs on RAM, which makes the sound quality very good.
The USB pen contains 3 partitions,
1) ISO 9660 (linux files; vmlinuz.043, initrd2, uefiboot.img, etc ...)
2) FAT12 (/EFI/BOOT/bootx64.efi)
3) Ext2 (configuration files)
The VHD contains the same 3 partitions as the usb pen
 
Menu.lst to boot from USB pen:
 
root (hd2,1)
chainloader (0x82) +512
boot /efi/boot/bootx64.efi
 
Menu.lst to boot from VHD:
 
find --set-root /wtf074.vhd
map --heads = 255 --sectors-per-track = 63 /wtf074.vhd (hd2)
map --hook
root (hd2,1)
chainloader (0x82) +512
(also works (hd2)+512)
boot /efi/boot/bootx64.efi
(also works "boot /uefiboot.img)
 
 
The grub4dos is invoked from the windows 10 bootloader, but my computer is BIOS, not UEFI.
The problem is that booting from vhd, I can't save the configurations or playlists in the configuration partition, but booting from USB yes.
Thank you very much for your attention

Edited by samotc, 5 days ago.


#4 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 5 days ago

Well those are a mish-mash of settings (they work :) but not because they are correct :rolleyes: ).

 

Using DOS disk numbers (0x80), (0x81), (0x82), as you just demonstrated is possible, but since you anyway establish root to a volume (hd2,1) it makes more sense to use everywhere the same naming (hd0), (hd1), (hd2), etc.

 

Forget for one moment the menu.lst.

 

When you see the entries, press c to get to command line.

 

In it (for the USB) type:

root (hd2,1)

chainloader (hd2)0+512

boot

It should boot normally.

 

If it does the entry in menu.lst is:

title WTFPLAY on USB

root (hd2,1)

chainloader (hd2)0+512

 

Same goes for the .vhd, on command line this should work the same:

 

find --set-root /wtf074.vhd
map --heads = 255 --sectors-per-track = 63 /wtf074.vhd (hd2)
map --hook
root (hd2,1)
chainloader (hd2)0+512
boot

 

The grub4dos boot command does not have parameters so, on command line you can have:
boot

boot  /efi/boot/bootx64.efi

boot mickey mouse

with the same result.

 

On a menu.lst entry an implied "boot" command is executed before next "title" or before EOF.

 

Chainloading more than one sector is "queer", those entries should work just fine with chainloading just the MBR of the iso-hybrid image, i.e.:

chainloader (hd2)0+1

or

chainloader (hd2)+1

 

There is no need to use winimage to make a .vhd, actually grub4dos interprets a "static" .vhd as a RAW image with an appended sector that is ignored.

 

The .iso, since it is a iso-hybrid is at the same time a .iso and a RAW image that grub4dos will understand just the same as the .vhd (as long as it is mapped to a "hd-like" virtual device, hd0-31 are hd-like hd32 up are CD-ROM like).

 

What happens to you should be the following (the grub4dos settings you currently use to boot should be corrected for cleanness, but they are not involved) :

1) when you boot from the USB stick (i.e. from the image directly  dd-ed to the USB stick) you are booting from a "real" device, so the Linux system is entilrely loaded in RAM, then upon booting scan for real (hd-like) devices and the EXT2 partition (which very likely is identified by a label or by an UUID) is found, recognized and auto-mounted

2) when you boot from the image (.vhd or RAW .iso) stored on the USB stick, you are mapping it to a "virtual" device, this device only exists in the grub4dos environment (unless you have particular provisions to pass this virtual device info to the Linux) so the OS is loaded in RAM, boots and scan for real devices, does not find the mapped image (which at this point is not available anymore) does not (cannot) mount the EXT2 volume and decides that it has nowhere to store settings.

 

Usually it is a matter of passing a few parameters to the actual Linux kernel, but it depends greatly on what is included in the distro (in the initrd image) and which parameters it accepts, which scripts are autoexecuted at boot, etc. to find a way to run kpartx/losetup.

 

Read this thread (seemingly unrelated):

http://reboot.pro/to...rom-vhd-how-to/

for an overview of the issue and generic (not necessarily good in this case) way to solve it.

 

In your case - since the Linux OS works already in RAM - you can probably get away with more simply running a script or a set of commands after having booted to mount the EXT2 partition, but it has to be seen.

 

The first thing you could check should be the differences in mounted devices in the booted Linux between when you boot from the USB stick and when you boot from the image. 

 

:duff:

Wonko


  • samotc likes this

#5 samotc

samotc
  • Members
  • 3 posts
  •  
    Spain

Posted 5 days ago   Best Answer

Thank you very much for your help.
First of all, I will read carefully the threads that you recommend, as you will see, my grub4dos level is low, and linux even more scarce, but in this life with patience, everything can be learned.
Then I will try to put into practice what I learn in those threads and see if I get the desired results, if not, I will have learned something else.
Thanks to this forum I know how little I know.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users