Jump to content

- - - - -

Linux VHD Help

  • Please log in to reply
2 replies to this topic

#1 100problems

  • Members
  • 2 posts
    United Kingdom

Posted 22 December 2019 - 01:11 PM

Hi guys,
I'm trying to get a linux vhd running from grub2 on a aioboot usb drive and ive run into a wall i cant seem to overcome without some help
I've got winpe and a windows to go vhd working on said drive and i can get the linux vhd loaded to the point it falls to a initramfs shell due to (from what i can tell) it not mounting the root fs on partition 1 in the vhd.
Info you may need:
USB stick: Formated by aioboot with ntfs and fat32 partitions
VHD: static vhd with debian install that works when booted directly via a vm
Grub2 menu entries:
menuentry "fuse novhd" {
  insmod part_msdos
  insmod ext2
  set vhd='(hd0,msdos1)/my.vhd'
  set vdhost search --no-floppy -s root -t VHD -w -f $vhd
  loopback lp0 $vhd tdisk=VHD
  linux   (lp0,1)/vmlinuz host=/dev/sda1 root=/dev/vdhost/Partition1 vdisk=/my.vhd rw rootdelay=120
  initrd  (lp0,1)/initrd.img
menuentry "vhd testing" {
 set vhd=/my.vhd
 set vdhost search --no-floppy -s root -f $vhd
 loopback lp0 $vhd tdisk=VHD
 linux   (lp0,1)/vmlinuz root=/dev/vdhost/Partition1 vdisk=$vhd host=/dev/sda1
 initrd  (lp0,1)/initrd.img
menuentry "vhd testing2" {
  insmod part_msdos
  insmod ext2
  set vhd='/my.vhd'
  set vdhost search --no-floppy -s root -t VHD -w -f $vhd
  loopback lp0 $vhd tdisk=VHD
  linux (lp0,1)/vmlinuz host=/dev/sda1 root=/dev/vdhost/Partition1 vdisk=/my.vhd rw rootdelay=120
  initrd (lp0,1)/initrd.img
I've also tried with grub4dos but it just starts counting up in mb and stops at 3480 everytime
Ive had a good read through the forums and a few threads and from what i can gather this may be down to needing to use one of the following solutions:
So I've tried the third method vdfuse and still it drops to an initramfs shell (exact error is: ALERT! /dev/vdhost/Partition1 does not exist. Dropping to a shell!) because it cant find root so clearly i'm missing something somewhere
Iv'e read that vdfuse is outdated but the kloop/losetup i've seen meantioned i havent been able to find instructions on, so some assistance in getting this working so would be much appreciated.
Thanks in advance

#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 22 December 2019 - 03:55 PM

The situation is a mess. :(


Noone either actually understands what is actually needed or can produce a proper, "universal" approach.


User wean_irdeh is the only one that:

1) reported success with kpart/losetup with more that one specific distro

2) actually posted some hopefully complete but still essentially cryptic set of instructions

BUT he never posted the specifics on debian:




All the others either reported success on a specific distro only or  did not provide the EXACT details needed.


What you should IMHO try doing:

1) repicate the success of wean_irdeh with ARCHLINUX:


following the steps exactly

2) see if the same approach works on debian (possibly some changes are needed :unsure:)


I am suggesting you to re-run the Archlinux experiment because (to me at least) not all the steps in the above post by wean_irdeh are completely clear, so - until the EXACT SAME approach has not been tested with a "known-to-be-working" distro there is no way to know if the approach is understandable and repeatable, or - if you prefer - if you introduce TWO changes in the replicaton of an experiment, if it fails you will never know which of the two changes is the cause of the issue.




#3 100problems

  • Members
  • 2 posts
    United Kingdom

Posted 22 December 2019 - 07:27 PM

Thanks for the swift reply, yeah from what i've read no set of instructions are actually fully complete, it's all hit and miss.


I'll give arch a go over the next few days and go from there, i'll also do my best to supply a full set of instructions if i get debian or any other distro working but right now i'm just using the vhd with a portable vm when i actually need it.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users