This is the old SliTaz forum - Please use the main forum.slitaz.org

SOLVED ghost firefox
  • erniaernia March 2010
    I have some strange issues with my rootfs, which is 65.8 Mb when compressed with cpio+lzma and 235,2 Mb with only cpio. After booting i can't find firefox in my menu nor in /usr/bin.
    Copying rootfs.gz to rootfs.lzma, running unlzma rootfs.lzma and cpio -t < rootfs | grep firefox shows me that files are in the archive, but running cpio -id < rootfs does not extract them.
    If i install the real cpio program instead of the link to busybox i can extract them and i have firefox back.
    So the questions are:
    1) does busybox's cpio have a filesize limit when extracting files?
    2) firefox is not extracted because the initial boot process uses busybox's cpio?
    3) is there a bzImage limitation to the initramfs size?
    4) am i missing something?
    I've searched the forum and google but i haven't find anything.
    Thanks
  • erniaernia March 2010
    I've made a try with a brand new install of cooking, installed firefox, created a list of all files belonging to firefox and libfirefox with tazpkg list-files (removing extralines with a grep).
    If i made a backup with busybox's cpio, remove firefox and decompress the cpio with -id i have firefox back.
    If i make the backup with the real cpio, remove firefox and decompress the cpio with busybox's cpio with -id i don't have firefox back.
    If i do the same with geany package it restores smoothly.
    So this should prove that there is something wrong with firefox package.
    Maybe it has been packaged with the real cpio and this cause problems? Sure i can't umnderstand what's going wrong with firefox package.
  • erniaernia March 2010
    ok, im (a little bit?) dumb. i did not mention that i'm using a liveusb nor i knew that using a liveusb the rootfs is extrated in ram by the kernel itself, so busybox and cpio are not involved at all.
    reading this: http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt my attention has been attracted from this paragraph:

    Note: The cpio man page contains some bad advice that will break your initramfs
    archive if you follow it. It says "A typical way to generate the list
    of filenames is with the find command; you should give find the -depth option
    to minimize problems with permissions on directories that are unwritable or not
    searchable." Don't do this when creating initramfs.cpio.gz images, it won't
    work. The Linux kernel cpio extractor won't create files in a directory that
    doesn't exist, so the directory entries must go before the files that go in
    those directories.


    This could prove that i'm sure not a linux guru but maybe it could be that something wrong happened when firefox have been packaged, or somewhere else. BTW wikipedia page about cpio reports some example with the -depth option.
    Anyway, because i want to save my changes with tazusb and restoring without fear to screw up the system, i'm using this /etc/init.d/local.sh:

    #!/bin/sh
    # /etc/init.d/local.sh - Local startup commands.
    #
    # All commands here will be executed at boot time.
    #
    . /etc/init.d/rc.functions

    echo "Starting local startup commands... "

    #!/bin/sh
    #are we root?
    #if test $(id -u) != 0 ; then
    # echo -e "\nThis program requires being run as root.\n"
    # exit 0
    #fi
    #i check for the standard location of rootfs.gz or
    #i mount my usbkey by label - put your label instead of mine if you
    #have unusual setup

    if [ ! -e /rootfs ]; then
    LABEL=CH32
    USER=`ls /home/`
    if [ -e /home/$USER/boot/rootfs.gz ]; then
    MOUNT_POINT=/home/$USER
    else
    MOUNT_POINT=/media/$LABEL
    if [ ! -e $MOUNT_POINT ]; then mkdir $MOUNT_POINT; fi
    if [ ! -e $MOUNT_POINT/boot/rootfs.gz ]; then mount /dev/disk/by-label/$LABEL $MOUNT_POINT; fi
    fi
    #unzlma rootfs.gz
    cp $MOUNT_POINT/boot/rootfs.gz /
    mv /rootfs.gz /rootfs.lzma
    unlzma /rootfs.lzma
    fi
    #remove previous missing.txt
    if [ -e /missing.txt ]; then
    rm /missing.txt
    fi
    cd /
    (
    IFS=$'\n'
    cpio -t < rootfs | grep -v /dev | sed '$d' > list.txt
    for i in `cat list.txt`
    do
    if [ ! -e $i ]; then
    echo $i >> missing.txt
    fi
    done
    #restore missings from missing.txt
    for i in `cat missing.txt`
    do
    if [ ! -e $i ]; then
    cpio -i < rootfs $i
    fi
    done
    )

    rm /rootfs
    rm /list.txt

    not so elegant but it works.
    this is my last missing.txt, if someone would like to check:
    http://rapidshare.com/files/365004311/missing.txt.html

    EDIT: i don't know how to post local.sh in a readable way, you can find it here
    http://rapidshare.com/files/365006514/local.sh.html
  • erniaernia March 2010
    It turns out that the problem is that i have two neurons which conflicts each other :-(
    I was booting with the sound=no option to save some ram, so /etc/init.d/hwconf.sh remove sound modules and sound applications.
    firefofox package depends on alsa-lib so it got removed with alsa-lib
    You can verify that this time i'm right booting a slitaz cooking firefox flavor with the boot option sound=no
    Proposed solutions:
    1) remove alsa-lib from firefox dependencies (i'm signaling it in http://labs.slitaz.org/projects/packages)
    2) modify /etc/init.d/hwconf.sh to remove sound packages but not packages depending on it. this would avoid futures incompatibility too.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

SliTaz Social