howtos:move-swap
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:move-swap [24/05/2008 11:14] – domingo | howtos:move-swap [02/12/2018 21:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This is a description for Ubuntu Feisty (or at least that is what has been tested). Please also note that I use uswsusp for suspend/ | ||
+ | Find the new name of the swap partition: | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | |||
+ | Disk /dev/sda: 100.0 GB, 100030242816 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = cylinders of 16065 * 512 = 8225280 bytes | ||
+ | |||
+ | | ||
+ | / | ||
+ | / | ||
+ | Partition 2 does not end on cylinder boundary. | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Now change / | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | resume device = /dev/sda6 | ||
+ | compress = y | ||
+ | early writeout = y | ||
+ | image size = 487332331 | ||
+ | RSA key file = / | ||
+ | shutdown method = platform | ||
+ | </ | ||
+ | |||
+ | As we use Feisty the fstab file is a little bit out of the ordinary as the partitions are referenced by UUID numbers. | ||
+ | Lets start with finding the new UUID number for our swap partition: | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | /dev/sda1: TYPE=" | ||
+ | /dev/sda2: LABEL=" | ||
+ | /dev/sda3: UUID=" | ||
+ | /dev/sda5: UUID=" | ||
+ | /dev/sda6: UUID=" | ||
+ | </ | ||
+ | |||
+ | or | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | ID_FS_USAGE=other | ||
+ | ID_FS_TYPE=swap | ||
+ | ID_FS_VERSION=2 | ||
+ | ID_FS_UUID=1194f834-8fdf-4b81-b4ec-92d3860f88b5 | ||
+ | ID_FS_LABEL= | ||
+ | ID_FS_LABEL_SAFE= | ||
+ | </ | ||
+ | |||
+ | With this information we can now update /etc/fstab: | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | / | ||
+ | # | ||
+ | # <file system> <mount point> | ||
+ | proc /proc | ||
+ | # /dev/sda3 | ||
+ | UUID=b64cbb80-79e9-4ba0-bdd3-592b9acaa931 / | ||
+ | # /dev/sda1 | ||
+ | UUID=221CBFA51CBF7281 / | ||
+ | # /dev/sda2 | ||
+ | # | ||
+ | # /dev/sda4 | ||
+ | UUID=1194f834-8fdf-4b81-b4ec-92d3860f88b5 none swap sw 0 0 | ||
+ | / | ||
+ | none / | ||
+ | </ | ||
+ | |||
+ | |||
+ | The last thing we need to update is the initram file so the boot process looks at the right location: | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | </ | ||
+ | |||
+ | //Update//: If you want to make an update for all you kernel versions just run: | ||
+ | |||
+ | < | ||
+ | root@dubex-tdd: | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | |||
+ | |||
+ | That should be it! |
howtos/move-swap.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1