Jump to content











Photo
- - - - -

Boot Kali Linux from VHDX

kali vhd boot

  • Please log in to reply
32 replies to this topic

#26 zammibro

zammibro

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 4 weeks ago

While we are at it, the job would be incomplete without fixing USB Thumb boot from BIOS. Is there anything I can amend with Bootice in that department to access Grub2 menu?


Edited by zammibro, 4 weeks ago.


#27 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 4 weeks ago

Maybe it is a botched install, or really Kali Linux has changed something in the vmlinuz. :dubbio:

 

Can you try with the 2020.2 version? That one is surely working, at least the Live .iso with grub4dos:

https://cdimage.kali.org/kali-2020.2/

 

That EXT4 partition is a logical volume inside extended, I have no idea of what "boot flag" you are talking about :unsure:, that volume won't ever "boot" (unless a bootsector is written to it AND it is chainloaded by something else).

 

:duff:

Wonko



#28 zammibro

zammibro

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 4 weeks ago

I'm running Kali 2020.2 now, at least it was when ISO downloaded. It booted perfect with latest Grub4DOS as mentioned in previous post, though bypassed Grub 2 menu. I doubt it was a botched install, in fact it was quite comprehensive one, the entire package slowly but surely from a Rufus thumb drive. Anyway, there should be some standard way to get to the thumb's partition Grub2 menu from Grub4DOS? It offered to install Grub2 to the main drive which I politely declined, and selected the USB volume instead. No errors posted.But there should be ways to fix it?


Edited by zammibro, 4 weeks ago.


#29 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 4 weeks ago

I'm running Kali 2020.2 now, at least it was when ISO downloaded. It booted perfect with latest Grub4DOS as mentioned in previous post, though bypassed Grub 2 menu. I doubt it was a botched install, in fact it was quite comprehensive one, the entire package slowly but surely from a Rufus thumb drive. Anyway, there should be some standard way to get to the thumb's partition Grub2 menu from Grub4DOS? It offered to install Grub2 to the main drive which I politely declined, and selected the USB volume instead. No errors posted.But there should be ways to fix it?

 

I lost you. :w00t:

 

I am not sure to understand what you did (exactly).

 

GRUB2 is normally installed to a disk (the MBR+hidden sectors) and what goes to a volume (on the same disk) the binaries and configuration files, but it may also be installed to a volume bootsector.

.

If you do have a GRUB2 core.img in your build, it is easy to chainload it from grub4dos (the path to core.img may change deepending on distro/install):

 

find --set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot

 

Have a look also at this (in practice the only GRUB2 guide I can understand):

https://web.archive....h Commands.html

 

And to this post:

https://forums.hak5....e-config-files/

 

As always your mileage may vary.

 

:duff:

Wonko



#30 zammibro

zammibro

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 4 weeks ago

I lost you. :w00t:


I found myself redeemed. :D Kali Install ISO was unable to fix the botched Grub2 USB install it did. Bootice wasn't smart enough to get G2 pieces together. Grub4DOS while installed in USB thumb MBR by Bootice failed to boot Kali from the USB, and generally failed at all counts executing commandline. The only winner I found after sleepless nights was, of course, venerable ship captain from Outside of the Asylum with best links around, but also... a step behind... Boot Repair Disk.

While booted both in VMWare or from Rufus scalped USB thumb by BIOS, it created comprehensive and quite readable report about multiple bootable entities on my PC, and - the most important - pinpointed the problem namely with Kali USB, suggesting to reinstall Grub2 on it. I reluctantly agreed knowing many possible undesirable consequences for my entire system. But - a minute later Kali USB was fixed, no other drives touched at all.

And the next moment I already booted Kali USB installed distro from BIOS. Basically, Boot Repair Disk substituted something dropped on disk by Kali Installer with very capable Grub 2, both in MBR and the right partition folders. Now inhabitants of this ship have bright record, and morally fully prepared to storm "boot kali from VHD" fortress. :ph34r:


Edited by zammibro, 4 weeks ago.


#31 zammibro

zammibro

    Newbie

  • Members
  • 18 posts
  •  
    United States

Posted 4 weeks ago

I found you. :o

 

And for a good reason. While attempting to run the installed Kali image, it transpired images posted on the main download page are hardly useful due to being buggy and... obsolete, with missing headers, so at times no way to compile new code like WiFi adapter drivers. Kali forum community suggests weekly images instead, which are surprisingly different, with new kernel and working Grub install including boot.img and numerous modules in \boot\grub\i386-pc .

 

That requires of course editing Grub4DOS menu to boot the new Kali install, so here's the question: is it possible to edit and save Menu.lst from Grub4DOS commandline, and how?


Edited by zammibro, 4 weeks ago.


#32 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 4 weeks ago

That requires of course editing Grub4DOS menu to boot the new Kali install, so here's the question: is it possible to edit and save Menu.lst from Grub4DOS commandline, and how?

No.

There is no editor (capable of saving to file) in grub4dos.

It is much easier to edit it in *any* text editor, under Windows or Linux.

More than anything else, the issue is that grub4dos cannot normally create files[1], in theory on existing file it i possible to use write or cat --replace commands, but it is not at all easy/error proof/etc.

Example (of a half-@§§ed solution, aimed to hex values):

http://reboot.pro/to...ite-hex-values/

 

Something that you can do easily (if you don't want to go all the way of jolting down the sequence of working commands on a piece of paper and write them to menu.lst once booted) it i to do the tests in a VM such a Virtualbox, that together with Imdisk provides an easy way to make experiments and save results, JFYI:
https://msfn.org/boa...comment=1181069

 

:duff:

Wonko

 

[1] though there is an external fat module that allows creating files on FAT12/16 and possibly even 32 bit



#33 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 3 weeks ago

And in the meantime 2020.3 ha been released:

https://www.kali.org...2020-3-release/

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users