RHEL 6 Linux Bset Gude

RHEL 6 Linux  Bset Gude
Ajay Saxena

Friday 24 January, 2014

LNB Magic in RHEL6

LNB Magic in RHEL6
How to rectify LNB ;) in my way firstly tell me exactly did you know what is LNB,  Hope so you don’t know. Don’t worry I’ll tell you, actually it was my Project about how to make Bootable it. That I was trying before some days about LNB (Linux Not for Bootable) I’m just kidding some time but not abut Linux because I love it, Yah! I’m telling you, and the fact is that now I’ve make it easy in my way, because I find everywhere on net about it, and try also lots of suggestion form people but no one give there suggestion in proper way whose help somebody can perform this task easily, So After my hard tuning and give it final touch I’ve saved it. And sharing with you specially………….!!
Regards
Ajay Saxena

Follow these steps given below ------------------>>>>>                                                                                         
                                                                                                            
Follow these steps given below
root@localhost~] # fdisk –cu /dev/sdb
Command (m for help): m
[It’ll show you help]
Command (m for help): n [It’ll ask you about partition] [n for create Partition]
e extended
p primary partition
Type “p” for primary and chose partition no. (1-4) like chose “1”
(1-4): 1
And then press two time Enter for make it full space, if you want to give manually space press one time Enter and give value and then press Enter.

Command (m for help): t  [choose filesystem type in Hex value]
(1-4): 1  [Select Partition]
Hex Code (type L to list code): L [show list code of filesystem] Note: - See “b W95 FAT32”

Hex Code (type L to list code): 0B  [For choose “b W95 FAT32”] “It’s Zero & B” “not O for Operator”

Command (m for help): m  [confirmation for bootable tag code] It’s “a”
Command (m for help): a  [Choose for tag bootable]
 (1-4): 1  [Select Partition]
Command (m for help): w  [For Save & Exit from “fdisk –cu /dev/sdb” Command]
root@localhost~] # init 6   or reboot –f  [Restart for save changes]
root@localhost~] # mkfs.vfat /dev/sdb1 [Format Partition]
root@localhost~] # mkdir –p /mnt/usb  [Make new directory with name “usb” in /mnt folder]
root@localhost~] # mount /dev/sdb1 /mnt/usb [Mount “sdb1” partition in “usb” directory “/mnt/usb”]
root@localhost~] # mkdir Redhat  [Make new Directory in root’s home directory”~”]
Note: - Put Rhel6 ISO in Home Directory [/root]
root@localhost~] # mount –o loop /root/RHEL-6.0_x 86_64-bin-DVD.iso /root/Redhat  [Mount Image in Redhat folder]
Note: -Now Copy data in USB media
root@localhost~] # cp /root/Redhat/isolinux/* /mnt/usb [Copy “isolinux” folder into Redhat folder to USB media]
root@localhost~] # cp –a /root/Redhat/images/ /mnt/usb [Copy “images” folder into Redhat folder to USB media]
Error: cp failed to preserve ownership for ‘/mnt/usb/images/pxeboot/vmlinuz’: operation not permitted.
root@localhost~] # cd /mnt/usb  [Open media mount point “/mnt/usb”]
You have new mail in /var/spool/mail/root [If you wish you can check there otherwise directly to follow these steps given below.]
root@localhost usb] # ls  [Show list]
root@localhost usb] # mv isolinux.cfg syslinux.cfg  [Rename “isolinux.cfg” file]
root@localhost usb] # cd /  [Just go back]
root@localhost /] # umount /dev/sdb1  [Unmount media partition]
root@localhost /] # syslinux /dev/sdb1  [Run “syslinux” in Partition]
root@localhost /] # grub-install --root-directory=/mnt/usb /dev/sdb  [Install Grub in USB media]
Massage see here Probing devices to guess BIOS drives. This may take a long time. /dev/mapper/.. /dm-0 does not have any corresponding BIOS drive.
root@localhost /] # mount /dev/sdb1 /mnt/usb  [Mount media partition]
root@localhost /] # grub-install --root-directory=/mnt/usb /dev/sdb  [Install Grub in USB media]
Massage see here Probing devices to guess BIOS drives. This may take a long time.
Installation Finished No errors reported………….
This is the contents of the device map /mnt/usb/boot/grub/device.map
Check if this is correct or not, if there any of these lines incorrect, fix it and Re-run that “grub-install” Script again.
 (fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
root@localhost /] # vim /mnt/usb/boot/grub/grub.conf  [Open media Grub.conf file ] Press “i” for insert text.
File text start from here.
~default=0
~timeout=5
~splashimage=(hd0,0)/grub/splash.xpm.gz
~title USB (hd0,0)
~[tab] root (hd0,0)
~[tab] kernel /vmlinuz
~[tab] initrd /initrd.img
~title USB (hd1,0)
~[tab] root (hd1,0)
~[tab] kernel /vmlinuz
~[tab] initrd /initrd.img
File text “End” here, and now press “Esc” and write :wq (For Save & Exit file)
After that Put your RHEL-6 ISO in your Media
Now Enjoy Bootable USB with RHEL6……!! Thanks