Mount CD/DVD ISO or DVD ITSELF
Type the following command to mount Fedora 12 iso image:
Sample outputs:
You need to create only 1 partition. Next format the partition:
Finally mount the partition:
Also copy the installer's initial RAM disk $DVD/images/pxeboot/initrd.img (for CentOS / RHEL Linux use $DVD/RedHat/images/pxeboot/initrd.img file) CD/DVD onto the usb drive:
syslinux is a boot loader for the Linux operating system which operates off an MS-DOS/Windows FAT filesystem.
Create grub.conf:
Edit the grub.conf file
Your USB pen is ready and should be bootable from the USB device. This can be used to install Fedora or CentOS or RHEL. You can also copy other required tools (such as sniffers or data recovery tools) on this pen. This is left as exercise for the reader.
It's very easy with Linux to create a bootable USB drive to install Windows 7 or Windows 8.
Requirements:
When you have a USB drive formatted by Windows (FAT32 or NTFS) then simply copy the Windows files that are on the DVD/ISO to the root directory of the USB drive.
To access the files on the ISO you have to mount it as loop device. You can do this with
When you want to mount the USB drive from the command line then use
with the label from step 1 (you
can place it between quotes if it contains a space, although it is not
recommended to use spaces in drive label). Save the file as grub.cfg and put it on the USB drive in the boot/grub folder.
Type the following command to mount Fedora 12 iso image:
# mount Fedora-12-x86_64-netinst.iso -o loop /media/cdrom0/
# DVD=/media/cdrom0
# ls -l $DVDSample outputs:
total 6 dr-xr-xr-x 3 root root 2048 2009-11-09 05:37 EFI drwxr-sr-x 3 root 499 2048 2009-11-09 05:37 images drwxr-sr-x 2 root 499 2048 2009-11-09 05:36 isolinuxYou need to use files stored in isolinux directory to create a bootable usb pen.
Format Usb
Create the fdisk partition:# fdisk /dev/sdbYou need to create only 1 partition. Next format the partition:
# USB=/media/usb
# mkdosfs /dev/sdb1Finally mount the partition:
# mkdir -p /media/usb
# mount /dev/sdb1 /media/usb
# USB=/media/usbCopy Required Files
Type the following commands:# cp -av $DVD/isolinux/* $USB
# cd $USB
# rm isolinux.bin boot.cat TRANS.TBL
# mv isolinux.cfg syslinux.cfg
Also copy the installer's initial RAM disk $DVD/images/pxeboot/initrd.img (for CentOS / RHEL Linux use $DVD/RedHat/images/pxeboot/initrd.img file) CD/DVD onto the usb drive:
# cp -v $DVD/images/pxeboot/initrd.img $USBUnmount the USB drive
# umount /dev/sdb1Make the USB Bootable
Type the following command to make the USB drive bootable# syslinux /dev/sdb1
# mount /dev/sdb1 $USBsyslinux is a boot loader for the Linux operating system which operates off an MS-DOS/Windows FAT filesystem.
Install Grub
Type the following command to install GRUB on the USB device:# grub-install --root-directory=$USB /dev/sdbCreate grub.conf:
# cd $USB
# mkdir -p boot/grubEdit the grub.conf file
default=0 timeout=5 root (hd1,0) title Fedora Linux kernel /vmlinuz initrd /initrd.imgFinally, unmount the USB pen drive, enter:
# umount /dev/sdb1Your USB pen is ready and should be bootable from the USB device. This can be used to install Fedora or CentOS or RHEL. You can also copy other required tools (such as sniffers or data recovery tools) on this pen. This is left as exercise for the reader.
Create a bootable Windows VISTA, 7 or Windows 8 install USB drive from ISO or DVD with Linux
It's very easy with Linux to create a bootable USB drive to install Windows 7 or Windows 8.
Requirements:
- A Windows VISTA, 7 or 8 DVD, or the ISO file (download from Microsoft).
- A USB drive with at least 4GB space to copy the Windows files on it.
- A Linux distribution. Maybe Plop Linux ;), others like Ubuntu, Fedora, Debian and so on will also work.
| Situation 1 - Partitioning and formatting is not required |
| Situation 2 - USB drive was not formatted by Windows |
Situation 1 - Partitioning and formatting is not required
When you have a USB drive formatted by Windows (FAT32 or NTFS) then simply copy the Windows files that are on the DVD/ISO to the root directory of the USB drive.
To access the files on the ISO you have to mount it as loop device. You can do this with
sudo mkdir /mnt/iso sudo mount [ISO FILE NAME] /mnt/iso -o loopCopy the files from /mnt/iso/ to the root directory of the USB drive.
When you want to mount the USB drive from the command line then use
Now, create a text file and write the following in it:
default=1
timeout=15
color_normal=light-cyan/dark-gray
menu_color_normal=black/light-cyan
menu_color_highlight=white/black
menuentry "Start Windows Installation" {
insmod ntfs
insmod search_label
search --no-floppy --set=root --label --hint hd0,msdos1
ntldr /bootmgr
}
menuentry "Boot from the first hard drive" {
insmod ntfs
insmod chain
insmod part_msdos
insmod part_gpt
set root=(hd1)
chainloader +1
boot
}
Replace 
Comments
Post a Comment