Documentation > ISOs, initrd, initramfs

mkswap in nutyx-setup changes uuid of all swaps

<< < (2/2)

I never allow the installer to do any partitioning on its own, I'd rather do this on my own afterwards.
If you have a swap partition already in the system all you have to do is add a swap line to your fstab.

What sounds like happened is that your swap partition was overwritten by a new one with a new uuid and all other installations that had the old id lost it, so you have to replace it with the new one on /etc/fstab on each one affected.

--- Code: ---UUID=abcde-fghikk-123456-7890123   swap   swap   defaults,noatime   0   0
--- End code ---

--- Code: ---/dev/sdaxx   swap   swap   defaults,noatime   0   0
--- End code ---

works with most linux I've tried.
then do

--- Code: ---$ sudo mount -a
$ free
$ sudo swapon /dev/sdaxx
$ free

--- End code ---

to verify that it is active immediately after the swapon command is issued.
Similarly you can create a swapfile like /etc/swapfile , use dd to copy /dev/zero x times in it to set the size. 

--- Code: ---# sudo dd bs=1K count=1024K if=/dev/zero of=/etc/swapfile
--- End code ---
1k x 1024k = 1GB of swapfile.  But I don't recommend this as much because the swap area can be used in case of a crash with journaling abilities to correct the partition after the crash.  If the swapfile gets corrupt as well your partition may be gone.  This is why it is good to have swap even if you have 4 times more ram than you ever use.  This I think goes along the use of restore=/swap/...  in the linux boot line


[0] Message Index

[*] Previous page

Go to full version