Jump to content











Photo
- - - - -

Boot Lubuntu from VHD with grub4dos

boot linux vhd grub4dos linux boot vhd grub4dos

  • Please log in to reply
1 reply to this topic

#1 JPelotas

JPelotas
  • Members
  • 1 posts
  •  
    Argentina

Posted 04 March 2016 - 06:20 PM

We have in the classroom 50 machines in a school

We need to boot Windows and Linux

We prefere to use vhd for everything.

 

We have booted many windows, but the linux vhd doesn´t mount, or map, the vhd

 

We are not going to use many partitions, because it´s hard to maintain the 50 machines, thats why we prefere to have files .vhd

 

 

Nothing of this works the way it have to:

title Lubuntu_ext2.vhd (find and boot Linux with grub.cfg already installed)

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

find --set-root /sbin/init

configfile /boot/grub/grub.cfg



title Lubuntu_ext2.vhd (Boot MBR of First Hard Disk)

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (hd0)+1

rootnoverify (hd0)



title Lubuntu_ext2.vhd (Boot Partition Boot Sector - First Hard Disk, First Partition)

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

chainloader (hd0,0)+1



title Lubuntu_ext2.vhd (Boot Floppy Disk)

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (fd0)+1

rootnoverify (fd0)



title \n

root





title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

rootnoverify (hd0,0)

chainloader (hd0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

rootnoverify (hd0,0)

chainloader (hd0)+1



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

rootnoverify (hd0,0)

chainloader (hd0,0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

rootnoverify (hd0,0)

chainloader (hd0,0)+1



title \n

root



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

rootnoverify (hd0,0)

chainloader (hd0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

rootnoverify (hd0,0)

chainloader (hd0)+1



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

rootnoverify (hd0,0)

chainloader (hd0,0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

rootnoverify (hd0,0)

chainloader (hd0,0)+1



title \n

root



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

chainloader (hd0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

chainloader (hd0)+1



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

chainloader (hd0,0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

root (hd0,0)

chainloader (hd0,0)+1



title \n

root



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (hd0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (hd0)+1



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (hd0,0)



title Boot Lubuntu VHD

find --set-root --ignore-floppies /L1504Ex2.vhd

map /L1504Ex2.vhd (hd0)

map --hook

chainloader (hd0,0)+1



#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 04 March 2016 - 07:55 PM

And you also like to throw dices in order to write random menu.lst entries?  :dubbio:

The normal procedure is to boot the grub4dos WITHOUT a menu.lst, then issue commands in the command line interface, see what the results are and then reproduce a working set of commands in a menu.lst entry.

Which TYPE of .vhd is it? (only fixed size .vhd's are compatible with grub4dos mapping
Is the .vhd contiguous? <- it will give you an error 60 on command line otherwise
In one of the n "random" menu.lst entries that you posted, there is a reference to "configfile /boot/grub/grub.cfg", is that the GRUB2 configuration file coming from the Lubuntu? If yes what are its contents?

Generally speaking booting a Linux in grub4dos is made of five steps:

  1. map the image to a device such as: map /L1504Ex2.vhd (hd0)
  2. hook the mapping, like: map --hook
  3. chainloading a kernel, like: kernel /whatever/vmlinux.ext
  4. appending a initrd, like: initrd /whatever/init.rd
  5. issuing a boot command: boot (this last set is omitted when the commands are written to a menu.lst as it is automatically sent by the parser)

In step #4 one usually needs to add some (specific to each distro) "cheat codes", usually they can be retrieved form the configuration file for the original bootmanager (like GRUB2's grub.cfg or Syslinux's syslinux.cfg, but when a particular loading (such as the present one from an image) is needed additional "cheat codes" are usually necessary and they should be available on the distro documentation or home site.

:duff:
Wonko







Also tagged with one or more of these keywords: boot linux vhd grub4dos, linux, boot, vhd, grub4dos

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users