Jump to content











Photo
- - - - -

Boot same disk either GPT or MBR?


Best Answer alacran , 17 June 2021 - 10:58 PM

On usuall Bios or CSM mode boot the HD is MBR partitioned. HD max size is 2 TB. Max of 4 primary partitions or 3 primary partitions and a extended partition with multiple logical partitions.

 

On usuall UEFI boot the HD is GPT partitioned. No problem if HD is bigger than 2 TB. Many partitions are possible.

 

There is no advantage in UEFI + GPT unless your HD is bigger than 2 TB.

 

There are some tricks to boot on Bios or CSM mode  from a GPT partitioned HD, but it is complicated and totally unnecessary in your case.

 

In your actual Bios or CSM mode boot you can add to bootable partition grld.mbr and grld files and create or edit your actual menu.lst, and (if you haven't done it) by means of BootIce it is very easy to add an entry to boot from OS(s) on other primary or logical partitions or boot also grld.mbr from grub4dos v046a (for Bios), on your menu.lst you can make entries to boot from other OS(s), some ISO(s) or Ramboot Mini-VHD(s) files manually, or by means of UEFI MULTI and/or VHD_WIMBOOT, to create the respective entries automatically, both programs made by wimb.

 

In UEFI + GPT boot, you can't do same as on previous paragraph, as using UEFI + Secure Boot you can only boot Windows OS(s), in this case it is necessary to boot first to grub2 and from it load the Windows OS(s) or grub4dos for UEFI, or dissable Secure Boot and boot directly to grub4dos for UEFI replacing the bootmgfw.efi with the respective *.efi file from grub4dos for UEFI renaming it to bootmgfw.efi, in UEFI + GPT case also same tools from wimb mentioned on previous paragraph will work to create the respective entries automatically.

 

So far I'm using this version of grub4dos v046a (for Bios) and there are no bugs in it.

 

So far I'm using this version of grub4dos for UEFI and there are no bugs in it.

 

So you have available alternatives to choose, but I strongly recommend keep Bios or CSM mode boot and MBR partitioned HD.

 

alacran

Go to the full post


  • Please log in to reply
32 replies to this topic

#1 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 17 June 2021 - 09:20 PM

Hello All.  Apologies if this is the wrong forum; if so, please redirect.

 

In my BIOS boot-order, some devices show up twice:  once as normal, and once as UEFI device; and the BIOS allows selection of either to boot from.  Having done some reading, it seems as though a GPT partitioned disk still contains a traditional MBR.

 

Question:  Is it possible to successfully boot the same disk (SSD), by either GPT or MBR (perhaps to different partition on the disk)?

 

Reason:  I would like to selectively boot one of two different partitions on the same disk, but don't want to have to select from a boot menu at each and every boot.  I would like to automatically boot every time into the first partition, unless at boot time I press the F12 key to enter the boot menu, and manually select to boot the second partition.  The caveat is that the second partition should be an MBR partition for Grub4DOS.

 

Background (not necessary to question, but to keep on-topic):  Years ago, I played around with RMPrepUSB and Grub4DOS, and came across a tutorial to create a small partition on the system's internal drive and place Grub4DOS into the partition boot record, and then use that partition to hold and boot a Clonezilla Live image (or any other image for that matter) to create a backup image of the main drive, without needing a USB stick; an idea which I liked.

 

So, on my numbers two and three systems (I have three desktop systems relevant here), each of which has a 120GB SATA3 SSD system disk and a 2TB data HDD, I created such a partition, so that the drive layouts are thus:

 

System 2:

SSD:  | System Reserved | C: Window | Recovery |

HDD: | D: Data | E: Grub4DOS/Clonezilla |

 

System 3:

SSD:  | C: Window | Recovery |

HDD: | D: Data | E: Grub4DOS/Clonezilla |

(No idea why one system has a Windows System Reserved Partition and the other does not.  Both systems previously had earlier versions of Windows (7/8) when they were upgraded (by clean install) to Windows 10 years ago.)

 

Both systems are UEFI/GPT capable, but are configured as BIOS/MBR.  Each is set to automatically boot C: on the SSD, unless F12 is used to enter the boot menu and select E: on the HDD, which boots Grub4DOS.  All works fine.

 

I should note that I build all my systems myself, with an eye (or ear) toward silent computing, so my newest system (which is now several years old) was built with an SSD only, and no HDD.  It's layout is:

 

System 1:

SSD:  | C: Windows | Recovery | D: Data | E: for Grub4DOS/Clonezilla |

 

On this system, which is also configured as BIOS/MBR (though is UEFI/GPT capable), although the small partition (E:) is there, I never did get around to installing Grub4DOS/Clonezilla.  And I'm not sure how I would boot it if it were there.

 

The SATA3 SSD on this system is 500GB (big mistake), as at the time it seemed like the Windows partition could be relatively small, and leave sufficient room for a reasonable sized data partition.  Well, the Windows partition has grown and now become full, and needs to be enlarged.  I have ordered a 1TB M.2 NVMe SSD, which will become my D: Data partition, and will leave plenty of room on the SATA3 SSD to enlarge the Windows partition.

 

My understanding is that there should be no problem in using an M.2 NVMe SSD on a BIOS/MBR-configured system (which is EUFI capable), as long as it is used only for data, and not to boot.  But this still leaves the question asked at the top of this post.

 

Supposing that the SATA3 SSD was converted to GPT, and the system configured as UEFI to boot the Windows partition, could that same drive still be booted as MBR from the F12 boot menu?  And if so, Grub4DOS could be placed in the MBR to boot E:, but would have no effect when the system was booted as GPT.

 

If this is a hopeless idea, don't hesitate to say so.  Or any alternative solutions would be welcomed as well.  But all of this is just as a matter of convenience, to have the Clonezilla Live image available on local storage, without needing a USB stick, as is also the case with the other two systems.  The primary goal will be to migrate D: Data to the new M.2 SSD, and enlarge the Windows partition.

 

Thanks for any thoughts.



#2 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 17 June 2021 - 10:58 PM   Best Answer

On usuall Bios or CSM mode boot the HD is MBR partitioned. HD max size is 2 TB. Max of 4 primary partitions or 3 primary partitions and a extended partition with multiple logical partitions.

 

On usuall UEFI boot the HD is GPT partitioned. No problem if HD is bigger than 2 TB. Many partitions are possible.

 

There is no advantage in UEFI + GPT unless your HD is bigger than 2 TB.

 

There are some tricks to boot on Bios or CSM mode  from a GPT partitioned HD, but it is complicated and totally unnecessary in your case.

 

In your actual Bios or CSM mode boot you can add to bootable partition grld.mbr and grld files and create or edit your actual menu.lst, and (if you haven't done it) by means of BootIce it is very easy to add an entry to boot from OS(s) on other primary or logical partitions or boot also grld.mbr from grub4dos v046a (for Bios), on your menu.lst you can make entries to boot from other OS(s), some ISO(s) or Ramboot Mini-VHD(s) files manually, or by means of UEFI MULTI and/or VHD_WIMBOOT, to create the respective entries automatically, both programs made by wimb.

 

In UEFI + GPT boot, you can't do same as on previous paragraph, as using UEFI + Secure Boot you can only boot Windows OS(s), in this case it is necessary to boot first to grub2 and from it load the Windows OS(s) or grub4dos for UEFI, or dissable Secure Boot and boot directly to grub4dos for UEFI replacing the bootmgfw.efi with the respective *.efi file from grub4dos for UEFI renaming it to bootmgfw.efi, in UEFI + GPT case also same tools from wimb mentioned on previous paragraph will work to create the respective entries automatically.

 

So far I'm using this version of grub4dos v046a (for Bios) and there are no bugs in it.

 

So far I'm using this version of grub4dos for UEFI and there are no bugs in it.

 

So you have available alternatives to choose, but I strongly recommend keep Bios or CSM mode boot and MBR partitioned HD.

 

alacran


  • Tokener likes this

#3 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 17 June 2021 - 11:30 PM

From a MBR partitioned disk having first primary partition active and FAT-32 formated, it is possible to boot OS(s) installed on other primary partitions as Bios/CSM or as UEFI, this approch is very used for USB devices to make them capables to boot both ways, see USB Format Tool by wimb.

 

WARNING: USB Format Tool fully erase all info on the disk before repartition it.

 

alacran



#4 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 17 June 2021 - 11:36 PM

My dear Alacrán, for a start pls let me o.t. as well. I wanna jump at the chance of telling you my findings on win11. did the same purging as I always do on win10, including my brute force sessions. I can tell u that over 90% of the reductions have worked, except registry1staid, which yields an unbootable version (probably as it dirupts the taskbar) and deviceremover (which does not even start). all cleaners work and wimb's reducer wants adjusting to the still cryptic win11 taskbar, but this is no major problem as customizable alternatives to win11 taskbar are to be expected in the months to come. overall, the system runs a little smoother and its space impact is a little lower than win10.



#5 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 17 June 2021 - 11:47 PM

You should not install or test unofficial versions of any OS, AFAIK that is a filtered version and who knows what kind of bugs and malware it can have.

 

alacran



#6 antonino61

antonino61

    Gold Member

  • Advanced user
  • 1525 posts
  •  
    Italy

Posted 17 June 2021 - 11:51 PM

official versions will be even better, they say. btw, prio.exe is another one of the very few programs that do not work.



#7 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 18 June 2021 - 12:09 AM

Thanks for detailed post!

 

There is no advantage in UEFI + GPT unless your HD is bigger than 2 TB.

 

And I have no drives larger than 2TB (except in NAS, which is not of concern here).

 

In your actual Bios or CSM mode boot you can add to bootable partition grld.mbr and grld files and create or edit your actual menu.lst, and (if you haven't done it) by means of BootIce it is very easy to add an entry to boot from OS(s) on other primary or logical partitions or boot also grld.mbr from grub4dos v046a (for Bios), on your menu.lst you can make entries to boot from other OS(s), some ISO(s) or Ramboot Mini-VHD(s) files manually, or by means of UEFI MULTI and/or VHD_WIMBOOT, to create the respective entries automatically, both programs made by wimb.

 

My bootable partition is Windows 10 Professional x64 on C:, so grld.mbr and grld files would go in root of C:?

 

The desired boot choices are only two:  Windows on C:, or Clonezilla Live image on E:.  So menu.lst would contain two entries?

 

And with those files in place, the system would still boot to Windows in the same way that it does now?  And once there, I would enter some command to tell the system to reboot to some other partition?  Or do I completely misunderstand?



#8 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 18 June 2021 - 01:04 AM

Assuming you installed Win in the usuall way, and you haven't changed the MBR to grub4dos, with the following info you will be able to boot directly to the Win OS(s) by Win boot files/folders, or from it load grld.mbr of grub4dos that will open menu.lst to select other options, which may include Win OS(s) or ISO(s) or Ramboot Mini VHD(s) etc.

 

 

My bootable partition is Windows 10 Professional x64 on C:, so grld.mbr and grld files would go in root of C:?

 

No, that is in fact Windows partition or System drive, the bootable partition or Boot drive is the very first primary active partition (usually hidden and no drive letter assigned to it) where all boot files/folders reside, the one that MS incorrectly uses to name System or System Reserved (or Reservado para el sistema in Spanish), unless you omited its creation and put all together on same Windows partition (if that is the case see the EDIT), which is not usually very common during standard installation procedure. (but there are ways to do it).

 

Go to Control panel, open Explorer options go to See tab, go to show hidden files and folders and select it, go to Hide OS protected files and uncheck it, acept the info in the opened message, make a click on acept or OK.

 

Now open Disk management (%WinDir%\System32\diskmgmt.msc) and you can assing a letter to the Boot drive (I use S:) and now you can see all its content, there on the root of that S: partition/drive is where you should put grld.mbr and grld and menu.lst, and make desired changes in Windows boot menu located on S:\Boot\BCD by means of BootIce and/or UEFI_MULTI or VHD_WIMBOOT.  After finish all the editions on menu.lst you can remove the S: drive letter if you want, but next time you need to edit menu.lst you will have to assing a letter to that partition again.

 

Depending on the free espace available on S: you may add maybe a little ISO file that can be loaded by an entry in menu.lst but I prefer to locate all my ISO files on the folder images created for this pourpose on the partition dedicated to hold documents, downloads, etc., outside of the OS partition(s).

 

EDIT: If after checking as mentioned, you really do not have a separate small first primary active partition to hold boot files/folders, and the partition holding the OS is the first primary active partition, in this case Boot drive and Windows partition (or System drive) are the same partition, then put there grld.mbr + grld + menu.lst, it will not be any problem if doing it this way,

 

alacran

Attached Thumbnails

  • BootIce.png


#9 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 18 June 2021 - 07:15 AM

To hopefully clarify the matter.

 

There are a number of programs that are boot managers (grub4dos is one of them, as well as GRUB, GRUB2, Syslinux, etc.) that double as boot loaders (often only for some, not all, OS's) and a number of OS specific boot loaders (such as NTLDR and BOOTMGR) that double as (very simple) boot managers.

 

The BIOS knows nothing about these programs, it simply reads the code in the MBR and executes that code.

 

What you have right now is (Windows 10) BOOTMGR set as PRIMARY boot manager/boot loader, in the MBR you have code that loads the bootsector of the active partition on disk and executes the code on it, this code invokes BOOTMGR, and the code in BOOTMGR will read the settings in \boot\BCD (that right now only consist essentially in "boot Windows 10", so you have no multiple choices) and execute the choice you make.

 

So, at boot time:

BIOS->MBR code->Bootsector of Primary Active partiion (code that loads BOOTMGR)->BOOTMGR->\boot\BCD settings->your choice (or default after timeout)

 

Adding the grldr.mbr and grldr basically consists in adding a choice (bootable entry) to the \boot\BCD, so that you will have there two possible choices:

1) Windows 10 (and you will boot exactly like you are doing now if you choose it)

2) grub4dos/grldr (and then grldr will load the menu.lst and you will be able to choose among the entries in it)

 

So, in your specific case, you *need* only one entry/option in menu.lst (the one for Clonezilla), but of course you can add also an entry for Windows 10, this latter however will be more than anything else a "go back" as it will re-load the BOOTMGR and you will be again to the \boot\BCD choices between Windows 10 and grub4dos.

 

There are other ways (NOT recommended in your case) to install grub4dos as PRIMARY boot manager, in that case you need the two entries in grub4dos menu.lst (one for Windows 10 BOOTMGR and one for Clonezilla).

 

If you prefer, in the suggested setup, you won't "touch" grub4dos at all when booting Windows 10, and only load it when you choose to boot *something else*.

 

:duff:

Wonko


  • Tokener and antonino61 like this

#10 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 18 June 2021 - 11:43 PM

Thank you, @alacran and @Wonko. Yes, understood. In my No.2 and No.3 systems, one has as System Reserved partition, and the other does not. But my No.1 system (the one relevant to this discussion) does not. So now in C:\, there is a Boot\ directory, which contains a BCD file (which the system won't let me view).

 

So, then the Grub4DOS files would go in C:\, as you said (in the root, I presume?). Once those files are there, what needs to be done next? Is it to use BootIce to edit BCD to add an entry for Grub4DOS?

 

Thanks for the boot sequence explanation. So as I understand it, once there are two choices in BCD, then every time I boot, I will need to select one of those two entries? The first will boot Windows just as it does now, and the second will run Grub4DOS (from C:\, and therefore it is not required to have Grub4DOS in the E: partition boot sector?) which will display a menu, which I can then cause to run images from E:, such as Clonezilla Live, or GParted Live, or other?

 

Or, if Grub4DOS was in the MBR, then at every boot there would be a Grub4DOS menu, from which to choose Windows on C:, or some live image from E:?  But in either case, I would need to make a menu entry selection (or wait for a time-out) at every boot?  If I have understood all of the above correctly, well and good, but if not please correct me.

 

Now I would like to explain that on my No.2 and No.3 systems, the E: partition (with live images), is on a different physical drive than the System Partition (C:). Therefore, when one of those systems boots normally, I never have to see a menu or wait for a time-out; it simply starts Windows. When I want to run a live image, then at boot time I press F12 to enter the BIOS boot menu, and choose to boot from the second physical drive, which starts Grub4DOS.

 

That is the scenario I would like to achieve for system No.1, but it is complicated because C: and E: are on the same physical drive, and so the BIOS boot menu doesn't help in this case. But if set up as described above (with Grub4DOS either in C:, or in the MBR), and then if the time-out in the BCD menu in the first case, or the time-out in the Grub4DOS menu in the second case, was set to zero, then I would never have to make a selection or wait for the time-out.

 

The trick would be to change the menu's default, according to which way I wanted to boot next. So normally, it would always boot to Windows. When I wanted Clonezilla, I would run some Windows compatible executable (either command-line or graphical) in Windows, which would alter the menu's default to be Grub4DOS. And in the Grub4DOS menu, it would require some utility to once again set the default back to the Windows entry. I don't know if such utilities exist, or if that is asking too much, or if perhaps there is some alternative method?


Edited by Al Gorithm, 18 June 2021 - 11:46 PM.


#11 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 19 June 2021 - 03:45 AM

But my No.1 system (the one relevant to this discussion) does not. So now in C:\, there is a Boot\ directory, which contains a BCD file (which the system won't let me view).

 

 

As previously said:

 

Go to Control panel, open Explorer options go to See tab, go to show hidden files and folders and select it, go to Hide OS protected files and uncheck it, acept the info in the opened message, make a click on acept or OK.

 

Then on C:\ put grld.mbr, grld and menu.lst, and make desired changes in Windows boot menu located on \Boot\BCD by means of BootIce and/or UEFI_MULTI or VHD_WIMBOOT.  After finish all the editions on menu.lst you can revert the changes made on Explorer options if you want.

 


 So as I understand it, once there are two choices in BCD, then every time I boot, I will need to select one of those two entries? The first will boot Windows just as it does now, and the second will run Grub4DOS (from C:\, and therefore it is not required to have Grub4DOS in the E: partition boot sector?) which will display a menu, which I can then cause to run images from E:, such as Clonezilla Live, or GParted Live, or other?

 

 

On your BCD menu, your 10 OS is the default boot option, and it will remain that way unless you change it, your only will add a new entry on it to load/run grld.mbr which will run grld and finnally load menu.lst with your desired options (when you select this option, all this is made almost instantaneously).

The Timeout is the time (in seconds) you have available to boot from other than the default option, I suggest to change that to 10 or 5 seconds, your OS will always boot to the default option unless you select another option before the Timeout finish.

 

See the attached picture on my previous post.

 

alacran



#12 Tokener

Tokener

    Frequent Member

  • Developer
  • 378 posts

Posted 19 June 2021 - 06:44 AM

Hola alacran

your comment #2 is very interesting,

 

boot directly to grub4dos for UEFI replacing the bootmgfw.efi with the respective *.efi file from grub4dos for UEFI renaming it to bootmgfw.efi

may I ask you: (If it's not off topic) What is the respective*.efi file in this case?



#13 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 19 June 2021 - 08:06 AM

No problem my friend.

 

Maybe I didn't expressed the idea clearly unought, but I thought it was very obvious.

 

BOOTIA32.EFI or BOOTX64.EFI are the two files from grub4dos for UEFI that you can use to rename to bootmgfw.efi (depending on the OS architecture), replacing the \EFI\Microsoft\Boot\bootmgfw.efi file (it is a good practice to first rename the original file, [maybe as bootmgfw-original.efi] and not really replace it).

 

alacran


  • Tokener likes this

#14 relynx

relynx

    Newbie

  • Members
  • 10 posts
  •  
    Germany

Posted 19 June 2021 - 11:05 AM

...

 

The trick would be to change the menu's default, according to which way I wanted to boot next. ...

.

After you've managed to boot Grub4DOS from Win10 boot manager (bootmgr),
you can try this:

1. Set bootmgr timeout (by BootICE or EasyBCD) to 0.
    => boots directly to Windows 10 as default on start up;
    
2. In Windows 10: Start > Power > SHIFT + Restart > other OS
    => boots into bootmgr menu to manually select Grub4DOS;


Edited by relynx, 19 June 2021 - 11:19 AM.


#15 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 19 June 2021 - 03:20 PM

Al Gorithm, on 19 Jun 2021 - 01:43 AM, said:
So, then the Grub4DOS files would go in C:\, as you said (in the root, I presume?). Once those files are there, what needs to be done next? Is it to use BootIce to edit BCD to add an entry for Grub4DOS?

The grub4dos files (grldr, grldr.mbr and menu.lst) could go almost anywhere (on any disk/partition) but it is simpler to put them on the SAME disk and partition where you have your BOOTMGR and \boot\BCD (yes in root, again they may be put elsewhere, but keep it simple, at least until you get familiar with the tools and their usage).
And yes, Bootice will allow you to add an entry to the \boot\BCD invoking grldr.mbr.
 

Al Gorithm, on 19 Jun 2021 - 01:43 AM, said:
Thanks for the boot sequence explanation. So as I understand it, once there are two choices in BCD, then every time I boot, I will need to select one of those two entries? The first will boot Windows just as it does now, and the second will run Grub4DOS (from C:\, and therefore it is not required to have Grub4DOS in the E: partition boot sector?) which will display a menu, which I can then cause to run images from E:, such as Clonezilla Live, or GParted Live, or other?

Yes, and no.
In your case, you will likely boot 99% the Windows, so you can have it set (in boot\BCD) as default (normally selected without any key press) with a short timeout (like 1 or 2 or 3 seconds, i.e. not too long as to not substantially alter your current booting time, but long enough to allow you the 1% of the time to use the arrow down key to select the "other" entry).
This way "normal" boot (without any interaction will be exactly as you have it now (with a couple seconds pause added), while if you want to get to the grub4dos choices you need to pay attention at boot time and chose the grub4dos entry within the timeout.
 

Al Gorithm, on 19 Jun 2021 - 01:43 AM, said:
Or, if Grub4DOS was in the MBR, then at every boot there would be a Grub4DOS menu, from which to choose Windows on C:, or some live image from E:? But in either case, I would need to make a menu entry selection (or wait for a time-out) at every boot? If I have understood all of the above correctly, well and good, but if not please correct me.

Yes you got it right, BUT FORGET (for the moment) about installing grub4dos to the MBR (i.e. making it the PRIMARY bootmanager).
 

Al Gorithm, on 19 Jun 2021 - 01:43 AM, said:
Now I would like to explain that on my No.2 and No.3 systems, the E: partition (with live images), is on a different physical drive than the System Partition (C:). Therefore, when one of those systems boots normally, I never have to see a menu or wait for a time-out; it simply starts Windows. When I want to run a live image, then at boot time I press F12 to enter the BIOS boot menu, and choose to boot from the second physical drive, which starts Grub4DOS.

With all due respect, that approach makes little sense, for a couple reasons at least:
1) you have to "know in advance" what you want to boot when you switch on the machine (whilst the other way you always switch on the machine the same way and you can choose the "other" entry on-the-fly, of course if the timeout is very short, like 1 second, you need anyway to be attentive at boot time, personally 2 or 3 seconds are enough to make the choice and do not add to the normal booting sequence a noticeable delay).
2) when you boot via F12 (this may depend on the specific BIOS and/or OS booting) usually (but not always) the BIOS disk order is changed, and this is (IMHO) never a good idea, as it may result in some confusion/increased possibility of errors if dealing with the disk #
 

Al Gorithm, on 19 Jun 2021 - 01:43 AM, said:
That is the scenario I would like to achieve for system No.1, but it is complicated because C: and E: are on the same physical drive, and so the BIOS boot menu doesn't help in this case. But if set up as described above (with Grub4DOS either in C:, or in the MBR), and then if the time-out in the BCD menu in the first case, or the time-out in the Grub4DOS menu in the second case, was set to zero, then I would never have to make a selection or wait for the time-out.

The trick would be to change the menu's default, according to which way I wanted to boot next. So normally, it would always boot to Windows. When I wanted Clonezilla, I would run some Windows compatible executable (either command-line or graphical) in Windows, which would alter the menu's default to be Grub4DOS. And in the Grub4DOS menu, it would require some utility to once again set the default back to the Windows entry. I don't know if such utilities exist, or if that is asking too much, or if perhaps there is some alternative method?

Once said again that you don't want/need the complication of an installed grub4dos, it is of course trivial to edit from the booted windows the menu.lst (which is a simple text file) so that it behaves whichever way you want, whilst editing the (in use) \boot\BCD, while doable, is less trivial.

You would need a small batch using BCDEDIT.
BUT the change (to the BCD or to the menu.lst) won't be "temporary", so you will need to also re-edit the \boot\BCD (or the menu.lst) back to the "normal" values once booted in the "other" OS.

You could follow the simple and nice suggestion by relynx above to have a "normal" boot to windows with timeout 0 (and thus no choices) and a reboot to the other OS (more properly with access to choices, as you can still shift+restart and decide to go back to Windows).

:duff:
Wonko


  • antonino61 likes this

#16 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 19 June 2021 - 07:43 PM

In my BIOS boot-order, some devices show up twice:  once as normal, and once as UEFI device; and the BIOS allows selection of either to boot from.

 

Both systems are UEFI/GPT capable, but are configured as BIOS/MBR.  Each is set to automatically boot C: on the SSD, unless F12 is used to enter the boot menu and select E: on the HDD, which boots Grub4DOS.  All works fine.

.
There is a boot selection at UEFI/CSM machines. You use this already. This can be used in another way.

A BIOS\UEFI firmware soluiton may be possible.
There are different hardware. There wil be different results.
Configure the hardware to boot at CSM and UEFI mode, disable secure boot. I understand, you use this setting already.

There is a default UEFI boot file name
\efi\boot\bootx64.efi

Install Windows at BIOS MBR mode.
Add a small FAT32 partition. Copy grub4dos UEFI to this partion \efi\boot\bootx64.efi.

Boot the machine, press F12.
The machine may detect a \efi\boot\bootx64.efi at MBR internal disk. Or will miss it, e.g. search at a GPT disk only.
Which boot menu entries do you get?

.
Be aware, you may boot Clonezilla at UEFI mode. 
Backup and restore the MBR partitons should be possible anyway.

If the default UEFI boot file name fails, it may be possible to add a entry to the NVRAM.
This boot setting is stored at the motherboard. This would be the next approach.



#17 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 19 June 2021 - 09:25 PM

@cdob, thanks very much.  This is a direct answer to the original question.  But this is somewhat over my head.  I think I will try the other methods first, and come back to this method if necessary.  Again, thanks.

 

@Wonko, @alacran, and @relynx, thanks very much for your help.  So, I placed grldr and grldr.mbr from grub4dos v046a (from your link), and a simple menu.lst in C:\, used BootIce to add an entry, and upon restart, I have a menu with the two entries.  When I select the GRUB4DOS entry, GRUB4DOS does indeed boot and display its menu.  But of course the menu entries don't yet do anything, since I haven't yet learned how to redirect those entries to image files on E: (a FAT32 partition).

 

Then I tried placing grldr, grldr.mbr, and menu.lst in E:\grub\ (since it was said that they could be placed anywhere, and I thought to keep all the GRUB4DOS content together), and edited the BCD entry accordingly.  But at boot when selecting this entry from the BCD menu, it gives an error (0xc000000d) that E:\grub\grldr.mbr could not be found or had an error.  I tried setting the BCD entry both to BOOT(WIM)/LOCATE(VHD) (which came up by default), and to HD0 with Partition set to 5: (FAT32).  But both ways resulted in the same error.  What is wrong here?

 

Meanwhile, I'm studying the GRUB4DOS documentation that I can find, though many, many of the links found by searching, are now defunct.

 

@relynx, thanks very much for your tip about SHIFT+restart, of which I was unaware, but I think it may prove an excellent help!



#18 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 20 June 2021 - 07:34 AM

@cdob, thanks very much.  This is a direct answer to the original question.  But this is somewhat over my head.  I think I will try the other methods first, and come back to this method if necessary.  Again, thanks.

 

Meanwhile, I'm studying the GRUB4DOS documentation that I can find, though many, many of the links found by searching, are now defunct.

 

Get the "basic" (please read as "good ol'") guide from the Wayback Machine:

https://web.archive....rub4dos_htm.zip

 

Till now you are using grub4dos in a very basic manner, so all or most of what you need should already be there.

 

The guide is dated (i.e. newer gruib4dos versions have many added features and possibilities) but you should start from that one, then we will talk of the new possibilities,:

 

About your issue with E:\grub\ path, you made two changes at the same time (changing the volume from C:\ to E:\ AND putting the files in a folder instead of in root), try with C:\grub and with E:\, it is one of the two that is creating the issue.

 

You should also experiment separating the grldr.mbr (that might *need* to be in root) from the actual grldr file (that may well go into a \grub\ subdirectory).

 

It is also possible that the issue is with the BOOTMGR and the E:\ volume (as opposed to the C:\ ), I don't seem to remember such a limitation, but it is well possible that the good MS guys continued making the BOOTMGR "worse" (in the sense of more limited for anything but their own OS) in Windows 10. (before it you could load grldr "directly" from BOOT.INI, instead of having to pass through grldr.mbr and everything was simpler).

 

:duff:

Wonko



#19 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 20 June 2021 - 02:31 PM

Then I tried placing grldr, grldr.mbr, and menu.lst in E:\grub\ (since it was said that they could be placed anywhere, and I thought to keep all the GRUB4DOS content together), and edited the BCD entry accordingly.  But at boot when selecting this entry from the BCD menu, it gives an error (0xc000000d) that E:\grub\grldr.mbr could not be found or had an error.

Try bcdedit to edit boot\bcd. Run 'bcdedit.exe' and 'bcdedit.exe /v'

Both partition E: and partition locate does works here.

@ECHO OFF

call :add_bootsector E:\grub\grldr "Start grub4dos"
goto :eof

:add_bootsector
 for /f "tokens=1-3" %%a in ('BCDedit.exe /create /application BOOTSECTOR') do set guid=%%c
 rem BCDedit.exe /set %guid% device partition=%~d1
 BCDedit.exe /set %guid% device locate=custom:12000002
 BCDedit.exe /set %guid% path %~pnx1
 BCDedit.exe /set %guid% description "%~2"
 BCDedit.exe /displayorder %guid% /addlast
goto :eof


rem locate custom:12000002 search "path"


#20 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 20 June 2021 - 11:30 PM

Thanks.  So, I copied grldr, grldr.mbr, and menu.lst to E:\.  All three now exist in C:\, E:\, and E:\grub\.

 

I went to edit BCD, and I noticed that, as I previously mentioned, the BootIce [Boot Device] section has a Disk: selection with choice of either:  BOOT/(WIM)/LOCATE(VHD) (I have no idea what that means), OR HD0 (my system drive); and a Partition: selection, which is empty when Disk: selection is the former, but when Disk: selection is the latter, I have chosen 5: (FAT32), which is my E:\ partition.  I previously tried both Disk: selections, but both gave the same error.

 

But, now I noticed that, as said, I had (in the [Options] section) set boot file: to E:\grub\grldr.mbr, and I thought, perhaps the E: is redundant, since it is already specified in the Disk: and Partition: selections above.  So I removed the E: from the boot file: field, leaving just \grub\grldr.mbr, saved and rebooted.  Sure enough, GRUB4DOS booted successfully.  Hurrah! :D

 

Next, I will remove those three files from both C:\ and E:\, and leave them only in E:\grub\, and test to ensure that it runs successfully that way.

 

But, when I tried to run Clonezilla Live, it immediately gave an error about needing to update the microcode!  Sorry, but there was no way to take a screenshot.  After a lengthy delay, it finally said it would start a shell, because there was an error to the effect that it could not locate a filesystem or image to run.  In the shell, I typed 'exit', which led to a kernel panic, and hung to the point I needed to use the reset button.

 

So I have no idea what's wrong here, but will provide what information I can.  The 70GB E: drive contains:

 

E:\

|--$RECYCLE.BIN

|--grub

|   |--grub4dos-0.4.6a

|   |   |--sample

|   |   |--docs

|   |--ext

|--images

|--System Volume Information

 

\grub\ contains the unzipped GRUB4DOS package (the grub4dos-0.4.6a\ and ext\ directories), as well as the three files grldr, grldr.mbr, and menu.lst.

 

\images\ contains only the clonezilla-live-2.7.2-39-amd64.iso file.

 

menu.lst (copied from one of the other computers) contains menu entries for Restart and Shutdown, and the relevant Clonezilla menu entry is:

 

title Clonezilla Live\nClonezilla Live 2.7.2-39 manual mode.\n\n\nPress arrows to highlight; ENTER or b to boot; e to edit; c for command-line.
find --set-root /images/clonezilla-live-2.7.2-39-amd64.iso
map /images/clonezilla-live-2.7.2-39-amd64.iso (0xff)
map --hook
root (0xff)
kernel /live/vmlinuz initrd=/live/initrd.img boot=live union=overlay live-config quiet noswap edd=on nomodeset keyboard-layouts=NONE locales=en_US.UTF-8 vga=789 utc=no dhcp nosplash vmwgfx.enable_fbdev=1 findiso=/grub/images/clonezilla-live-2.4.7-8-amd64.iso live-media-path=/live toram=filesystem.squashfs ocs_prerun="timedatectl set-ntp off" ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no"
initrd /live/initrd.img

Most of that doesn't mean anything to me just yet, but I suspect that the error lays somewhere in there.

 

Likely off-topic question:  is there any way to prevent Windows from continually re-creating the $RECYCLE.BIN and System Volume Information directories on this partition?  :unsure:



#21 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 21 June 2021 - 12:24 AM

I have to congratulate you, you have a very good skill to complicate the simple things.

 

There is un-needed to copy grldr, grldr.mbr, and menu.lst to every single drive you have.

 

About BootIce just do it as per the image in my post No. 8

 

Then glrd.mbr is found on the very first drive, it looks for grld (starting from first drive), which in turn looks for menu.lst (starting from first drive), so you DO NOT need to especify any drive as on my picture, all other instances of those files ARE NOT required and ARE NOT used in my suggested proposal.

 

Forget about all other opinions and suggestions here, do it as I said, it is the simpler and easier way to do it, all other opinions are very good, but it is very clear you DO NOT have the knowledge neccessary to deal with them, as I assumed since the beginning based on your questions.

 

Go to your PC where your want to make your Clonezilla work, see my pictures and do same thing on your OS, make pictures and keep them for future reference. They show you the partition numbers of each drive on the selected HD.

 

On grub4dos the first HD is (hd0) and the fisrt primary partition on that disk is (hd0,0), the second primary is (hd0,1) and so on up to (hd0,3) the last possible primary partition, the first logicall partition on the first HD is (hd0,4) and so on.

 

The second HD fisrt primary partition is (hd1,0).

 

I assume you already have your Clonezilla on the drive where you want to boot from it, if not copy it there, copy your menu.lst that works fine on the other PC to the root of C: on the the PC that is not capable yet to boot Clonezilla.

 

Now edit the copied menu.lst just changing the numbers corresponding to the drive and partition where Clonezilla is located.  That should be all.

Attached Thumbnails

  • Select the drive.png
  • Parts Manage.png
  • Partition Management.png


#22 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 21 June 2021 - 12:55 AM

Quick update:  had to copy grldr to root of E:; probably root of any drive would work, but it seems that grldr must be in root, even though other files may be in other directory.

 

Had error in the menu command:  the /images/ directory on this system is not in the /grub/ directory, as on other system.  Corrected that, and now Clonezilla runs.

 

Other questions in previous post still stand.



#23 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 21 June 2021 - 09:48 AM

I have to congratulate you, you have a very good skill to complicate the simple things.

 

There is un-needed to copy grldr, grldr.mbr, and menu.lst to every single drive you have.

 

About BootIce just do it as per the image in my post No. 8

 

Then glrd.mbr is found on the very first drive, it looks for grld (starting from first drive), which in turn looks for menu.lst (starting from first drive), so you DO NOT need to especify any drive as on my picture, all other instances of those files ARE NOT required and ARE NOT used in my suggested proposal.

 

Forget about all other opinions and suggestions here, do it as I said, it is the simpler and easier way to do it, all other opinions are very good, but it is very clear you DO NOT have the knowledge neccessary to deal with them, as I assumed since the beginning based on your questions.

 

 

 

... and all this time I thought I was the grumpy one ...  :dubbio:

 

:duff:

Wonko



#24 Al Gorithm

Al Gorithm

    Member

  • Members
  • 32 posts
  •  
    Canada

Posted 21 June 2021 - 06:56 PM

it is very clear you DO NOT have the knowledge neccessary to deal with them,
 

Quite right, I do not (yet) have the knowledge to deal with certain issues.  Neither did you have such knowledge at some point in time, but you learned.  Assuredly I do have the skills to deal with said issues, and I too will learn.  It is not my intention to become an expert on these things, but to gain sufficient knowledge to know what I am doing, rather than just "do it this way because I said so".

 

Don't get me wrong.  I sincerely appreciate all of the great help given here by the regular forum members (including yourself) over the years to many, many people, and thank you all for it.

 

And, I have already learned a few things, such as:

 

1.  GRUB4DOS will look for grldr only in the root of drives, and not in sub-directories.

 

2.  Setting the BCD timeout in BootIce does not seem to take effect.  Even though it says it was successfully saved, when BootIce is restarted, the timeout seems to have reverted to 30 seconds.

 

3.  Even normally helpful forum members can have bad days!  :lol:



#25 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 21 June 2021 - 08:54 PM

On the left part of BootIce below the rectangle you can change the boot order or add new entries, etc. including set your prefered Timeout.

 

To make this changes take effect you need to make a click on Save Globals before closing that window, See attached picture.

 

I didn't have a bad day, I tried to explain you in accordance with your knowledge level, then other members came to make good suggestions, some of them very good bot not so simple, requiring a few more deeper knowledge, unnecesary by the way to solve your simple request to boot Clonezilla.

 

That comment you quoted, in no way had any irrespectul meaning from my part, it is a fact, and it is also a fact that you are about the same level I was before becoming a member of this forum, any knowledge I may have now, was lerned here on reboot.pro forum and on MSFN forum.

 

But first thing I learned is follow the instructions by the letter, forgetting any previous preconceived ideas I had.   To verify by myself if that instuctions work fine or not.

 

Then if there are other alternative ways to get the desired result, maybe try them also, but one by one, not mixing the procedures.

 

Your friend

 

alacran

Attached Thumbnails

  • Timeout.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users