Jump to content











Photo

a1ive's GRUB 2

grub2 uefi mbr

  • Please log in to reply
38 replies to this topic

#26 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 02 January 2021 - 08:26 PM

Tested following menuentries:

menuentry "Boot /VHD/Mini-10-UEFI.vhd -l (NTFS) UEFI RAMDISK 2 GB" "/VHD/Mini-10-UEFI.vhd" {
  efiload /EFI/grub/ntfs_x64.efi
  search --no-floppy --set --file $2
  map --mem --rt -l $2
}

menuentry "Boot /VHD/Mini-10-UEFI.vhd (NTFS) UEFI RAMDISK 2 GB" "/VHD/Mini-10-UEFI.vhd" {
  efiload /EFI/grub/ntfs_x64.efi
  search --no-floppy --set --file $2
  map --mem --rt $2
}

First with -l do not work

 

Second without -l works fine

 

EDIT: The VHD file has a single NTFS partition, and was installed on Compact mode (LZX compressed), and it is located on a standard MBR uncompressed NTFS partition.

 

alacran


Edited by alacran, 02 January 2021 - 09:11 PM.


#27 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 03 January 2021 - 01:47 AM

Also tested following menuentries:

menuentry "Boot /VHD/10x64-38.vhd - UEFI Grub2  SVBus  RAMDISK  - 3.8 GB" {
  efiload /EFI/grub/ntfs_x64.efi
  search --file --set=vhd_drive --no-floppy /VHD/10x64-38.vhd
  map --mem --rt ($vhd_drive)/VHD/10x64-38.vhd
  boot
}

menuentry "Boot /VHD/10x64-38.vhd -l UEFI Grub2 SVBus  RAMDISK  - 3.8 GB" {
  efiload /EFI/grub/ntfs_x64.efi
  search --file --set=vhd_drive --no-floppy /VHD/10x64-38.vhd
  map --mem --rt -l ($vhd_drive)/VHD/10x64-38.vhd
  boot
}

In this case this is a normal (uncompressed) install on a 3.8 GB VHD, single NTFS partition VHD.

 

The first menuentry without -l booted fine.

 

The second menuentry with -l do not load to Ram.

 

alacran



#28 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 03 January 2021 - 08:04 AM

Test booting a RamOS on a 4000 MB (3.9 GB) VHD (Not compressed):

 

Just saw on a1ive's grub2 official releases page there is a new version, released a few hours ago, I decided to download it and after create the respective x86 and x64 efi versions and the core.img file, I used it for this test.

 

Only to test the limits I ran this test.

 

I was able to Ramboot a 4000 MB VHD NTFS single partition, on same PC with 8 GB of Ram, in this case this is same normal (uncompressed) installation, and it booted fine.

 

To test this, I increased the VHD size in command line and latter just expanded the single NTFS partition and edited the grub.cfg,  the VHD was not fragmented when cheked with Winconting.

menuentry "Boot /VHD/10x64-39.vhd - UEFI Grub2  SVBus  RAMDISK  - 3.9 GB" {
  efiload /EFI/grub/ntfs_x64.efi
  search --file --set=vhd_drive --no-floppy /VHD/10x64-39.vhd
  map --mem --rt ($vhd_drive)/VHD/10x64-39.vhd
  boot
}

menuentry "Boot /VHD/10x64-39.vhd -l UEFI Grub2 SVBus  RAMDISK  - 3.9 GB" {
  efiload /EFI/grub/ntfs_x64.efi
  search --file --set=vhd_drive --no-floppy /VHD/10x64-39.vhd
  map --mem --rt -l ($vhd_drive)/VHD/10x64-39.vhd
  boot
}

The first menuentry without -l booted fine.

 

The second menuentry with -l do not load to Ram.

 

I don't think it is a good idea to go further as the memory above 4 GB available on this PC, is 4 GB or 4096 MB.

 

Then I can conclude using a1ive's Grub 2 we can make use of all the memory available on the PC above 4 GB, without any issue.

 

alacran


  • liuzhaoyzz likes this

#29 zammibro

zammibro

    Member

  • Members
  • 59 posts
  •  
    United States

Posted 13 May 2021 - 07:37 PM

Sorry for interrupting this interesting conversation with a stupid question: how to add  a1ive's GRUB2 to a Windows 10 PC SSD in a way, so it can be called from a Grub4DOS entry chosen in Windows Boot Manager menu? Its interesting that practical usage instructions by regular folks are near always missed in such smart exchange.  :)


Edited by zammibro, 13 May 2021 - 07:39 PM.


#30 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 14 May 2021 - 04:36 AM

Please read this post, it may clarify some things for you: http://reboot.pro/in...400#entry218202

 

alacran



#31 vvurat

vvurat

    Frequent Member

  • Advanced user
  • 322 posts

Posted 01 February 2022 - 06:23 PM

what should be the minimal modules list / what is your prefered minimal modules? (i need chainload (chain module?), vhd boot ( vhd module), wimboot (wimboot module), ntboot (ntboot module)

is alive grub2 modules are compatible with latest grub2 version 2.0.6? Can i copy some modules to corresponding 2.0.6 folders?

is there up to date alive grub2 with 2.0.6?

#32 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 01 February 2022 - 10:54 PM

On following link to a download page, you will find all the a1ive's last precompiled versions of Grub2 File Manager that include the more common modules, just select your prefered language for download, otherwise you should compile it to your specific requirements.

 

https://github.com/a...anager/releases

 

I prefer to use the precompiled version.

 

Usually the precompiled versions fits all needs, in fact only once I needed to compile it to add an additional module, but once I got the required info with the use of that module, I never needed to run it again, and in next version I went back to use the author's precompiled version.

 

AFAIK agFM modules are not compatible with official grub2 versions.

 

alacran



#33 vvurat

vvurat

    Frequent Member

  • Advanced user
  • 322 posts

Posted 08 February 2022 - 01:54 PM

How to boot iso file? Not asking for a spesific linux distribution asking for a general iso. (msdos iso, acronis iso, winpe.iso) Is there a memdisk file or command in this? All my grub2 google searches results memdisk command but i did not see such a file and the commands i have found not works. Commands below will work in a1ive's GRUB 2? Will work in UEFI boot?

 

GRUB2

Add the following in your config scripts for grub2:

 menuentry "Hardware Detection Tool from floppy" {
   linux16 /memdisk
   initrd16 /hdt.img
 }
 
 menuentry "Hardware Detection Tool from iso" {
   linux16 /memdisk iso
   initrd16 /hdt.iso
 }
 
 menuentry "DOS from floppy image (with 'raw' parameter)" {
   linux16 /memdisk raw
   initrd16 /dosboot.img
 }


#34 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 08 February 2022 - 09:03 PM

If you download your prefered language version of Grub2 File Manager mentioned in the info in my previous post, you can run it from other loaders by means of following commands, quoted from the main page in GitHub:

 

Spoiler

 

NOTE: You can replace it with grubfm_multiarch.iso

 

And then Grub2 File Manager will load its GUI screen to let you select what to boot, from all the content available in your internal and external drives, and you will not need to type anything else to load/boot a bootable file.

 

Attached a picture of supported files.

 

Files supported.png
 
alacran


#35 breaker

breaker

    Frequent Member

  • Advanced user
  • 114 posts
  •  
    United States

Posted 09 February 2022 - 02:37 AM

Just to be clear, is this a fork of GNU GRUB? https://www.gnu.org/software/grub/

 

It used to be my favorite way to mulitboot mbr systems, especially since you could also boot isos with the correct syntax.

 

 

GNU GRUB (AKA grub2) can't boot Windows directly. Also, to boot Linux Live ISOs, the format for the grub.cfg entry is something like this for UEFI mode:

menuentry "Ubuntu 20.04 ISO" {
   set isofile="/home/<username>/Downloads/ubuntu-20.04-desktop-amd64.iso"
   # or set isofile="/<username>/Downloads/ubuntu-20.04-desktop-amd64.iso"
   # if you use a single partition for your $HOME
   rmmod tpm
   loopback loop (hd0,5)$isofile
   linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
   initrd (loop)/casper/initrd
}

https://help.ubuntu....y/Grub2/ISOBoot

 

Same for the a1ive's?



#36 alacran

alacran

    Platinum Member

  • .script developer
  • 2572 posts
  •  
    Mexico

Posted 09 February 2022 - 03:17 AM

a1ive's GRUB 2 is a fork of GRUB 2 but with a lot of improvements to make also many things grub2 can't do.

 

On the first post of this topic you can find more info and links to the official page and manual.

 

And a1ive's Grub2 File Manager is a GUI file manager (based in a1ive's GRUB 2) that let you select what you want to boot, in a graphical environment, withour requiring to type anything else to load/boot a bootable file.

 

alacran



#37 a1ive

a1ive

    Member

  • Developer
  • 57 posts
  •  
    China

Posted 09 February 2022 - 10:17 AM

 

How to boot iso file? Not asking for a spesific linux distribution asking for a general iso. (msdos iso, acronis iso, winpe.iso) Is there a memdisk file or command in this? All my grub2 google searches results memdisk command but i did not see such a file and the commands i have found not works. Commands below will work in a1ive's GRUB 2? Will work in UEFI boot?

 

GRUB2

Add the following in your config scripts for grub2:

 menuentry "Hardware Detection Tool from floppy" {
   linux16 /memdisk
   initrd16 /hdt.img
 }
 
 menuentry "Hardware Detection Tool from iso" {
   linux16 /memdisk iso
   initrd16 /hdt.iso
 }
 
 menuentry "DOS from floppy image (with 'raw' parameter)" {
   linux16 /memdisk raw
   initrd16 /dosboot.img
 }

these menu entries also work on my fork of grub2.

However, you CANNOT boot an MS-DOS iso/img in UEFI because MS-DOS does not support UEFI!

You can use the `map` command to load and boot an ISO that supports UEFI booting:

menuentry "Boot WinPE ISO" {
    map -f (hd0,2)/winpe.iso
    boot
}

  • vvurat likes this

#38 a1ive

a1ive

    Member

  • Developer
  • 57 posts
  •  
    China

Posted 09 February 2022 - 10:21 AM

Just to be clear, is this a fork of GNU GRUB? https://www.gnu.org/software/grub/

Yes, it is a fork of GNU GRUB.

 

menuentry "Ubuntu 20.04 ISO" {

set isofile="/home/<username>/Downloads/ubuntu-20.04-desktop-amd64.iso"
# or set isofile="/<username>/Downloads/ubuntu-20.04-desktop-amd64.iso"
# if you use a single partition for your $HOME
rmmod tpm
loopback loop
(hd0,5)$isofile
linux
(loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd
(loop)/casper/initrd
}

https://help.ubuntu....y/Grub2/ISOBoot

 

Same for the a1ive's?

Yes.



#39 steve6375

steve6375

    Platinum Member

  • Developer
  • 7491 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 11 February 2022 - 09:34 AM

If you want to know more about agFM and a1ive's grub2 you can always buy my eBook #4 :D

https://payhip.com/SteveSi

 

 







Also tagged with one or more of these keywords: grub2, uefi, mbr

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users