You are not logged in.
Pages: 1
I didn't think my current partition set up through properly on install so I'd like to make some changes. Swap seems to be the obvious candidate as it doesn't involve messing with data. Does this plan sound like it will work or be a disaster?
1. swapoff -a
2. Run cfdisk, delete the swap partition, create an extended partition, format a swap partition in there with the same sdaX designation as it has now, add whatever other partitions are needed to the extended partition. Write the new partition table.
3. swapon -L /dev/sdaX
Do I need to edit fstab afterwards to ensure a later swapon -a doesn't cause problems?
Last edited by tasticorp (2011-11-01 15:51:43)
Offline
"-L" wouldn't work like that, I presume. Just /dev/sdaX or -a. Perhaps -L sdaX. You might not be able to create a swap partition with the same number (X), in that case just update fstab with the new number. You can run "mkswap /dev/sdaX" instead of formatting it in cfdisk or in case formatting doesn't work.
Offline
Sounds like it could work although you will need to edit fstab as sda4 will become the extended partition (and don't forget to add your new partitions to fstab if you want them mounted on boot)
You may want to use UUIDs though (see this wiki article: https://wiki.archlinux.org/index.php/Pe … ce_naming).
mkswap -U <uuid> /dev/sdaXwill give you a swap partition with a UUID of your choice. I found this, in combination with blkid, to be easier than editing fstab
Rauchen verboten
Offline
Thanks for the prompt responses. I'll have a go at this later.
Offline
Thanks again guys. No joy without a reboot. I used mkswap after a reboot as per https://wiki.archlinux.org/index.php/Sw … _partition and then swapon and updated /etc/fstab accordingly. All working now.
Time to try to install ubuntu on the new free partition in the extended partition without overwriting grub.
Offline
Pages: 1