Monday, April 9, 2012

Adding extra boot items

Ok, so HirensBootCD is fairly well equipped with all of the diagnostic tools you will ever need and various other features. So, because Hiren is dedicated to keeping his iso at the size of a CD (700MB) he has left out a few handy tools that you may need. But, don't worry he has definitely left you with the option to add these extra programs.

This post will explain how to easily add these extra features.
So, first you will need to attach and navigate to your bootable flash drive, which we created in the last post. In, the root directory you will recall we copied three items. (That is grldr, menu.lst and the HBCD folder.) Now we will be working with a file called "menu-custom.lst" which is under the HBCD directory (that is X:/HBCD/menu-custom.lst where X: is your flash drive).

Editing the custom menu file.

Firstly, locate the file (menu-custom.lst) and open the file with Notepad (or Notepad++)
Now with this file open you will see a lot of text, this text are the menu items for the grub menu that loads when you select "Custom Menu...  (Use HBCDCustomizer to add your files)" from the main menu when booted to the flash drive.
None of the items in this menu currently work. Hiren has made this "Custom Menu" to make it easier to add these files/programs.
You will notice that most of the menu items are .iso files, to make this simpler for novices, in this post we will only work with these items.
Notice the entry for AVG Rescue CD:
 
In this entry, the menu item will show up with the title "AVG Rescue CD", and it will find and load the file "avg.iso" in the root directory of the drive (that is "X:/avg.iso:"). To make this a bit tidier we will put all of the boot items in the directory "Boot" (X:/Boot) by creating a new folder in the root of the drive and adding all of the iso files.
So, we will first edit the menu item to find the file "X:/Boot/avg.iso".
Edit the highlighted lines to look like this:

Adding the iso file.

Next we simply download the iso file. This iso being a bootable CD image itself, it will simply boot with no modification needed.
So, to get the file it is a free download from the AVG website here. We will need the CD Creation (not the one for USB Stick.)
Download this file (.iso) and save it in the folder we created (X:/Boot). The file needs to be renamed to avg.iso as it will have all of the version information in the name and be something ridiculously long like "avg_arl_cdi_all_120_120126a4898.iso."
We are all done. You should be able to boot to your flash drive and select "Custom Menu..." Then AVG Rescue CD and it will boot with no problems.

Summary

1. Open X:/HBCD/custom-menu.lst with notepad.
2. Locate menu item you wish to add.
3. Add iso file to the associated directory. i.e X:/avg.iso or X:/Boot/avg.iso

Notes:
Make sure that the file has the same name as in the custom-menu.lst file.
Make sure that the file is in the same directory as in the custom-menu.lst file.
If you edit the menu item because you changed the directory of the file, make sure that you change both highlighted lines of the menu item.

Conclusion

By using this cusom-menu.lst file we can add a number of new features to our flash drive, including booting to a version of Linux and using it for diagnostics. In this post we added AVG's Rescue CD which has proven to be a very handy tool for me as an IT Workshop Technician as it allows for the scanning and removal of virus' without the need to remove hard drives and also has a handy feature which scans and repairs boot sectors.
I personally have added a number of these items to my boot USB as well as a few of my own tools. Including my current project of a bootable Windows 7 Preinstalled Environment.

6 comments:

  1. hi :)
    i've just been playing with this, and now i'm looking for how to integrate the avira rescue CD.

    looking the custom-menu.lst, it doesn't direct to an .iso, but rather gives

    title AVIRA AntiVir Rescue CD (Virus Scanner)
    find --set-root /avira/vmlinuz
    kernel /avira/vmlinuz edd=off vga=ask initrd=/avira/initrd.gz ramdisk_size=133551 root=/dev/ram0 rw console=/dev/vc/4
    initrd /avira/initrd.gz

    would you know how to integrate the avira rescue.iso ?

    thanks.

    ReplyDelete
    Replies
    1. You have two choices here.
      You can either follow the directions of Hiren and extract the contents of the ISO to the associated folder shown in custom-menu.lst (meaning place all the contents of the iso "X:/avira")
      This may be the better option as Hiren tests the items before he adds them (It could be done like this for compatibility reasons)

      Or the second option is to just copy the original iso to your flash drive (X:/Boot/avira.iso) and create a new menu item that looks similar to the AVG one with a few Modifications.

      title AVIRA Rescue CD
      find --set-root /Boot/avira.iso
      map --mem /Boot/avira.iso (hd32)
      map --hook
      chainloader (hd32)

      Delete
  2. Hey, I know this hasn't been updated in awhile but hopefully you can help. I have a Windows 7 installer iso that I want to add to the Hirens Boot CD main menu so I can boot into Hirens and run the Windows 7 installer through Hirens. Is this even possible? I've tried a few things and can't seem to get it to work

    ReplyDelete
    Replies
    1. Sorry, there is no way easy way to simply add an option for a Windows 7 Install. I myself have tried and failed many times to add it to my 'Boot Menu'. The problem being, you can set it up to boot fine to the iso, but once you have booted to it the iso needs to be mounted as a CD device otherwise the installer cannot get the necessary files to apply to your hard drive.

      My only suggestion is to install using 'WinNTSetup', under the 'Other Tools' section of the HBCDMenu once you have booted to MiniXP. This program will allow you to install Windows(XP/7/8) from MiniXP, provided you have the appropriate files present. So firstly copy the X:/sources/install.wim file from any Windows 7 install disc onto your BootUSB (wherever you want). Then boot to MiniXP and run 'WinNTSetup' from the HBCDMenu and follow the prompts. This will be covered in a later article (already been covered for XP http://anarcist69.blogspot.com.au/2012/04/install-windows-xp-via-minixp.html)

      Delete
  3. is there a video on this i couldn't get it to work,

    ReplyDelete
  4. is there a video on this i couldn't get it to work,

    ReplyDelete