Resizing the system partition with parted magic live cd
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
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.
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.
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.