Pages

Wednesday, December 21, 2011

Using Grub4DOS to Create a Bootable USB Drive From ISO

Grub4dos is mainly a boot manager which can be installed in a pen drive or portable hard disk to use as a parallel grub if ur on board grub is down.this can be also used to install certain linux os directly from the iso in the hard disk.This mainly work for ubuntu linux mint and puppy iso's.tthe grub can be also used to log in to the xp and windows 7 if the bootloader is lost.

first we need to install the grub4dos into the pendrive.get the grub4dos from following link

http://dl.dropbox.com/u/30579529/grubinst-1.1-bin-w32-2008-01-01.zip

and unzip to get grubinst_gui.exe and run it..

Once the program is started, select the Disk option, then click the Disk Refresh button and then select your flashdrive from the dropdown box

You should be able to tell which disk is your flashdrive by the size shown for each drive.

Now click the Part List Refresh button, then the dropdown box and finally select the Whole disk (MBR) option.

Check the Don't search floppy option, leave all the other options unchecked and cleared and then click the Install button to install Grub4DOS to the MBR of the flashdrive.

and grub is installed .....

now copy the grldr and menu.lst files from the downloaded and put it in the hard disk

edit the menu.lst to boot iso...'

my menu is as below i put my iso's in a folder named ISO in the drive and each iso has its own corresponding folders

color blue/green yellow/red white/magenta white/magenta
timeout 30
default /default

title Fedora 15 LiveCD - extracted
root (hd0,0)
kernel /ISO/fedora/vmlinuz0 rootfs=auto root=UUID= liveimg live_dir=/LiveCD/LiveOS/ ro quiet rhgb
initrd /ISO/fedora/initrd0.img

title Fedora 14 Live CD
root (hd0,0)
kernel (hd0,0)/vmlinuz0 linux askmethod
initrd (hd0,0)/initrd.img
boot

title FIND AND BOOT NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2

title FIND AND BOOT BOOTMGR of Windows VISTA/7
fallback 2
find --set-root --ignore-floppies /bootmgr
chainloader /bootmgr
savedefault --wait=2

title find and boot RedHat/Centos/Fedora Linux with menu.lst already installed
fallback 5
find --set-root /grub/menu.lst
savedefault --wait=2
configfile /grub/menu.lst

title Puppy Linux
find --set-root --ignore-floppies /ISO/puppy/initrd.gz
kernel /ISO/puppy/vmlinuz pmedia=usbflash psubdir=ISO/puppy
initrd /ISO/puppy/initrd.gz

title Linux Mint 12
find --set-root --ignore-floppies /ISO/mint/initrd.lz
kernel /ISO/mint/vmlinuz iso-scan/filename=/ISO/mint/linuxmint-12.iso file=/cdrom/preseed/mint.seed boot=casper noprompt
initrd /ISO/mint/initrd.lz

title Ubuntu 11
find --set-root --ignore-floppies /ISO/ubuntu/initrd.lz
kernel /ISO/ubuntu/vmlinuz iso-scan/filename=/ISO/ubuntu/ubuntu-11.iso file=/cdrom/preseed/ubuntu.seed boot=casper noprompt
initrd /ISO/ubuntu/initrd.lz

title commandline
commandline

title reboot
reboot

title Shutdown
halt

for windows 7 just unzip the iso into the root directory of the drive and use the code above

for ubuntu and linux mint we must unzip the files for vmlinux and initrd and put in same folder as in ISO

For fedora first we need to extract the LiveOS folder to the root of our pendrive and also extract vmlinuz and initrd.img to the LiveOS folder form isolinux folder and the following to the menu.lst

title Fedora default
find --set-root /LiveOS/vmlinuz0
kernel /LiveOS/vmlinuz0  root=live:CDLABEL=BOOT  rootfstype=auto ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
initrd /LiveOS/initrd0.img

here in the code CDLABEL =BOOT  ,BOOT must be your usb name given to usb

for Redhat first we need to copy the image folder into the root folder and give the code as below as per your path to vmlinuz and initrd.img

title RedHat6.2 default
find --set-root /ISO/redhat6.2/isolinux/vmlinuz
kernel /ISO/redhat6.2/isolinux/vmlinuz  root=live:CDLABEL=BOOT  rootfstype=auto ro liveimg quiet rhgb rd.luks=0 rd.md=0 rd.dm=0
initrd /ISO/redhat6.2/isolinux/initrd.img

and duirng installation select the iso form hard disk or pendrive where you have extracted the image folder

example for menu.lst https://dl.dropbox.com/u/30579529/menu.lst

Sunday, December 11, 2011

Remove Grub loader and get windows 7 boot loader back (uninstalling Linux)

1.Put the Windows 7 installation/Upgrade disc in the disc drive, and then start the computer (set to boot from CD in BIOS).

2. Press a key when you are prompted.

3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.

4. Click Repair your computer.

5. Click the operating system that you want to repair (Windows 7 in this case), and then click Next.

6. In the System Recovery Options dialog box, click Command Prompt.

7. Once in the command prompt, type exactly Bootrec.exe /FixMbr and then press ENTER. You will see "operation completed successfully." (Doesnt even take a second. Dont be alarmed )

8. Reboot and set BIOS to boot from the HDD again.

GRUB will be overwritten in step 7 and Windows boot loader will once again take control of loading your OS(s).

Bootrec.exe /FixMbr


// The /FixMbr option writes a Windows 7 or Windows Vista-compatible MBR to the system partition. This option does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove non-standard code from the MBR.

Saturday, December 3, 2011

Bootable windows 7 on usb drive

Download windows 7 usb dvd tool from link given below


http://images2.store.microsoft.com/prod/clustera/framework/w7udt/1.0/en-us/Windows7-USB-DVD-tool.exe


Run it.


browse to the source of windows 7 iso image
click next and then specify the destination drive.
it’ll ask to format, just accept everything and then proceed.
Finally your windows 7 bootable usb pendrive will be ready.