SliTaz SliTaz Forum

You are not logged in.

#1 2012-09-29 02:04:40

yiumun
Member
Registered: 2012-09-29
Posts: 10

Need to add ubuntu swap partition to Slitaz. Please help!

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

#2 2012-09-29 03:33:20

gdesilva
Member
Registered: 2011-04-07
Posts: 419

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#3 2012-09-29 05:51:41

black dog
Member
Registered: 2011-04-09
Posts: 331

Re: Need to add ubuntu swap partition to Slitaz. Please help!

And as in Slitaz know what swap is connected?

Offline

#4 2012-09-29 06:17:14

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Need to add ubuntu swap partition to Slitaz. Please help!

@black dog

http://hg.slitaz.org/slitaz-boot-scripts/file/3dd56819a891/etc/init.d/system.sh

Line 106=>120

Offline

#5 2012-09-29 07:34:13

black dog
Member
Registered: 2011-04-09
Posts: 331

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#6 2012-09-29 08:05:12

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Need to add ubuntu swap partition to Slitaz. Please help!

tux@slitaz:~$ free

[c]total         used         free       shared      buffers
Mem:       2064612       199712      1864900            0         1244
-/+ buffers:             198468      1866144
Swap:            0            0            0[/c]

Offline

#7 2012-09-29 09:04:15

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#8 2012-09-29 15:13:45

black dog
Member
Registered: 2011-04-09
Posts: 331

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#9 2012-09-30 08:45:52

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Need to add ubuntu swap partition to Slitaz. Please help!

Hi black dog,

Your screenshot really surprized me. Here 83 for Linux ext2/3/4 filesystem.

Please, post here your /etc/fstab.

Offline

#10 2012-09-30 09:01:00

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: Need to add ubuntu swap partition to Slitaz. Please help!

What is the output of :

# blkid

Offline

#11 2012-09-30 14:21:56

black dog
Member
Registered: 2011-04-09
Posts: 331

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#12 2012-09-30 15:52:28

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Need to add ubuntu swap partition to Slitaz. Please help!

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

#13 2012-09-30 16:52:38

black dog
Member
Registered: 2011-04-09
Posts: 331

Re: Need to add ubuntu swap partition to Slitaz. Please help!

Indeed, I do not really understand explain. smile

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

#14 2012-09-30 17:43:21

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Need to add ubuntu swap partition to Slitaz. Please help!

explain? wink

K.I.S.S.

If I want swap then I open GPartEd and make swap. That's all from my side.

In other side, system find and use this swap automagically.

If you have no X, you can use fdisk & mkswap instead of. But why anyone wants to change partition id?

wink

Offline

#15 2012-10-01 14:00:43

yiumun
Member
Registered: 2012-09-29
Posts: 10

Re: Need to add ubuntu swap partition to Slitaz. Please help!

Thank you!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 1.56 MiB (Peak: 1.77 MiB) ]