Quote:
Originally Posted by DavidMcCann
On the question of having a handy CD of parted, I'd recommend your making a live CD of Insert Linux. It's a rescue distro that can run from memory, with parted and various tools for copying and editing, plus a web browser so you can get some help while you're at it.
|
Yes, ALWAYS have a way to fix things when doing something such as this. Live CDs are the best option.
Umm you could also do:
apt-get clean
that will remove anything in apt that you have already installed, apt tends to hang on to the debs. To make things a little bit easier instead of migrating everything......
## Read edit 2
Now if you don't follow instructions this could end up bad... first off install gparted
apt-get install gparted
To edit fstab you must be root or run sudo, I use this to edit my fstab:
You can use vi, gedit, or whatever you like to edit it as long as you have sudo/su privlidges.
Next.....
Also note that all the commands I list in this are all run as root, if you don't use root do sudo before EVERY command!!!
1) delete the NTFS partition and create a new ext3 partition 3G in size. Now remember what device it is, I'm going to use sdXX as an example.
For this just run gparted as root, it's pretty easy to use
2) mount the partition, move the files
Code:
umount /mnt/tmp
mount -t ext3 /dev/sdXX /mnt/tmp
cp /usr/* /mnt/tmp -R
3) Edit fstab and rename /usr:
/etc/fstab should now have a line that looks like this:
Code:
/dev/sdXX /usr ext3 defaults 0 0
After that run this:
#### If you had a /home show up in your /etc/fstab then go to FINAL STEPS
4) convert the rest of the unpartitioned space to ext3. Now remember what device it is, I'm going to use sdXX as an example again.
Again for this run gparted as root, it's still pretty simple
5) copy files
Code:
mkdir /mnt/tmp
mount -t ext3 /dev/sdXX /mnt/tmp
cp /home/* /mnt/tmp -R
6) Edit fstab and rename /home
/etc/fstab should have a new line that looks like this:
Code:
/dev/sdXX /home ext3 defaults 0 0
Now rename /home:
Code:
mv /home /home.orig
.
[FINAL STEPS]
Reboot...
After reboot take care of /var2 and /home.orig (if it applies)
Code:
rm /home.orig -R
rm /var2 -R
I'm pretty sure that should cover all of it.
In the end if you understand the gist of how all this works you can really put seperate mounts for:
Code:
/var
/usr
/home
/tmp
/home
I used to do that, but it can get annoying sometimes. Now I usually just put a 15-20G partition for / so I only have to format that when need to re-install.
[edit] removed / as an example of a new mount, that should never be changed once set. I also don't recommend getting in the habit of doing any of this =P and the only think I know you can safely do this with is /usr and /home. though I say safely as in don't mess up with the configs or on the next reboot you have a broken system type of safe
hahahaha
Err that may sound malicious, though really be cautious when doing any of this. I've done all this and more before, I've even converted my fs live from ext2 to 3, and from 3 to 4. All of this should work, just don't reboot unless you get to a spot where I say you can and follow the steps in order and to the T.