Linux: create bootable USB pen drive for installation

The server I need to install Red Hat Enterprise Linux on does not have a floppy drive or CD-rom drive, but it has a USB port. What are the steps to configure a USB pen drive to boot and install Red Hat Enterprise Linux?
To configure a USB flash/pen drive perform the following steps:

1. Format the USB flash drive as one FAT partition.

2. # mkdosfs /dev/

3. Copy the contents of /RedHat/isolinux/ from the first installation CD to the USB flash drive. NOTE: isolinux.bin, boot.cat and TRANS.TBL can be removed or deleted.

4. Rename isolinux.cfg to syslinux.cfg.

5. Copy /RedHat/images/pxeboot/initrd.img from the first installation CD to the USB flash drive.

6. OPTIONAL: To configure any boot settings, edit the syslinux.cfg on the USB flash drive. For example to configure the installation to use a kickstart file shared over NFS,specify the following:

7. # linux ks=nfs:://ks.cfg

8. Make the USB flash drive bootable. Be sure to UNMOUNT the USB flash device.

9. # umount /dev/

10. # syslinux /dev/

11. Install GRUB on the USB flash drive.

12. # mount /dev/ /path/to/local/USB/mount

13. # grub-install --root-directory=/path/to/local/USB/mount /dev/

14. Verify that the USB flash drive has a /boot/grub directory. If it does not, create the directory manually.

15. # cd /path/to/USB/local/mount

16. # mkdir -p /boot/grub

17. Create the grub.conf file. Below is a sample grub.conf:

default=0
timeout=5
root (hd1,0)
title
kernel /vmlinuz
initrd /initrd.img

18. Copy or confirm the created grub.conf file is on the /boot/grub/ directory of the USB flash drive.

Leave a Reply

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

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.