diff options
author | Pete Travis <immanetize@fedoraproject.org> | 2013-07-28 18:52:58 -0600 |
---|---|---|
committer | Pete Travis <immanetize@fedoraproject.org> | 2013-07-28 18:52:58 -0600 |
commit | f4173ce55d61d7f3b531341d12843b26436b6f32 (patch) | |
tree | ae34457c0b8c940188874574437104ed773fdaee /en-US | |
parent | 87df7d543a7c407e5e440038976719f2f570556f (diff) | |
download | multiboot-guide-f4173ce55d61d7f3b531341d12843b26436b6f32.tar.gz multiboot-guide-f4173ce55d61d7f3b531341d12843b26436b6f32.tar.xz multiboot-guide-f4173ce55d61d7f3b531341d12843b26436b6f32.zip |
Added instructions for resizing an ntfs filesystem and the partition it lives on.
Diffstat (limited to 'en-US')
-rw-r--r-- | en-US/Free_Space.xml | 251 | ||||
-rw-r--r-- | en-US/UEFI_boot-apple.xml | 10 | ||||
-rw-r--r-- | en-US/UEFI_boot-general.xml | 10 | ||||
-rw-r--r-- | en-US/UEFI_boot-win.xml | 10 | ||||
-rw-r--r-- | en-US/UEFI_boot.xml | 20 |
5 files changed, 249 insertions, 52 deletions
diff --git a/en-US/Free_Space.xml b/en-US/Free_Space.xml index b70988a..54c6f02 100644 --- a/en-US/Free_Space.xml +++ b/en-US/Free_Space.xml @@ -5,6 +5,253 @@ ]> <section id="freespace"> - <title>Free Space</title> - <para /> + <title>Making Room for Fedora</title> + <para> + Fedora requires a volume of <emphasis>unallocated</emphasis> storage space for installation. To make room for Fedora, both the existing filesystem and the partition it resides on must be resized + </para> + <section id="freespace-anaconda"> + <title>Using the Fedora Installer to resize partitions</title> + <para>http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/reclaim_space-x86.html + </para> +<!-- "An introduction to Disk Partitions" +http://docs.fedoraproject.org/en-US/Fedora/19/html/Installation_Guide/ch-partitions-x86.html +--> + </section> + + <section> + <title>Resizing an NTFS filesystem the command line</title> + <para> + This section explains using tools provided by Fedora to resize an NTFS partition. A terminal window from a liveCD can be used. + </para> + <procedure> + <title> + Selecting and resizing a partition. + </title> + <step> + <para> + Show available filesystems: + <screen> +# <command>blkid</command> +/dev/sda1: SEC_TYPE="msdos" UUID="32AE-E651" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="0315942d-8c2c-414f-a560-cfa499494a72" +/dev/sda2: UUID="593153ae-2b67-4a5b-9efa-fa3954953abd" TYPE="ext4" PARTUUID="68cadad8-6de2-4ef7-96ff-f58e5114fdcc" +/dev/sda3: UUID="P2xKTQ-aQWG-z2Uv-jSw5-kkUK-SN5Q-cNf3PI" TYPE="LVM2_member" PARTUUID="7ba7ed40-b43f-4e71-b83e-51629bf7db47" +/dev/sda5: UUID="44B6BAD1B6BAC2AA" TYPE="ntfs" PARTUUID="9c62d1dc-dedd-4d4c-9728-5f2ef69f2b42" + </screen> + </para> + </step> + + <step> + <para> + <systemitem class="filesystem">ntfs</systemitem> partitions indicate the existing Windows installation. Examine the partitions on the <filename>/dev/sda</filename> drive. + <screen> +# <command>parted /dev/sda print</command> +Model: ATA ST9320328CS (scsi) +Disk /dev/sda: 320GB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: pmbr_boot + +Number Start End Size File system Name Flags + 1 1049kB 211MB 210MB fat16 EFI System Partition boot + 2 211MB 735MB 524MB ext4 + 3 735MB 119GB 118GB + 4 119GB 119GB 134MB Microsoft reserved partition msftres + 5 119GB 215GB 96.2GB ntfs + </screen> + </para> + </step> + + <step> + <para> + Partition number 5 is a large filesystem, and probably has some free space to share. Check how much of that space is in use. + <screen> +# <command>ntfsresize --info /dev/sda5</command> +ntfsresize v2013.1.13 (libntfs-3g) +Device name : /dev/sda5 +NTFS volume version: 3.1 +Cluster size : 4096 bytes +Current volume size: 96234107392 bytes (96235 MB) +Current device size: 96234110976 bytes (96235 MB) +Checking filesystem consistency ... +100.00 percent completed +Accounting clusters ... +Space in use : 29222 MB (30.4%) +Collecting resizing constraints ... +You might resize at 29221265408 bytes or 29222 MB (freeing 67013 MB). +Please make a test run using both the -n and -s options before real resizing! + </screen> + </para> + </step> + <step> + <para> + Resize the filesystem. Make sure to balance the available space, a very full filesystem can cause problems for any operating system. + <screen> +# <command>ntfsresize --size 40G /dev/sda5</command> +ntfsresize v2013.1.13 (libntfs-3g) +Device name : /dev/sda5 +NTFS volume version: 3.1 +Cluster size : 4096 bytes +Current volume size: 96234107392 bytes (96235 MB) +Current device size: 96234110976 bytes (96235 MB) +New volume size : 39999996416 bytes (40000 MB) +Checking filesystem consistency ... +100.00 percent completed +Accounting clusters ... +Space in use : 29222 MB (30.4%) +Collecting resizing constraints ... +Needed relocations : 0 (0 MB) +WARNING: Every sanity check passed and only the dangerous operations left. +Make sure that important data has been backed up! Power outage or computer +crash may result major data loss! +Are you sure you want to proceed (y/[n])? y +Schedule chkdsk for NTFS consistency check at Windows boot time ... +Resetting $LogFile ... (this might take a while) +Updating $BadClust file ... +Updating $Bitmap file ... +Updating Boot record ... +Syncing device ... +Successfully resized NTFS on device '/dev/sda5'. +You can go on to shrink the device for example with Linux fdisk. +IMPORTANT: When recreating the partition, make sure that you + 1) create it at the same disk sector (use sector as the unit!) + 2) create it with the same partition type (usually 7, HPFS/NTFS) + 3) do not make it smaller than the new NTFS filesystem size + 4) set the bootable flag for the partition if it existed before +Otherwise you won't be able to access NTFS or can't boot from the disk! +If you make a mistake and don't have a partition table backup then you +can recover the partition table by TestDisk or Parted's rescue mode. + </screen> + </para> + </step> + </procedure> + + <procedure> + <title>Resizing the partition</title> + <step> + <para> + To make sure that the partition is recreated accurately, work using sectors as units instead of bytes. The first figure we need is the sector the filesystem starts on. + <screen> +# <command>parted /dev/sda unit s print</command> +Model: ATA ST9320328CS (scsi) +Disk /dev/sda: 625142448s +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: pmbr_boot + +Number Start End Size File system Name Flags + 1 2048s 411647s 409600s fat16 EFI System Partition boot + 2 411648s 1435647s 1024000s ext4 + 3 1435648s 232122367s 230686720s + 4 232122368s 232384511s 262144s Microsoft reserved partition msftres + 5 232384512s 420341759s 187957248s ntfs + 6 420341760s 420343807s 2048s bios_grub + 7 420343808s 421367807s 1024000s ext4 + 8 421367808s 625141759s 203773952s + </screen> + </para> + <para> + The partition starts on sector <literal>232384512</literal>, and the sector size is <literal>512 bytles</literal> + </para> + </step> + <step> + <para> + Calculate the size of the filesystem in sectors, and the end of the new partition + <itemizedlist> + <listitem> + <para> + After resizing, the filesystem is marked as <emphasis>dirty</emphasis> so it will be checked on the next Windows boot. Clear this flag so that we can run further commands. + <screen> +# <command>ntfsfix -d /dev/sda5</command> +Mounting volume... OK +Processing of $MFT and $MFTMirr completed successfully. +Checking the alternate boot sector... OK +NTFS volume version is 3.1. +NTFS partition /dev/sda5 was processed successfully. + </screen> + </para> + </listitem> + <listitem> + <para>Find the cluster size and number of clusters. + <screen> +# <command>ntfsinfo -m /dev/sda5|grep Cluster</command> + Cluster Size: 4096 + Volume Size in Clusters: 9765624 + Compression Block Clusters: 0 + Free Clusters: 2631945 (27.0%) + </screen> + </para> + </listitem> + <listitem> + <para> + Calculate the size in sectors of the new filesystem. + <equation> + <title>Filesystem size in sectors</title> + <mathphrase> + 4096 bytes per cluster × 9765624 total clusters ÷ 512 bytes per sector = 78124992 sectors + </mathphrase> + </equation> + </para> + </listitem> + <listitem> + <para> + Find the end of the new partition. + <equation> + <title>End sector of new partition</title> + <mathphrase> + 232384512 start + 78124992 filesystem = 310509504 end sector + </mathphrase> + </equation> + </para> + </listitem> + </itemizedlist> + </para> + </step> + + <step> + <para> + The <systemitem class="filesystem">ntfs</systemitem> filesystems on the <filename>/dev/sda</filename>. Using the <literal>s</literal> after the number ensures <command>parted</command> uses sectors as the unit. + <screen> + <command># parted /dev/sda</command> +GNU Parted 3.1 +Using /dev/sda +Welcome to GNU Parted! Type 'help' to view a list of commands. +(parted) +(parted) rm 5 +(parted) mkpart +Partition name? []? windowsdisk +File system type? [ext2]? ntfs +Start? 232384512s +End? 310509504s +(parted) quit + </screen> + </para> + </step> + <step> + <para> + Check the partition table to confirm the free space is available, and exit <command>parted</command>. + <screen> +(parted) print free +Model: ATA ST9320328CS (scsi) +Disk /dev/sda: 320GB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: pmbr_boot + +Number Start End Size File system Name Flags + 17.4kB 1049kB 1031kB Free Space + 1 1049kB 211MB 210MB fat16 EFI System Partition boot + 2 211MB 735MB 524MB ext4 + 3 735MB 119GB 118GB + 4 119GB 119GB 134MB Microsoft reserved partition msftres + 5 119GB 159GB 40.0GB ntfs + 159GB 215GB 56.2GB Free Space + +(parted) quit + </screen> + </para> + </step> + </procedure> + </section> + </section> + diff --git a/en-US/UEFI_boot-apple.xml b/en-US/UEFI_boot-apple.xml deleted file mode 100644 index d3d8cd6..0000000 --- a/en-US/UEFI_boot-apple.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version='1.0' encoding='utf-8' ?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ -<!ENTITY % BOOK_ENTITIES SYSTEM "Fedora_Multiboot_Guide.ent"> -%BOOK_ENTITIES; - -]> -<section id="multiboot-UEFI-apple"> - <title>Booting on Apple systems</title> - <para /> -</section> diff --git a/en-US/UEFI_boot-general.xml b/en-US/UEFI_boot-general.xml deleted file mode 100644 index 6d82169..0000000 --- a/en-US/UEFI_boot-general.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version='1.0' encoding='utf-8' ?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ -<!ENTITY % BOOK_ENTITIES SYSTEM "Fedora_Multiboot_Guide.ent"> -%BOOK_ENTITIES; - -]> -<section id="multiboot-UEFI-general"> - <title>UEFI Basics</title> - <para /> -</section> diff --git a/en-US/UEFI_boot-win.xml b/en-US/UEFI_boot-win.xml deleted file mode 100644 index 6b2477e..0000000 --- a/en-US/UEFI_boot-win.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version='1.0' encoding='utf-8' ?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ -<!ENTITY % BOOK_ENTITIES SYSTEM "Fedora_Multiboot_Guide.ent"> -%BOOK_ENTITIES; - -]> -<section id="multiboot-UEFI-win"> - <title>Booting with Windows</title> - <para /> -</section> diff --git a/en-US/UEFI_boot.xml b/en-US/UEFI_boot.xml deleted file mode 100644 index 1ad4397..0000000 --- a/en-US/UEFI_boot.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version='1.0' encoding='utf-8' ?> -<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ -<!ENTITY % BOOK_ENTITIES SYSTEM "Fedora_Multiboot_Guide.ent"> -%BOOK_ENTITIES; - -]> -<section id="multiboot-UEFI"> - <title>Multiboot on UEFI Systems</title> - <para /> - - <!-- General UEFI stuff; where grub lives, `uefibootmgr`, etc --> - <xi:include href="UEFI_boot-general.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> - - <!-- Booting with windows --> - <xi:include href="UEFI_boot-win.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> - - <!-- Booting on Apple systems --> - <xi:include href="UEFI_boot-apple.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> - -</section> |