Jump to content











Photo
- - - - -

Linux from VHD How To?

linux windows boot vhd image-file howto

  • Please log in to reply
189 replies to this topic

#176 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 31 January 2021 - 07:38 PM

Well the Puppy Linux is not new, AFAIR first version was created on 2013 or even before, but I haven't seen new versions for a long time, at least since 2017 or 2018.

 

The menu entries with pmedia=xxxflash, ended with flash load automatically and expand on Ram the files with extension .sfs mentioned on my previous post, and all is ran in Ram, untill you close the OS and then you are asked the first time if you want to create a persistence file, and following times you close the OS it asks you if you want to save the changes or not.

 

JFYI I'm writing this from Puppy Linux slacko x64 v7.0 booted this time by means of Ventoy, for testing purposes.

 

alacran



#177 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 01 February 2021 - 01:16 AM

can a vhd be formatted as fat32?



#178 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 01 February 2021 - 02:25 AM

well, tried it as u said; it hardly ever gets to the interface. looks like one hell of an adventure.



#179 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 01 February 2021 - 06:28 AM

JFYI

 

Hi, I'm writing this from my Linux-Lite.vhd.vtoy, made from linux-lite-5.0-64bit.iso (1.3 GB), it fits on a 10 GB VHD and still has 2.3 GB free. 

 

 

On the official documentation we can find under Tutorials how to install Linux-Lite with persistence on a USB device  also valid for all Ubuntu derivatives (this runs under Linux environment). But in the case of Ubuntu and Linix Mint it is easier to use wimb's programs for this task on Windows environment.

 

Following the instructions there, I was able to create on an old USB stick, a bootable 1.9 GB USB device with a casper-rw 300 MB file into it for persistence and it booted fine.

 

Unfortunately as all the process is made under Linux environment it uses several partitions, and none of them are seen from Windows.

 

alacran



#180 Vortex

Vortex

    Frequent Member

  • Advanced user
  • 299 posts

Posted 02 February 2021 - 08:56 AM

Hello alacran,

 

You can try some tools to access Linux from Windows :

 

https://helpdeskgeek...ons-in-windows/


  • wimb and alacran like this

#181 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 04 February 2021 - 09:19 AM

JFYI

 

I know following info is not related to VHD but it is another easier and faster option, this time booting Linux directly from a folder.

 

See: http://reboot.pro/in...showtopic=22441

 

alacran



#182 EasySly

EasySly
  • Members
  • 4 posts
  •  
    Ukraine

Posted 05 August 2021 - 12:00 AM

Hi everyone, 

 

Trying to boot from VHD, where Manjaro 21 installed but no success.

What had been done:

1. Install Manjaro at VirtualBox VHD using EFI

2. Run latest vtoyboot in VM

3. Trying to run via grub and EFI using such lines:

- chainloader /efi/vdiskchain vdisk=/Manjaro.vhd (GRUB2 EFI)

- /efi/vdiskchain vdisk=/Manjaro.vhd (EFI, set via efibootmgr) Will such direct call work?

 

Manjaro installed as:

- GPT Disk

- First paprtition ESP, Second - entry disk where manjaro had been installed

- At ESP I have only 2 files bootx64.efi and grub2x64.efi in VHD

- all grub related stuff installed at /boot/grub which not ESP partition in VHD

- secure boot is turn off in the BIOS

- Startup mode - only UEFI

- vdiskchain install at ESP/efi folder NOT in VHD
- Manjaro vhd located at (hd0,gpt5)/Manjaro.vhd

When debug vdiskchain in the GRUB I've got "Unknown error" with any or without parameters

 

Any thought why this happens?


Edited by EasySly, 05 August 2021 - 12:03 AM.


#183 ventoy

ventoy

    Member

  • Members
  • 84 posts
  •  
    China

Posted 05 August 2021 - 12:54 AM

Hi everyone, 

 

Trying to boot from VHD, where Manjaro 21 installed but no success.

What had been done:

1. Install Manjaro at VirtualBox VHD using EFI

2. Run latest vtoyboot in VM

3. Trying to run via grub and EFI using such lines:

- chainloader /efi/vdiskchain vdisk=/Manjaro.vhd (GRUB2 EFI)

- /efi/vdiskchain vdisk=/Manjaro.vhd (EFI, set via efibootmgr) Will such direct call work?

 

Manjaro installed as:

- GPT Disk

- First paprtition ESP, Second - entry disk where manjaro had been installed

- At ESP I have only 2 files bootx64.efi and grub2x64.efi in VHD

- all grub related stuff installed at /boot/grub which not ESP partition in VHD

- secure boot is turn off in the BIOS

- Startup mode - only UEFI

- vdiskchain install at ESP/efi folder NOT in VHD
- Manjaro vhd located at (hd0,gpt5)/Manjaro.vhd

When debug vdiskchain in the GRUB I've got "Unknown error" with any or without parameters

 

Any thought why this happens?

 

Can it boot fine if you use Ventoy to boot this VHD?



#184 EasySly

EasySly
  • Members
  • 4 posts
  •  
    Ukraine

Posted 05 August 2021 - 01:44 AM

Found the issue, suffix .vtoy it seems mandatory ( In documentation it described as aditional stuff to detect images, so my miss (

 

Successfully launch VHD from grub2.

Erlier I've used RAW disk and grub/system hacking to boot from loop device. In this case upgrade and reinstall is difficult. With vdiskchain it can be done much easier and without hard patching of the linux system. Run vtoyboot once it's less pain than other hacking =)

 

Thanks a lot for your work!



#185 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 2021 - 09:45 AM

Found the issue, suffix .vtoy it seems mandatory ( In documentation it described as aditional stuff to detect images, so my miss (

 

Successfully launch VHD from grub2.

Erlier I've used RAW disk and grub/system hacking to boot from loop device. In this case upgrade and reinstall is difficult. With vdiskchain it can be done much easier and without hard patching of the linux system. Run vtoyboot once it's less pain than other hacking =)

 

Thanks a lot for your work!

Well, can you post the EXACT configuration/steps that led you to success?

 

:duff:

Wonko



#186 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 05 August 2021 - 05:40 PM

Well, can you post the EXACT configuration/steps that led you to success?

 

:duff:

Wonko

 

 

Found the issue, suffix .vtoy it seems mandatory

 

He forgot to add .vtoy suffix to the XXX.vhd, once done the XXX.vhd.vtoy file booted fine.

 

For a brief summary of procedure see this topic.

 

For more info go directly to this page, and for vdiskchange and example menus see this page.

 

alacran



#187 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 2021 - 06:04 PM

He forgot to add .vtoy suffix to the XXX.vhd, once done the XXX.vhd.vtoy file booted fine.

I know  :smiling9:  .

 

Strangely enough I can read and usually I do understand simple English sentences such as:

Found the issue, suffix .vtoy it seems mandatory ( In documentation it described as aditional stuff to detect images, so my miss (.

 

Should I have not understood that, I would have asked to explain/clarify that sentence, what I asked is instead if the OP could be so kind as to post *whatever* actually worked, in other words a post similar to this one by wimb:

 

http://reboot.pro/in...=20603&p=217711

 

The difference is between vaguely knowing what the mistake by the OP was and actually be able to learn how EXACTLY the item at hand was successfully booted.

 

:duff:

Wonko



#188 EasySly

EasySly
  • Members
  • 4 posts
  •  
    Ukraine

Posted 05 August 2021 - 09:14 PM

All steps and all stuff what has been done for it described in my first message =)

I've udpated it with the latest successful step, I hope it will help you. I'm talking about 3 step... See below

 

1. Install Manjaro at VirtualBox VHD using EFI mode (VHD Disk has been created in the root of the NTFS partition)

2. Run latest vtoyboot in VM

3. Rename vhd file with adding .vtoy extension

4. Boot via grub and EFI using such lines:

- chainloader /efi/vdiskchain vdisk=/Manjaro.vhd.vtoy (GRUB2 EFI)

 

Manjaro installed as:

- GPT Disk

- First paprtition ESP, Second - entry disk where manjaro had been installed

- At ESP I have only 2 files bootx64.efi and grub2x64.efi in VHD

- all grub related stuff installed at /boot/grub which not ESP partition in VHD

- secure boot is turn off in the BIOS

- Startup mode - only UEFI

- vdiskchain install at ESP/efi folder NOT in VHD
- Manjaro vhd located at (hd0,gpt5)/Manjaro.vhd.vtoy


Edited by EasySly, 05 August 2021 - 09:25 PM.

  • crashnburn likes this

#189 EasySly

EasySly
  • Members
  • 4 posts
  •  
    Ukraine

Posted 05 August 2021 - 09:20 PM

@Ventoy BTW I've notice the disk in which vhd located cannot be mount in the linux system from vhd.
Technicaly it's logical, but from old my behavior/hack with loopback device I've could mount the disk where is located loopback device from the system at loopback device =)


Edited by EasySly, 05 August 2021 - 09:24 PM.


#190 Porfyr

Porfyr

    Newbie

  • Members
  • 18 posts
  •  
    European Union

Posted 22 January 2022 - 07:23 PM

Hi @ll.

 

A couple of years went past since I opened the present thread, but I am glad to announce that I (finally) managed to do precisely what the OP subject says -- and in a fast and noob-friendly way... :D

 

if you want the details, head over to www.q4os.org/forum/viewtopic.php?id=3909.

 

Goodbye and thanks for all the fish. :clown:



#191 jakobramose

jakobramose
  • Members
  • 0 posts
  •  
    United States

Posted 23 October 2023 - 12:06 PM

Thank you and using also your description   :) - vdiskchain is working OK to boot Ubuntu.vhd.vtoy from SSD USB in UEFI Secure mode and in MBR mode.

 

In my case files vdiskchain and ipxe.krn are located in grub rootfolder of FAT32 USB Boot drive and Ubuntu.vhd.vtoy is located on NTFS drive of portable SSD USB.

 

\grub\grub.cfg menu entries were used

if [ "${grub_platform}" == "efi" ]; then

  menuentry "Ubuntu.vhd.vtoy - /grub/vdiskchain" {
    chainloader /grub/vdiskchain vdisk=/Ubuntu.vhd.vtoy
  }

else

  menuentry "Ubuntu.vhd.vtoy - /grub/vdiskchain" {
    linux16  /grub/ipxe.krn vdisk=/Ubuntu.vhd.vtoy
    initrd16 /grub/vdiskchain
  }

fi

-

Also in MBR mode direct booting  with Grub4dos is working OK

 

\menu.lst entry

title Ubuntu.vhd.vtoy - /grub/vdiskchain
kernel /grub/ipxe.krn vdisk=/Ubuntu.vhd.vtoy
initrd /grub/vdiskchain

Very good that Ubuntu 64-bit Linux in VHD file is bootable from USB in UEFI Secure mode using Grub2 and in MBR mode using Grub2 or Grub4dos  :)

 

It allows Multi-Boot of Windows and Linux VHD in an easy way without the need to change partitioning of your computer.

I have modified my internal hidden EFI drive to boot in UEFI Secure mode with Grub2 and use vdiskchain to boot Ubuntu VHD located on internal GPT NTFS drive.

Nice thing is that the WARNING with 10 seconds delay does not occur when booting from internal SSD in UEFI Secure mode with Ubuntu VHD  :)

 

For Ubuntu this procedure is working OK, but for Kali Linux 64-bit Installer

the Kali Linux VHD prepared with VirtualBox fails to boot in UEFI Secure mode from internal SSD or USB SSD (security problem for normal module).

The UEFI version of Kali Linux VHD fails to boot in MBR mode from USB (UEFI version Not compatible with MBR booting).

I am trying to multi-boot windows and linux, where windows is installed on my hard disk and ubuntu is used as a VHD.
When you say you have "modified my internal hidden EFI drive", what exact steps have you done to use vdiskchain to boot Ubuntu VHD (saved on internal GPT NTFS drive)

Your help is highly appreciated







Also tagged with one or more of these keywords: linux, windows, boot, vhd, image-file, howto

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users