Please support VectorLinux!

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

fogpipe

  • Vectorite
  • ***
  • Posts: 105
Moving / to a new partition
« on: April 30, 2011, 06: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 :)

uelsk8s

  • Administrator
  • Vectorian
  • *****
  • Posts: 2504
Re: Moving / to a new partition
« Reply #1 on: April 30, 2011, 06: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

fogpipe

  • Vectorite
  • ***
  • Posts: 105
Re: Moving / to a new partition
« Reply #2 on: April 30, 2011, 07: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