How to Add a Partition to Root on Slackware
- 1). Log in to the computer as user "root." Create a new, empty filesystem on the fresh hard disk partition by typing the following command:
mke2fs /dev/sdb1
Replace "/dev/sdb1" by the special device file for the partition you want to use in your system. Press "Enter." - 2). Mount the new filesystem at a temporary location. Copy the current contents of the region under "/" with a capacity you want to expand, by typing the following commands:
cd /tmp
mkdir tempMount
mount /dev/sdb1 tempMount
cp -R /usr/local tempMount
Replace "/usr/local" with the current path to the region you want to move to the new filesystem. Press "Enter" after each line. Wait until the copy completes, which can take a long time, depending on the amount of data under "/usr/local." - 3). Delete the data in the original root filesystem, then replace it by the same data copied to the new partition by typing the following commands:
umount tempMount
cd /usr/local
rm -rf *
cd ..
mount /dev/sdb1 local
Press "Enter" after each line. At that point, the new filesystem on the partition you added is ready for Slackware to use for new programs and data.