Page 1 of 2 12 LastLast
Results 1 to 10 of 21

Thread: Knoppix 7.0.2-EN DVD notes & comments

Hybrid View

  1. #1
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674

    Knoppix 7.0.2-EN DVD notes & comments

    Hello,
    Did someone managed yet to get the 64 bits compile & run time environment working on Knoppix 7.0.2 ?
    The steps provided by Klaus for Knoppix 6.7.1 are no longer working (cf link below)
    http://knoppix.net/forum/threads/294...l=1#post125222
    and my other attempts have failed so far.
    Best Regards,
    Gilles

  2. #2
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Greetings, Gilles.
    Is your 7.0.2 running a 64-bit kernel?

  3. #3
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Hi Utu,
    Yes of course.
    The following line was working well enough on Knoppix 6.7.1 with the 64 bit Linux kernel:
    sudo apt-get -y -t sid --reinstall install libc6 libc6-dev libc6-dev-amd64 gcc-4.6-multilib lib64gcc1
    But this does not work any more with Knoppix 7 (7.0.0 nor 7.0.1 nor 7.0.2).
    There are conflicting packages that are in use and switching into single user mode (init 1) does not help.
    Cheers,
    Gilles
    Last edited by ruymbeke; 06-07-2012 at 02:40 AM.

  4. #4
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512
    Hi Gilles,

    I have successfully tried the following with Knoppix V7.0.2.

    You have to replace the packages libc-bin, libc-dev-bin, libc6, libc6-dev with those of the unstable branch.

    Open a terminal an issue
    Code:
    sudo apt-get update
    sudo apt-get -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
    sudo chvt 1
    init 2
    apt-get -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
    chroot /UNIONFS/
    apt-get -t unstable -f install
    exit
    init 5
    chvt 5
    Now you can install the current packages gcc-4.6-multilib and g++-4.6-multilib from the unstable branch.
    Code:
     sudo apt-get -y -t unstable install gcc-4.6-multilib g++-4.6-multilib
    Download and extract pi_quick_start.tar.gz

    Change to your pi_quick_start directory and load start.sh into a text editor. Replace all occurances of "cc" with "gcc -m64". Save the file and exit the text editor.

    Set the environment variable CFLAGS:
    Code:
    export CFLAGS=-m64
    Run the script:
    Code:
    ./start.sh
    Best Regards

  5. #5
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802

    apt-get crash: "A copy of the C library was found in an unexpected directory"

    Quote Originally Posted by klaus2008 View Post
    Hi Gilles,

    I have successfully tried the following with Knoppix V7.0.2.

    You have to replace the packages libc-bin, libc-dev-bin, libc6, libc6-dev with those of the unstable branch.

    Open a terminal an issue
    Code:
    sudo apt-get update
    sudo apt-get -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
    sudo chvt 1
    init 2
    apt-get -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
    chroot /UNIONFS/
    apt-get -t unstable -f install
    exit
    init 5
    chvt 5
    Now you can install the current packages gcc-4.6-multilib and g++-4.6-multilib from the unstable branch.
    Code:
     sudo apt-get -y -t unstable install gcc-4.6-multilib g++-4.6-multilib
    Download and extract pi_quick_start.tar.gz

    Change to your pi_quick_start directory and load start.sh into a text editor. Replace all occurances of "cc" with "gcc -m64". Save the file and exit the text editor.

    Set the environment variable CFLAGS:
    Code:
    export CFLAGS=-m64
    Run the script:
    Code:
    ./start.sh
    Best Regards
    Last week this recipe worked perfectly, but now it hangs, seemingly in the check_dir() function in libc:i386.preinst. Is there any way to get around this? The script is found in /var/lib/dpkg/info/libc6:i386.preinst, but editing this doesn't seem to help.

    For me, this is a very serious problem.
    Here is what seems to be the culprit:

    Code:
    # Sanity check.
    # If there are versions of glibc outside of the normal installation
    # location (/lib, /lib64, etc.) then things may break very badly
    # as soon as ld.so is replaced by a new version.  This check is not
    # foolproof, but it's pretty accurate.  This script ignores libraries
    # with different sonames, and libraries incompatible with the 
    # to-be-installed ld.so.
    check_dir () {
        msg=$1
        dir=$2
    
        # Follow symlinks
        dir=$(readlink -e $dir || true)
    
        # Ignore inexistent directories
        if ! test -d "$dir" ; then
            return
        fi
      
        # Detect possible candidates
        files=$(ls $dir | egrep '^(ld|lib(d|c|m|pthread|rt|dl))-2.*.so' 2>/dev/null || true)
        if test -z "$files" ; then
            return
        fi
      
        for file in $files ; do
            lib=$dir/$file
    
            # Skip if it is a symlink (as installed by lsb-core)
            if test -L "$lib" ; then
                continue
            fi
    
            # Skip if it is the currently dynamic loader
            if test "$lib" = "$ldfile" ; then
                continue
            fi
    
            # See if the found libraries are compatible with the system ld.so;
            # if they aren't, they'll be ignored. Check e_ident, e_type (which
            # will just be ET_DYN), and e_machine. If a match is found, there
            # is a risk of breakage.
            libbytes=`head -c 20 $lib | od -c`
            if test "$ldbytes" != "$libbytes" ; then 
              continue
            fi
    
            # Binaries owned packages are considered to do the right thing
            # First try a quick lookup which should catch all cases on a 
            # normal system
            if echo $libcfiles | grep -q "[ ^]$lib[ $]" ; then 
                continue
            fi
    
            # Slower lookup to confirm
            if dpkg-query -S "$lib" >/dev/null 2>&1 ; then
                continue
            fi
    
            # Output an error message and exit
            echo
            echo "A copy of the C library was found $msg:"
            echo "  '$lib'"
            echo "It is not safe to upgrade the C library in this situation;"
            echo "please remove that copy of the C library or get it out of"
            echo "'$dir' and try again."
            echo
            exit 1
        done
    }
    "A copy of the C library was found in an unexpected directory /UNIONFS/lib/libc-2.13.so..." And we are asked to remove it.

    Code:
    # Try to detect copies of the libc library in the various places
    # the dynamic linker uses.
        ldfile=$(readlink -e /lib/ld-linux.so.2)
        ldbytes=$(head -c 20 /lib/ld-linux.so.2 | od -c)
        libcfiles=$(dpkg-query -L $(package_name) 2>/dev/null)
    
        dirs="/lib/i386-linux-gnu /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64"
        for dir in $dirs ; do
            check_dir "in an unexpected directory" $dir
        done

  6. #6
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674

    Is the "libc6_2.13-33_i386.deb" package corrupted on the Debian repository ?

    Quote Originally Posted by Capricorny View Post
    Last week this recipe worked perfectly, but now it hangs... Is there any way to get around this ? ... For me, this is a very serious problem...
    Hello Capricorny,
    I don't have any problem using the script below:

    Code:
    #!/bin/sh
    sudo apt-get update
    sudo apt-get -y -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev gcc-4.6-multilib g++-4.6-multilib
    sudo apt-get -y -t unstable --reinstall install libc-bin libc-dev-bin libc6 libc6-dev
    sudo chroot /UNIONFS/ apt-get -y -t unstable -f install
    sudo apt-get -y -t unstable --reinstall install gcc-4.6-multilib g++-4.6-multilib
    After booting Knoppix 7.0.2 from the DVD and using the 64 bits kernel
    I can compile and execute 64 bits libraries and applications such as Pi
    cf: http://h2np.net/pi/pi_record_e.html
    (after editing the start.sh script to add the "-m64" parameter on the two lines using "cc" to compile "v" and "pi")

    That being said, during the install I get a very worrying error message:

    Code:
    apt-get -y -t unstable --reinstall install  libc-bin libc-dev-bin libc6 libc6-dev
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 1453 not upgraded.
    Need to get 0 B/10.2 MB of archives.
    After this operation, 0 B of additional disk space will be used.
    (Reading database ... 430147 files and directories currently installed.)
    Preparing to replace libc-bin 2.13-33 (using .../libc-bin_2.13-33_i386.deb) ...
    Unpacking replacement libc-bin ...
    Processing triggers for man-db ...
    Setting up libc-bin (2.13-33) ...
    (Reading database ... 430147 files and directories currently installed.)
    Preparing to replace libc6:i386 2.13-33 (using .../libc6_2.13-33_i386.deb) ...
    
    A copy of the C library was found in an unexpected directory:
      '/UNIONFS/lib/i386-linux-gnu/libc-2.13.so'
    It is not safe to upgrade the C library in this situation;
    please remove that copy of the C library or get it out of
    '/UNIONFS/lib/i386-linux-gnu' and try again.
    
    dpkg: error processing /var/cache/apt/archives/libc6_2.13-33_i386.deb (--unpack):
     subprocess new pre-installation script returned error exit status 1
    Errors were encountered while processing:
     /var/cache/apt/archives/libc6_2.13-33_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    ==> dpkg: error processing /var/cache/apt/archives/libc6_2.13-33_i386.deb (--unpack): <==
    Is it possible that the "libc6_2.13-33_i386.deb" package be corrupted on the Debian repository ?
    Even with that error, it looks like that I can still compile and execute 64 bits code...

    BTW, did you try my patch yet ?
    Best Regards,
    Gilles
    Last edited by ruymbeke; 06-24-2012 at 08:46 AM.

  7. #7
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Hi Klaus,
    This works great, thank you very much !
    Would you consider adding these 64 bits packages in a future Knoppix DVD
    such as this 64bits libraries and compile environment would be ready
    to be used by the user when booting with the 64 bit kernel ?
    Would you also consider adding the oprofile kernel module ?
    Best Regards,
    Gilles

    PS: I noticed that the "libc" and "ld-linux" 64 bits libraries are now located into "/lib/i386-linux-gnu".
    Shouldn't they be located into /lib64 instead (as it is on Knoppix 6.7.1) ?
    Last edited by ruymbeke; 06-07-2012 at 09:17 AM.

  8. #8
    Senior Member otropogo's Avatar
    Join Date
    Jul 2008
    Posts
    109
    I must confess I couldn't quite follow Klaus's explanation on booting 7.0.2 in 64-bit mode, especially since I have no experience in running 64-bit OSs. However, I tried booting with the "knoppix64" argument and when I do, System Monitor shows my PC as having 3.9GB of RAM available, whereas when booting normally, the utility is only showing 2.9GB of RAM. So I assume this means that the 64-bit kernel is working...

  9. #9
    Moderator Moderator
    Join Date
    Mar 2004
    Location
    Menlo Park, California
    Posts
    674
    Hi otropogo,
    Yes you are running a 64 bits kernel since you can see most of your RAM (3.9GB instead of 2.9GB with a 32 bits kernel).
    You can also see that you are running a 64bits kernel by running the command "uname -a" from a shell console:
    "Linux Microknoppix 3.3.7-64 #40 SMP PREEMPT Tue May 22 08:47:38 CEST 2012 x86_64 GNU/Linux"
    As Klaus explained previously, besides the fact that a 64bits kernel allows you to use almost all of your RAM
    as most 64 bits applications the 64 bits kernel is also more efficient (runs faster) but at a price of a larger footprint
    which is not desirable for a CD/DVD (especially when speed does not really matter for most users and applications),
    reason for Klaus to only have the 64 bits Kernel available on his great Knoppix distribution (and have all the libraries
    and other applications only as 32 bits code, knowing that 32bits code can be used with a 64bits kernel).
    Now if for some reason you really like or need 64 bits native code to run on that platform then you need to have
    some extra libraries (as glibc) and other tools to create these 64 bits applications (as gcc) and this is exactly
    these installation steps that Klaus explained previously. Hope this helps.
    Best Regards,
    Gilles

  10. #10
    Senior Member otropogo's Avatar
    Join Date
    Jul 2008
    Posts
    109
    Quote Originally Posted by ruymbeke View Post
    Hi otropogo,
    Yes you are running a 64 bits kernel since you can see most of your RAM (3.9GB instead of 2.9GB with a 32 bits kernel).
    You can also see that you are running a 64bits kernel by running the command &quot;uname -a&quot; from a shell console:
    &quot;Linux Microknoppix 3.3.7-64 #40 SMP PREEMPT Tue May 22 08:47:38 CEST 2012 x86_64 GNU/Linux&quot;
    As Klaus explained previously, besides the fact that a 64bits kernel allows you to use almost all of your RAM
    as most 64 bits applications the 64 bits kernel is also more efficient (runs faster) but at a price of a larger footprint
    which is not desirable for a CD/DVD (especially when speed does not really matter for most users and applications),
    reason for Klaus to only have the 64 bits Kernel available on his great Knoppix distribution (and have all the libraries
    and other applications only as 32 bits code, knowing that 32bits code can be used with a 64bits kernel).
    Now if for some reason you really like or need 64 bits native code to run on that platform then you need to have
    some extra libraries (as glibc) and other tools to create these 64 bits applications (as gcc) and this is exactly
    these installation steps that Klaus explained previously. Hope this helps.
    Best Regards,
    Gilles
    Thanks Giles. If I've understood correctly now, the optional kernel allows one to use more than 3.GB of RAM, but not to run 64-bit applications. I gather there may also be some performance loss, when running 32-bit applications on the 64-bit kernel?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


ALLEN BRADLEY 281G-F12S-10B-RRG-CBG /C  AMORSTART MODULE 280G-FS-10-RG STK 2911 picture

ALLEN BRADLEY 281G-F12S-10B-RRG-CBG /C AMORSTART MODULE 280G-FS-10-RG STK 2911

$380.00



Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc... picture

Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...

$419.99



Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc... picture

Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...

$619.99



Intel Core i7-6700 3.40 GHz QUAD Core (4 Core) Desktop Processor 8MB LGA 1151 picture

Intel Core i7-6700 3.40 GHz QUAD Core (4 Core) Desktop Processor 8MB LGA 1151

$59.99



Intel Core i7-14700K Unlocked Desktop Processor picture

Intel Core i7-14700K Unlocked Desktop Processor

$409.99



Intel Core i5-12600KF Desktop Processor 10 (6P+4E) Cores up to 4.9 GHz Unlocked. picture

Intel Core i5-12600KF Desktop Processor 10 (6P+4E) Cores up to 4.9 GHz Unlocked.

$145.59



Intel Core i5-6500 3.2GHz 6MB SR2L6 / SR2BX Skt. FCLGA1151 Desktop Processor CPU picture

Intel Core i5-6500 3.2GHz 6MB SR2L6 / SR2BX Skt. FCLGA1151 Desktop Processor CPU

$24.50



AMD Ryzen 5 4500 6-Core 3.6GHz Socket AM4 65W CPU Desktop Processor picture

AMD Ryzen 5 4500 6-Core 3.6GHz Socket AM4 65W CPU Desktop Processor

$79.00



Intel Core i7-13700K 3.40GHz 16-Core CPU LGA1700 BX8071513700K picture

Intel Core i7-13700K 3.40GHz 16-Core CPU LGA1700 BX8071513700K

$339.99



Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor picture

Intel i7-8700 Coffee Lake 3.2GHz 6-Core Max Turbo 4.6GHz Processor

$49.01