Link to home
Start Free TrialLog in
Avatar of fario
farioFlag for Italy

asked on

Need to move the swap partition to another disk

My ubuntu installation and swap file are on the same disk (160.0 GB).

I would like to move the swap file on the little disk /dev/sda
Thank you for your help

linux@linux-desktop:~$ sudo fdisk -l
[sudo] password for linux:

Disco /dev/sda: 40.0 GB, 40020664320 byte
240 testine, 63 settori/tracce, 5169 cilindri
Unità = cilindri di 15120 * 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x28f128f0

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        5169    39077608+   7  HPFS/NTFS

Disco /dev/sdb: 160.0 GB, 160041885696 byte
255 testine, 63 settori/tracce, 19457 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x6540b330

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       17643   141717366    7  HPFS/NTFS
/dev/sdb2           17644       19458    14569473    5  Esteso
La partizione 2 non termina al limite del cilindro.
/dev/sdb5           17644       19376    13911040   83  Linux
/dev/sdb6           19376       19458      657408   82  Linux swap / Solaris
ASKER CERTIFIED SOLUTION
Avatar of arpitsud
arpitsud

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fario

ASKER

So the first step is to shrink the /dev/sda partition to create unallocated free space (i don't want to delete existing partition) ?
That's not a linux boot partition but it is the XP boot disk; Linux is on /dev/sdb

i have grub2 at boot. do you think that changing the partitions setup will compromise my system ?