Product SiteDocumentation Site

21.2.3. Your computer dual-boots Fedora and a different Linux distribution

Because of the differences between the many different Linux distributions, these instructions are a general guide only. Specific details vary according to he configuration of your particular system and the Linux distribution that dual-boots with Fedora.
  1. 手順21.1 Remove Fedora partitions
    1. Boot your Fedora installation.
    2. As root or with sudo, run mount. Note the partitions that are mounted. In particular, note the partition that is mounted as the root of the filesystem. The output of mount on a system where the root of the filesystem is on a standard partition such as /dev/sda2 might resemble:
      /dev/sda2 on / type ext4 (rw)
      proc on /proc type proc (rw)
      sysfs on /sys type sysfs (rw)
      devpts on /dev/pts type devpts (rw,gid=5,mode=620)
      tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
      /dev/sda1 on /boot type ext4 (rw)
      none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
      sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
      The output of mount on a system where the root of the filesystem is on a logical volume might resemble:
      /dev/mapper/VolGroup00-LogVol00 on / type ext4 (rw)
      proc on /proc type proc (rw)
      sysfs on /sys type sysfs (rw)
      devpts on /dev/pts type devpts (rw,gid=5,mode=620)
      tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
      /dev/sda1 on /boot type ext4 (rw)
      none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
      sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
    3. Ensure that any data on this system that you still require is backed up to another system or storage location.
    4. Shut down the system and boot the Linux distribution that you want to keep on the system.
    5. As root or with sudo, run mount. If any of the partitions that you previously noted as used for Fedora are mounted, review the contents of these partitions. If you no longer require the contents of these partitions, unmount them with the umount command.
    6. Remove any unwanted and unnecessary partitions, for example, with fdisk for standard partitions, or lvremove and vgremove to remove logical volumes and volume groups.
  2. Remove Fedora entries from your bootloader

    例としてのみ

    These instructions assume that your system uses the GRUB bootloader. If you use a different bootloader (such as LILO) consult the documentation for that software to identify and remove Fedora entries from its list of boot targets and to ensure that your default operating system is correctly specified.
    1. コマンドラインで su - と 入力し、Enter を押します。 システムが root パスワードを催促するとそのパスワードを入力して Enter を押します。
    2. Type gedit etc/grub.d/10_linux and press Enter. This opens the 10_linux file in the gedit text editor.
    3. A typical Fedora entry in the 10_linux file consists of four lines:
      例21.1 Example Fedora entry in 10_linux
      menuentry "Fedora (2.6.32.130.el6.i686)"
      set root=(hd0,1)
      linux /vmlinuz-2.6.32.130.el6.i686 ro root=UUID=04a07c13-e6bf-6d5a-b207-002689545705 rhgb quiet
      initrd /initrd-2.6.32.130.el6.i686.img

      Depending on the configuration of your system, there may be multiple Fedora entries in 10_linux, each corresponding to a different version of the Linux kernel. Delete each of the Fedora entries from these files
      Save the updated 10_linux file and close gedit.
    4. Type gedit etc/default/grub and press Enter.
    5. The file etc/default/grub contains a line that specifies the default operating system to boot, in the format default=N where N is a number equal to or greater than 0. If N is set to 0, GRUB will boot the first operating system in the list. If N is set to 1, it will boot the second operating system, and so forth. Alternatively, the default value can be the full menu entry.
      デフォルトで GRUB にブートさせたいオペレーティングシステムの エントリを判定して、一覧内でのその順序を確認します。
      default= 行が、一覧内の選択したデフォルトオペレーティングシステムの 順序数値より 1つ少ない 数値を含んでいることを確認します。
      Save the updated grub file and close gedit. If you have Fedora entries in the other script files in the /etc/grub.d directory, use this procedure to remove them in the same way.
  3. オペレーティングシステムに利用可能な領域を作る

    注記

    This step is not required to remove Fedora from your computer. However, if you skip this step, you will leave part of your hard drive's storage capacity unusable by your other Linux operating system. Depending on your configuration, this might be a a significant portion of the storage capacity of the drive.

    注記

    この手順を実行するには、Fedora Live CD や Knoppix DVD などのLinux ディストリビューションのライブメディアが必要になります。
    The method to make the space freed by removing the Fedora partitions available to your other Linux operating system differs, depending on whether your chosen operating system is installed on disk partitions configured to use Logical Volume Management (LVM) or not.
    • LVM を使用しない場合
      1. Boot your computer from Linux live media, and install parted if it is not already present.
      2. As root or with sudo, run parted disk, where disk is the device name of the disk that contains a partition that you want to resize, for example, /dev/sda.
      3. At the (parted) prompt, enter print. The parted tool displays information about the partitions on your system, including their partition numbers, their sizes, and their positions on the disk.
      4. At the (parted) prompt, enter resize number start end, where number is the partition number, start is the location on the disk at which the partition begins, and end is the location on the disk at which you want the partition to end. Use the start position that you previously obtained with the print command, and refer to the parted documentation for different ways to specify the end parameter.
      5. When parted finishes resizing the partition, enter quit at the (parted) prompt.
      6. Run e2fsck partition, where partition is the partition that you just resized. For example, if you just resized /dev/sda3, enter e2fsck /dev/sda3.
        Linux はここで、新しくサイズ変更されたパーティションのファイルシステムをチェックします。
      7. When the file system check finishes, type resize2fs partition at a command line and press Enter, where partition is the partition that you just resized. For example, if you just resized /dev/sda3, type resize2fs /dev/sda3.
        Linux はここで、使用中のファイルシステムをサイズ変更して新しくサイズ変更になったパーティションを 満杯にします。
      8. Restart your computer. The extra space is now available to your Linux installation.
    • LVM を使用する場合
      1. Boot your computer from Linux live media and install fdisk and lvm2 if they are not already present.
      2. ディスク上の空き領域に新規パーティションを作成
        1. As root or with sudo, run fdisk disk, where disk is the device name of the disk where you want to create new space, for example, /dev/sda.
        2. At the prompt Command (m for help):, enter n to create a new partition. Refer to the fdisk documentation for options.
      3. パーティションタイプ識別子の変更
        1. At the prompt Command (m for help):, enter t to change a partition type.
        2. Partition number (1-4): プロンプトで、作成したパーティションの 番号を入力します。例えば、/dev/sda3 と言うパーティションを作成 した場合、数値 3 を入力して Enter を押します。 これで fdisk が変更すべきパーティションタイプを識別します。
        3. At the prompt Hex code (type L to list codes):, enter 8e to create a Linux LVM partition.
        4. At the prompt Command (m for help):, enter w to write the changes to disk and exit fdisk.
      4. ボリュームグループの拡張
        1. コマンドプロンプトで、lvm と入力して Enter を押すことで lvm2 ツールを開始します。
        2. At the lvm> prompt, type pvcreate partition and press Enter, where partition is the partition that you recently created. For example, pvcreate /dev/sda3. This creates /dev/sda3 as a physical volume in LVM.
        3. At the lvm> prompt, type vgextend VolumeGroup partition and press Enter, where VolumeGroup is the LVM volume group on which Linux is installed and partition is the partition that you recently created. For example, if Linux is installed on /dev/VolumeGroup00, you would type vgextend /dev/VolumeGroup00 /dev/sda3 to extend that volume group to include the physical volume at /dev/sda3.
        4. At the lvm> prompt, type lvextend -l +100%FREE LogVol and press Enter, where LogVol is the logical volume that contains your Linux filesystem. For example, to extend LogVol00 to fill the newly-available space in its volume group, VolGroup00, type lvextend -l +100%FREE /dev/VolGroup00/LogVol00.
        5. At the lvm> prompt, type exit and press Enter to exit lvm2
      5. コマンドラインで e2fsck LogVol と 入力して、Enter を押します。ここで LogVol はサイズ変更した論理ボリュームです。例えば、/dev/VolumeGroup00/LogVol00 を サイズ変更した場合は、 e2fsck /dev/VolumeGroup00/LogVol00 と 入力します。
        Linux はここで、新規にサイズ変更になった論理ボリュームのファイルシステムを チェックします。
      6. ファイルシステムのチェックが終了したら、コマンドラインで resize2fs LogVol を入力して、Enterを 押します。ここで、LogVol は先ほどサイズ変更したパーティションです。 例えば、/dev/VolumeGroup00/LogVol00 をサイズ変更した場合、 resize2fs /dev/VolumeGroup00/LogVol00 と入力します。
        Linux はここで、ファイルシステムのサイズを変更してサイズ変更になった新規論理ボリュームを 満杯にします。
      7. Restart your computer. The extra space is now available to your Linux installation.