VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Moving / to a new partition  (Read 939 times)

fogpipe

  • Vectorite
  • ***
  • Posts: 105
Moving / to a new partition
« on: April 30, 2011, 07:14:01 pm »

I have a 30 gig partition thats doing mostly nothing so im thinking about moving / to it.

This is my plan:

mount the destination partition on /mnt/x, cp -ax / /mnt/x, edit lilo.conf and the fstab on /mnt/x/etc to reflect the changes, leaving the original / as backup, pray, reboot.

Any advice or cautions appreciated. Thanks :)
Logged

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: Moving / to a new partition
« Reply #1 on: April 30, 2011, 07:49:30 pm »

probably a better idea to do it by dir so you dont end up in a loop copying /mnt/x to itself

Code: [Select]
cp -ax /boot/ /etc/ /lib/ /sbin/ /usr/ /bin/ /home/ /opt/ /root/ /srv/ /tmp/ /var/ /mnt/x/
then you can make the other dirs

Code: [Select]
mkdir -p /mnt/x/dev /mnt/x/mnt /mnt/x/proc /mnt/x/sys
Logged

fogpipe

  • Vectorite
  • ***
  • Posts: 105
Re: Moving / to a new partition
« Reply #2 on: April 30, 2011, 08:24:54 pm »

probably a better idea to do it by dir so you dont end up in a loop copying /mnt/x to itself

Code: [Select]
cp -ax /boot/ /etc/ /lib/ /sbin/ /usr/ /bin/ /home/ /opt/ /root/ /srv/ /tmp/ /var/ /mnt/x/
then you can make the other dirs

Code: [Select]
mkdir -p /mnt/x/dev /mnt/x/mnt /mnt/x/proc /mnt/x/sys

Good point  ! i proabably would have thot about that about the same time i ran out of disk space ;D

Thank you
Logged