このコンテンツは選択した言語では利用できません。

Chapter 7. Boot Devices


Automated installation (or kickstart) is an essential part of efficient system provisioning. This chapter describes how to prepare different types of boot media for use with kickstarting clients.
For more detailed information on using kickstart for provisioning, see the RHN Satellite Getting Started Guide.
Before beginning, locate the standard Red Hat Enterprise Linux CD boot image boot.iso. You will need to create work directories for different boot images, and populate them with the necessary boot files. Switch to the root user, and enter the following commands:
mkdir -p temp cd/isolinux pxe/pxelinux.cfg usb/extlinux usb/temp
mount -o loop boot.iso temp
cp -aP temp/isolinux/* cd/isolinux/
cp -aP temp/isolinux/* pxe/
cp -aP temp/isolinux/* usb/extlinux/
umount temp
chmod -R u+rw cd pxe usb
Copy to Clipboard Toggle word wrap

Procedure 7.1. CD Boot Media

Note

The backslash "\" is used below to represent a continuation of one line at the shell prompt.
  1. Change to the ./cd directory:
    cd ./cd
    
    Copy to Clipboard Toggle word wrap
  2. Copy the /usr/lib/syslinux/menu.c32 file to the CD:
    cp -p /usr/lib/syslinux/menu.c32 isolinux
    
    Copy to Clipboard Toggle word wrap
  3. Open the isolinux/isolinux.cfg file in your preferred text editor, and add the following line:
    mkisofs -o ./custom-boot.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot \
      -boot-load-size 4 -boot-info-table -J -l -r -T -v -V "Custom RHEL Boot" .
    
    Copy to Clipboard Toggle word wrap
  4. Customize any boot parameters and targets in isolinux.cfg as needed for CD booting.
  5. Burn the details to the CD to complete the procedure.

Procedure 7.2. PXE Boot

  1. Change to the /pxe directory:
    cd ./pxe
    
    Copy to Clipboard Toggle word wrap
  2. Copy the /usr/lib/syslinux/menu.c32 file to the /pxe directory:
    cp -p /usr/lib/syslinux/menu.c32 .
    
    Copy to Clipboard Toggle word wrap
  3. Move the isolinux.cfg file to pxelinux.cfg/default:
    mv isolinux.cfg pxelinux.cfg/default
    
    Copy to Clipboard Toggle word wrap
  4. Remove the temporary files:
    rm -f isolinux.bin TRANS.TBL
    
    Copy to Clipboard Toggle word wrap
  5. Copy the /usr/lib/syslinux/pxelinux.0 file to the /pxe directory:
    cp -p /usr/lib/syslinux/pxelinux.0 .
    
    Copy to Clipboard Toggle word wrap
  6. Open the pxelinux.cfg/default file in your preferred text editor, and customize any boot parameters and targets as needed for PXE booting.

Procedure 7.3. USB Boot Media

Warning

Be extremely careful when carrying out these command as root (required for most critical parts). These commands access device files and using them incorrectly could irrecoverably damage your system. The example below uses /dev/loop0 for mounting, make sure you use the correct device for your system. You can check which is the correct device using the losetup -f command.
  1. Change to the /usb directory:
    cd ./usb
    
    Copy to Clipboard Toggle word wrap
  2. Copy the /usr/lib/syslinux/menu.c32 file to the extlinux/ directory:
    cp -p /usr/lib/syslinux/menu.c32 extlinux/
    
    Copy to Clipboard Toggle word wrap
  3. Move the extlinux/isolinux.cfg file to extlinux/extlinux.conf:
    mv extlinux/isolinux.cfg extlinux/extlinux.conf
    
    Copy to Clipboard Toggle word wrap
  4. Remove the temporary files:
    rm -f extlinux/isolinux.bin extlinux/TRANS.TBL
    
    Copy to Clipboard Toggle word wrap
  5. Convert the custom-boot.img file and copy it:
    dd if=/dev/zero of=./custom-boot.img bs=1024 count=30000
    
    Copy to Clipboard Toggle word wrap
  6. Discover the correct mounting location for the loopback device:
    losetup -f
    /dev/loop0
    
    Copy to Clipboard Toggle word wrap
    Set up the loopback device with the boot image:
    losetup /dev/loop0 ./custom-boot.img
    
    Copy to Clipboard Toggle word wrap
  7. Open the fdisk utility:
    fdisk /dev/loop0
    
    Copy to Clipboard Toggle word wrap
    Create one primary bootable partition on the device. This can be done by using the following key press combination: n p 1 Enter Enter a 1 p w
  8. Copy the master boot record (MBR) to the loopback device:
    dd if=/usr/lib/syslinux/mbr.bin of=/dev/loop0
    
    Copy to Clipboard Toggle word wrap
  9. Add partition maps to the loopback device:
    kpartx -av /dev/loop0
    
    Copy to Clipboard Toggle word wrap
  10. Create the file system:
    mkfs.ext2 -m 0 -L "Custom RHEL Boot" /dev/mapper/loop0p1
    
    Copy to Clipboard Toggle word wrap
  11. Mount the device:
    mount /dev/mapper/loop0p1 temp
    
    Copy to Clipboard Toggle word wrap
  12. Delete temporary files:
    rm -rf temp/lost+found
    
    Copy to Clipboard Toggle word wrap
  13. Copy the extlinux/ directory to a temporary location:
    cp -a extlinux/* temp/
    
    Copy to Clipboard Toggle word wrap
  14. Install the bootloader in the temporary location:
    extlinux temp
    
    Copy to Clipboard Toggle word wrap
  15. Unmount the temporary location:
    umount temp
    
    Copy to Clipboard Toggle word wrap
  16. Delete the partition maps on the loopback device:
    kpartx -dv /dev/loop0
    
    Copy to Clipboard Toggle word wrap
  17. Delete the loopback device:
    losetup -d /dev/loop0
    
    Copy to Clipboard Toggle word wrap
    Synchronize the file system changes:
    sync
    
    Copy to Clipboard Toggle word wrap
  18. Open the extlinux.conf file in your preferred text editor, and customize any boot parameters and targets as needed for USB booting.
  19. Transfer the image to a USB device to complete the procedure. Insert the device, and run the dmesg command to check the mounting location. In this example, it is /dev/sdb.
    Unmount the USB device:
    umount /dev/sdb
    
    Copy to Clipboard Toggle word wrap
    Copy the image to the USB device:
    dd if=./custom-boot.img of=/dev/sdb
    
    Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat