Hi
Is it possible to switch 2 linux ext3 partitions between them? this is the scenario:
I have 4 partitions on a disk:
Code:
[root@vaiogpg ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 83 Linux
/dev/sda2 2551 4375 14659312+ 83 Linux
/dev/sda3 4376 9482 41021977+ 83 Linux
/dev/sda4 9483 9729 1984027+ 82 Linux swap / Solaris
I have FC5 installed on /dev/sda1 (20Gb), nothing on /dev/sda2 (15Gb) and some data on /dev/sda3 (40Gb). Now I'd like to change /dev/sda1 to became /dev/sda2 (and /dev/sda2 became /dev/sda1), this way I'll have FC5 installed on /dev/sda2 and /dev/sda1 should be blank.
What I want to do is to keep every data and config on my currently running FC5 but moved to /dev/sda2 (even if I can recreate both partitions to set the correct sizes as they are different (/dev/sda1 should have 15Gb and /dev/sda2 should have 20Gb)). Of course I have to be able to boot FC5 (now in /dev/sda2) using a boot loader (grub).
Is this possible or do I have to reinstall the whole system? If possible, which is the best approach?
Some more info:
Code:
[root@vaiogpg ~]# cat /etc/fstab
LABEL=/1 / ext3 defaults 1 1
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/sda3 /varios ext3 defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
###LABEL=SWAP-sda4 swap swap defaults 0 0
/dev/sda4 swap swap defaults 0 0
Many thanks
Regards
Blas