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!

Need to add ubuntu swap partition to Slitaz. Please help!
(15 posts) (6 voices)-
Posted 12 years ago #
-
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.
Posted 12 years ago # -
And as in Slitaz know what swap is connected?
Posted 12 years ago # -
@black dog
http://hg.slitaz.org/slitaz-boot-scripts/file/3dd56819a891/etc/init.d/system.sh
Line 106=>120Posted 12 years ago # -
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 commandswapon -s (display summary about used swap devices and exit)
. But in BusyBox, which is used in the Slitaz commandswapon
has only two options:-a
and-p PRI
.
Therefore it is not clear how do I know I have connected swap or not.Posted 12 years ago # -
tux@slitaz:~$ free
total used free shared buffers Mem: 2064612 199712 1864900 0 1244 -/+ buffers: 198468 1866144 Swap: 0 0 0
Posted 12 years ago # -
Hi black dog & mojo!
Another answer for the question. Show boot log:
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#
Posted 12 years ago # -
Thank you!
Commandfree
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?Posted 12 years ago # -
Hi black dog,
Your screenshot really surprized me. Here 83 for Linux ext2/3/4 filesystem.
Please, post here your /etc/fstab.Posted 12 years ago # -
What is the output of :
# blkidPosted 12 years ago # -
I apologize.
The fact that I deliberately changed the ID section to show that in the output offdisk -l
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?Posted 12 years ago # -
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
mkswap
, 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.
Posted 12 years ago # -
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
fdisk
andmkswap
.Mkswap
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 commandfree
, 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.Posted 12 years ago # -
Thank you!
Posted 12 years ago #
Reply
You must log in to post.