2011-03-24

Slitaz -- tmpfs / restore



1. startup
tux@slitaz:~$ uname -a
Linux slitaz 2.6.37-slitaz #4 SMP Wed Mar 16 11:27:06 UTC 2011 i686 GNU/Linux
tux@slitaz:~$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 18.3G 995.1M 16.4G 6% /
tmpfs 1.6G 0 1.6G 0% /dev/shm
tux@slitaz:~$ cat /etc/fstab
# /etc/fstab: Information about static filesystems.
#
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
#/dev/hda3 /home ext3 defaults 0 2
#/dev/hdb1 /mnt/data ext3 defaults 0 2
/dev/cdrom /media/cdrom iso9660 user,ro,noauto 0 0
tux@slitaz:~$ mount
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime,barrier=1,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
tux@slitaz:~$

2. bind tmpfs
tux@slitaz:~$ mkdir /dev/shm/src
tux@slitaz:~$ sudo mount --bind /dev/shm/src /usr/src
tux@slitaz:~$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 18.3G 995.1M 16.4G 6% /
tmpfs 1.6G 0 1.6G 0% /dev/shm
tmpfs 1.6G 0 1.6G 0% /usr/src
tux@slitaz:~$

3. restore tmpfs
tux@slitaz:~$ tar -xjvf /home/module/20110316-src-2637-tmpfs.tar.bz2 \
-C /dev/shm
tux@slitaz:~$ ls -l /dev/shm/src
total 100
-rw-r--r-- 1 tux tux 91515 Mar 8 08:18 config
drwxr-xr-x 3 tux tux 60 Mar 24 10:13 kernel-patches/
drwxr-xr-x 26 tux tux 1260 Mar 24 10:13 linux-2.6.37/
tux@slitaz:~$ ls -l /usr/src
total 100
-rw-r--r-- 1 tux tux 91515 Mar 8 08:18 config
drwxr-xr-x 3 tux tux 60 Mar 24 10:13 kernel-patches/
drwxr-xr-x 26 tux tux 1260 Mar 24 10:13 linux-2.6.37/
tux@slitaz:~$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 18.3G 995.1M 16.4G 6% /
tmpfs 1.6G 831.5M 799.3M 51% /dev/shm
tmpfs 1.6G 831.5M 799.3M 51% /usr/src
tux@slitaz:~$

4. make xconfig / make menuconfig
tux@slitaz:~$ cd /usr/src/linux-2.6.37/
tux@slitaz:/usr/src/linux-2.6.37$ make xconfig
scripts/kconfig/qconf Kconfig


tux@slitaz:~$ ps ax | tail -5
2737 tux 0:00 make xconfig
2782 tux 0:00 make -f scripts/Makefile.build obj=scripts/kconfig xconfig
2847 tux 0:00 scripts/kconfig/qconf Kconfig
2848 tux 0:00 ps ax
2849 tux 0:00 tail -5
tux@slitaz:~$



tux@slitaz:/usr/src/linux-2.6.37$ make menuconfig
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/mconf.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig


tux@slitaz:~$ ps ax | tail -5
2478 tux 0:00 make menuconfig
2523 tux 0:00 make -f scripts/Makefile.build obj=scripts/kconfig menuconfig
2712 tux 0:00 scripts/kconfig/mconf Kconfig
2729 tux 0:00 ps ax
2730 tux 0:00 tail -5
tux@slitaz:~$



*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

tux@slitaz:/usr/src/linux-2.6.37$