Grub2 parttool command and Partition Tools menu of AIO Boot

AIO Boot v0.9.7 has added the Partition Tools menu. This menu uses the Grub2 parttool command to help change some attributes of the partitions. This article will introduce this menu and instruct you to use this command manually.

List disk devices and partitions

First, we need to list the disk devices and partitions available on the computer. Press c to enter the command line and enter the following command:

ls -l


Grub2 parttool command

As a result, we can rely on two factors to determine which partition we want to use.

  • Label: The name of the label that you set for the partition.
  • UUID: On Windows, UUID is called Serial Number. You can get this value by using the vol command. For example: vol C: to get UUID for drive C: and vol D: to get UUID for drive D :.

The partition should be hdX,msdosY, here is hd0,msdos1.

  • Y is the partition number. Linux and Grub2 use the partition number starting with 1. Windows and Grub4dos start at 0.
  • We do not need to care about the value of X. Grub2 always assigns a value of 0 to the hard disk that it boots on first.
  • msdos is the format of the hard disk, msdos is the MBR. The GPT hard drive will be hd0, gpt1.

Grub2 parttool command only supports MBR (msdos).


The Grub2 parttool command can help you change the status and type of partitions.

Grub2 parttool command

parttool hd0,msdos2 boot+
parttool hd0,msdos2 boot-
parttool hd0,msdos2 type=0x07
parttool hd0,msdos2 hidden+
parttool hd0,msdos2 hidden-


Set this partition to Active. This does not make sense for Grub2, it is required for Windows bootloader.

parttool PARTTION boot+

When you set Active to a partition, Grub2 will automatically clear Active status for other partitions if present.

To clean the Active status:

parttool PARTTION boot-

Partition type

Perhaps we should just do this in case the partition type is incorrect. Use the following command:

parttool PARTTION type=VALUE

VALUE is the type of partition in BYTE format. See the full list here. NTFS is 0x07, FAT32 is 0x0C and Ext2/3/4 is 0x83. Note: If the value is 0x00, the partition will be deleted.

parttool PARTTION type=0x07


Grub2 checks the current partition type to change the partition type to hidden or unhidden. It no longer works on Windows 10 v1607 (or older, I don’t know). Use the following command to hide a partition:

parttool PARTTION hidden+


parttool PARTTION hidden-

Partition Tools

The “Partition Tools” menu of AIO Boot supports automatic listing of partitions and gives you options like these. It also supports you to Delete Partition, Backup MBR and Restore MBR.

From the Grub2 menu, press the n key to access the Partition Tools menu. You will see all the partitions on this disk.

Grub2 Partition Tools

Here, select a partition to perform the tasks you want.

Grub2 Delete Partition

Delete partition

If you use PartIMG Mapper to MAP ISO and PartIMG files into new partitions, you should delete them after you have used them.

You can not delete the current root partition, to delete the root partition, you need to set another partition as the root partition. From the Grub2 main menu, press the y key to list the partitions that can be set as the root partition. You can change the root partition if you install the AIO Boot on multiple partitions, or use the FAT32 & NTFS option of the AIO Boot Extractor. If you install AIO Boot on only one partition, use PartIMG Mapper to MAP the PartIMG_ROOT.img file, then you can set this new partition as the root partition.

Please note:

  • If you want to delete the real partition, please Backup MBR first. You can then Restore MBR as before Backup.
  • MBR information is only stored on the current root partition. If you change the root partition, you need to back up the MBR on that partition.
  • If you update to the new version of AIO Boot, the PartIMG_ROOT.img file is overwritten. If you previously used this file as the root partition, the backup information will be lost, please back up the MBR each time this file is overwritten.

This menu is only visible on USB. If you want to use on HDD, please create a file named FORCEHDD in folder /AIO/Tools.


Leave a Reply

Your email address will not be published. Required fields are marked *

3 thoughts on “Grub2 parttool command and Partition Tools menu of AIO Boot”

  1. Hi, please installed AIO BOOT on my pc, and later i just deleted only the files, now i can not boot my pc any longer, what i see is GRUB RESCUE. Anybody to help me out here