You are not logged in.
Hello everybody! I need to add a swap partition from ubuntu that I alreay installed on the same computer to Slitaz. Is there any way to add this swap partition? The reason was that it didn't show up any swap partition during installation. Thanks!
Offline
Slitaz would pick up the existing swap partition at boot and there is no necessity to add a swap partition during installation. Normally there is a message in the boot log to this effect.
Offline
And as in Slitaz know what swap is connected?
Offline
@black dog
http://hg.slitaz.org/slitaz-boot-scripts/file/3dd56819a891/etc/init.d/system.sh
Line 106=>120
Offline
Thank you.
My English is very bad, so I use the on-line translator.
In a large linux I could get information on the use of swap command [c]swapon -s (display summary about used swap devices and exit)[/c]. But in BusyBox, which is used in the Slitaz command [c]swapon[/c] has only two options: [c]-a[/c] and [c]-p PRI[/c].
Therefore it is not clear how do I know I have connected swap or not.
Offline
tux@slitaz:~$ free
[c]total used free shared buffers
Mem: 2064612 199712 1864900 0 1244
-/+ buffers: 198468 1866144
Swap: 0 0 0[/c]
Offline
Hi black dog & mojo!
Another answer for the question. Show boot log:
[c]tux@slitaz:~$ su
Password:
root@slitaz:/home/tux# fdisk -l | grep swap
/dev/sda5 18022 18151 1044193+ 82 Linux swap
root@slitaz:/home/tux# cat /var/log/boot.log | grep -i swap
Swap memory detected on: /dev/sda5
Activating swap memory...
root@slitaz:/home/tux# free
total used free shared buffers
Mem: 1020844 851116 169728 0 77740
-/+ buffers: 773376 247468
Swap: 1044188 15028 1029160
root@slitaz:/home/tux#[/c]
Offline
Thank you!
Command [c]free[/c] really shows the presence swap.
To determine swap the ID of partition must specify as 82?
If the installation ID to swap partition is not 82, then swap will not be defined?
[attachment=16726,673]
Offline
Hi black dog,
Your screenshot really surprized me. Here 83 for Linux ext2/3/4 filesystem.
Please, post here your /etc/fstab.
Offline
What is the output of :
# blkid
Offline
I apologize.
The fact that I deliberately changed the ID section to show that in the output of [c]fdisk -l[/c] is not a word "swap".
In this case, the presence of swap is determined by the fstab.
But if at the beginning of the section ID will be 83, not 82, then this section will not be defined as a swap in fstab is not the record.
Is this true?
Offline
Dear black dog,
Experiments in the Linux are great things! You can try to connect your ext3 partition as swap (using swapon command). But... you'll fail. Why?
You can connect both swap partition or swap file (recently I've used windows' pagefile.sys as additional swap). But before using your partition (or file) you should prepare it, or you'll get error else.
Command for preparing swap partition is [c]mkswap[/c], you can find it syntax in the internet (using DuckDuckGo). Partitioning program (gparted) usually prepared swap partition for you.
Sorry, but I can't reach the sense in your actions. Why you fool your system? You couldn't use same partition both for swap and file storing at the same time.
Offline
Indeed, I do not really understand explain. 
Gparted program during partition creation swap, sets it as the ID 82. And this section is defined as a swap and properly registers in fstab.
But I also set slitaz-base. And use the command [c]fdisk[/c] and [c]mkswap[/c]. [c]Mkswap[/c] command does not change the ID section. Therefore created section is not defined as a swap.
True, it was my suspicion. I did not know the command [c]free[/c], to check whether you have connected swap. And in fstab no record sharing swap.
Only then I realized change ID section and it worked.
Although we can not rule out the fact that my problems were due to swap for other reasons.
I hope that the topic was not offended, I climbed up here.
Offline
Offline
Thank you!
Offline
[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]