Resizing the system partition with parted magic live cd

From NAS-Central Buffalo - The Linkstation Wiki
Revision as of 20:44, 9 September 2007 by Mindbender (Talk | contribs) (Recommendations)

Jump to: navigation, search


About

If you installed any custom firmware of your choice you might soon run into some problems because you do not have enough space on your system partition. This article shows how it is possible to change the partitions with the Parted Magic Linux Live CD.

Things to know

Recommendations

I recommend to disconnect all hdds from your computer and only connect the hdd you want to repartition. Then nothing can harm your normal Windows/Linux/MacOS installations on your normal HDDs.
The advantage of doing this + being a LS Live/LS Pro user is that you can directly follow my article without rethinking as i had only the LS-HDD connected as well....the devicename /dev/sda will be the same on your system. In case you have other hdds connected make sure you are messing with the right one.

PPC/MIPSel based boxes

The system partition /dev/sda1 cannot be mounted easily because of the ext2_magic_superblock-issue.....you need to correct this first by downloading fix_ext2_magic and make the partition mountable.
Read here how to do this: Fix_ext2_magic.

After fixing the ext2_magic superblock on the system partition it should be possible to repartition your box. In contrast to the arm9-boxes it should even be possible to repartition the hdd without loosing the data on the data-partition (/dev/hda3) as ext2/ext3 is directly resizable via GParted.

As this article was written for repartitioning of the arm9-hdds notice that you want to apply this steps instead:

  • Decrease /dev/hda3 in size at the beginning
  • Move /dev/hda2 (swap) to the right
  • Increase /dev/hda1 in size


If you use ext3 then it should be possible to decrease /dev/hda3 in size...and you do not even need to delete /dev/hda3...which means all your data should be there afterwards. Backups are still recommended to have.

The concept is the same as outlined here.

ARM9 based boxes

All data on the data partition(s) will be lost

As it is not possible to shrink XFS partitions the only way to make them smaller is to delete and recreate them. So make sure you have a backup of the data and don`t blame me because you did not read this carefully.

Terastation Pro v2, Terastation Live

I haven`t tested this, but i think you can repartition in the same way. you will have to do exactly the same partition layout on all hdds.

General Procedure

I have done this with a Linkstation Live (arm9) with an 500 GB HDD. I wanted to resize the system partition from ~ 480 MB to 3072 MB ~ 3 GB. This is what i did....

The first thing anyone should do is to look into the manual.

We need to open a shell (there is a button at the bottom right) and load the XFS kernel module.


Done. now we start the Partition Manager GParted. It is the first Icon on the bottom right.


There we see the current partition layout. The first thing to do is to delete the big XFS data partition /dev/sda6 so we have space for making the other things bigger.


Now we need to move the Swap partition a little to the right so we can make the logical partition /dev/sda4 smaller.

I moved it 2585 MBs to the right because 2585 + 485 are aproximately 3 GB.


Now we resize /dev/sda4 which is the container for the logical partitions for swap and the data.


We cut off 2585 at the beginning of /dev/sda4


Now there is a gap bewteen /dev/sda2 and /dev/sda4...we can make /dev/sda2 bigger now.


I dragged the right arrow to the complete right...this is how it looked before...


and thats how afterwards.


Last thing to do is to recreate the data partition.


Use the FS of your choice. Note that you need to change /etc/fstab on the system partition later to automount the new FS if you changed it to something else.


Apply everything.


Swap gets moved...


The system partition gets resized....


I was too slow to create a screenshot for the /dev/sda6 recreation step. A report is presented to you. Do not wonder about the 4 warnings...they are related to XFS. Parted_Magic does not have the utils for checking the Filesystem inside.


Thats how the LS Live`s partition table looked in the end.


FreeLink was installed before. I just put the hdd inside the LS Live again, powered it up..and it booted directly. Here is the proof that everything worked.



Good Luck!
{"cc_re__cc_re__cc_by_sa_3_0": ["artition_with_parted_magic_live_cd&amp;oldid=14182\" title=\"Permanent link to this revision of the page\">Permanent link</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"t-info\"><a href=\"/w/index.php?title=Resizing_the_system_partition_with_parted_magic_live_cd&amp;action=info\">Page information</a></li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t</div>\n\t\t\t</div><!-- end of the left (by default at least) column -->\n\t\t<div class=\"visualClear\"></div>\n\t\t\t\t\t<div id=\"footer\" role=\"contentinfo\">\n\t\t\t\t\t\t<div id=\"f-copyrightico\">\n\t\t\t\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"f-poweredbyico\">\n\t\t\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/resources/assets/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<ul id=\"f-list\">\n\t\t\t\t\t\t\t\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/lic", "co\">\n\t\t\t\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"http://i.creativecommons.org/l/by-sa/3.0/88x31.png\" alt=\"Attribution-Share Alike 3.0 Unported\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\"f-poweredbyico\">\n\t\t\t\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/w/resources/assets/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t<ul id=\"f-list\">\n\t\t\t\t\t\t\t\t\t<li id=\"copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">Attribution-Share Alike 3.0 Unported</a> unless otherwise noted.</li>\n\t\t\t\t\t\t\t\t\t<li id=\"privacy\"><a href=\"/wiki/Http://www.nas-central.org/privacy-policy\" title=\"Http://www.nas-central.org/privacy-policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t<li id=\"about\"><a href=\"/wiki/NAS-Central_Buffalo_-_The_Linkstation_Wiki:About\" title=\"NAS-Central Buffalo - The Linkstation Wiki:About\">About NAS-Central Buffalo - The Linkstation Wiki</a></li>\n\t\t\t\t\t\t\t\t\t<li id=\"disclaimer\"><a href=\"http://www.nas-central.org/ind"], "copyright__copyright__copyright": ["", "partition gets resized....\n\n\nI was too slow to create a screenshot for the /dev/sda6 recreation step. A report is presented to you. Do not wonder about the 4 warnings...they are related to XFS. Parted_Magic does not have the utils for checking the Filesystem inside.\n\n\nThats how the LS Live`s partition table looked in the end.\n\n\nFreeLink was installed before. I just put the hdd inside the LS Live again, powered it up..and it booted directly. Here is the proof that everything worked.\n\n\n\nGood Luck!", "partition gets resized....\n\n\nI was too slow to create a screenshot for the /dev/sda6 recreation step. A report is presented to you. Do not wonder about the 4 warnings...they are related to XFS. Parted_Magic does not have the utils for checking the Filesystem inside.\n\n\nThats how the LS Live`s partition table looked in the end.\n\n\nFreeLink was installed before. I just put the hdd inside the LS Live again, powered it up..and it booted directly. Here is the proof that everything worked.\n\n\n\nGood Luck!"]}