Live-build intégration d'une partition swap. Réalisable ?

Salut,

Je me suis crée une clés usb-live (Squeeze/lxde) personnalisée persistente.

Clés que j’aimerai faire tourner sur deux pc local (entre autre … ) possédant respectivement (laptop) 128 Mio et (un fixe) 258 Mio de ram.

L’idée m’étant venu de joindre une swap afin d’alléger la charge, mais … celle-ci reste inopérante.

[quote][root@debian] ~ # fdisk -l

Disk /dev/sda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00078c04

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1308 10498048 83 Linux
/dev/sda2 1308 2435 9052096 5 Extended
/dev/sda5 1308 1389 652288 82 Linux swap / Solaris
/dev/sda6 1389 2434 8396800 83 Linux

Disk /dev/sdb: 8019 MB, 8019509248 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002802

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 112 850943+ 83 Linux
Partition 1 has different physical/logical endings:
phys=(1023, 3, 32) logical=(111, 32, 50)
Partition 1 does not end on cylinder boundary.
/dev/sdb2 112 1023 6980608 5 Extended
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(105, 239, 7) logical=(111, 32, 51)
Partition 2 has different physical/logical endings:
phys=(974, 250, 44) logical=(1022, 196, 44)
Partition 2 does not end on cylinder boundary.
/dev/sdb5 112 259 1126400 82 Linux swap / Solaris
/dev/sdb6 259 794 4097024 83 Linux
[root@debian] ~ # [/quote]

[root@debian] ~ # mount aufs on / type aufs (rw) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) udev on /dev type tmpfs (rw,mode=0755) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/sdb1 on /live/image type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8,shortname=mixed,errors=remount-ro) /dev/sdb6 on /live/cow type ext3 (rw,noatime,errors=continue,data=ordered) tmpfs on /live type tmpfs (rw,relatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev) fusectl on /sys/fs/fuse/connections type fusectl (rw) [root@debian] ~ #

Cette idée est elle réalisable ? :083

Avec la commande swapon?

Tu peux aussi créer un fichier qui fait office de swap. Je n’ai plus la méthode en tête.

Salut,

La nuit portant conseil(s) :dance: … direction fstab.

Activation et pérennité!

#[code] cat /etc/fstab

/etc/fstab: static file system information.

aufs / aufs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

swap was on /dev/sdb5 during installation

UUID=d6d27d47-7173-4ebe-b983-41543a52c7fc none swap sw 0 0

[/code]

# swapon /dev/sdb5

# swapon -s Filename Type Size Used Priority /dev/sdb5 partition 1126392 0 -1

# cat /etc/initramfs-tools/conf.d/resume RESUME=UUID=d6d27d47-7173-4ebe-b983-41543a52c7fc

  • Réglage à ajusté dans le temps …

# cat /proc/sys/vm/swappiness 90

# cat /etc/default/grub ... GRUB_CMDLINE_LINUX="d6d27d47-7173-4ebe-b983-41543a52c7fc" ...

# cat /etc/sysctl.conf ... vm.swappiness=90 ...

# sysctl -p

silver.sax bien vu … :wink: