Results 1 to 3 of 3

Thread: Segmentation Fault on chroot source/KNOPPIX

  1. #1
    Junior Member
    Join Date
    Dec 2003

    Segmentation Fault on chroot source/KNOPPIX

    I am trying to remaster knoppix following the Remastering HowTo. I keep hitting segmentation faults when it comes to the chroot. I have a dual P2-300 machine with a serial console on ttyS1 hooked up, .5Gb RAM, and 3ware IDE raid card with an 240Gb RAID5 array. I'm just trying to make a simple file-server based off knoppix, but I can't even get started. Here's what I do:

    boot knoppix.
    edit /etc/inittab and enable T1
    edit /etc/securetty and change ttyS0 to ttyS1
    give root a password
    kill -HUP 1
    login via serial console
    mount -rw /dev/sda2 /mnt/sda2
    mkdir /mnt/sda2/knx
    Run the following script:

    echo "MASTER is $MASTER"
    echo "SOURCE is $SOURCE"
    echo "CDROM is $CDROM"
    echo "ISO is $ISO"

    echo "# rm -rf $MASTER"
    rm -rf $MASTER
    echo "# rm -rf $SOURCE"
    rm -rf $SOURCE
    echo "# mkdir $MASTER"
    mkdir $MASTER
    echo "# mkdir $SOURCE"
    mkdir $SOURCE
    echo "# mkdir $SOURCE/KNOPPIX"
    echo "# cp -Rp /KNOPPIX/* $SOURCE/KNOPPIX"
    echo "# mkdir $MASTER/KNOPPIX"
    echo "# cp $CDROM/index.html $MASTER"
    cp $CDROM/index.html $MASTER
    echo "# cd $CDROM/KNOPPIX"
    echo "find . -size -10000k -type f -exec cp -p --parents {} $MASTER/KNOPPIX/ \;"
    find . -size -10000k -type f -exec cp -p --parents {} $MASTER/KNOPPIX/ \;
    echo ""
    echo "Done"
    After it completes I try to chroot to /mnt/sda2/knx/souce/KNOPPIX but I always get a segmentation fault. I did 'strace chroot ...' to see if I could figure out what the problem was, but I couldn't seem to make any headway. Here's the tail of the strace if someone can make heads or tails of it:

    open("/dev/tty", O_RDWR|O_NONBLOCK|O_LARGEFILE) = 3
    close(3) = 0
    brk(0) = 0x80e5a74
    brk(0) = 0x80e5a74
    brk(0x80e6000) = 0x80e6000
    brk(0) = 0x80e6000
    brk(0x80e7000) = 0x80e7000
    getuid32() = 0
    getgid32() = 0
    geteuid32() = 0
    getegid32() = 0
    rt_sigprocmask(SIG_BLOCK, NULL, [], = 0
    time(NULL) = 1080649153
    brk(0) = 0x80e7000
    brk(0x80e8000) = 0x80e8000
    brk(0) = 0x80e8000
    brk(0x80e9000) = 0x80e9000
    open("/etc/mtab", O_RDONLY) = 3
    fstat64(3, {st_mode=S_IFREG|0644, st_size=237, ...}) = 0
    old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
    read(3, "/dev/hda6 / ext2 rw,errors=remou"..., 4096) = 237
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    +++ killed by SIGSEGV +++

    I am not sure where its getting /dev/hda6. /dev/hda is my cdrom. /dev/sda is the raid array. Here's how they come up in dmesg:

    hda: MATSHITA CR-583, ATAPI CD/DVD-ROM drive
    ide-cd: passing drive hda to ide-scsi emulation.

    Attached scsi disk sda at scsi2, channel 0, id 0, lun 0
    SCSI device sda: 468898176 512-byte hdwr sectors (240076 MB)
    sda: sda1 sda2

    I tried doing the chroot on tty0, but I still got the segmentation fault. I tried rebooting, reformating the raid-array, but every time I get the segmentation fault. HELP!!!!!!


  2. #2
    Junior Member
    Join Date
    Dec 2003

    md5sum changes with each run.

    I am thinking this may be hardware issue, b/c I am seeing something else very strange. I thought that maybe knoppix was having a hard time with the size of the parition, so blew that one away, and created a small 5Gb partition as part of the raid array. I was able to successfully chroot. So I did my customiziations, and created a new knoppix iso. I then ran an md5sum on the iso file. Funny thing I noticed, is that each time I run it on the .iso file, it changes!!! So I thought maybe I had bad CD-ROM or faulty ram. But I ran memtest86 and swapped out CD-ROMs, and I still see the same thing. I even went back to an older version of knoppix and I still see the problem.

    So the only thing left to question is the raid array. Has anyone else seen this type issue where md5sum keeps changing?

  3. #3
    Member registered user
    Join Date
    Feb 2003
    Vancouver BC
    Try doing that directly on the file server. Don't access it via the serial console.

    - Ambrose

Similar Threads

  1. Segmentation fault in 45xsession (remastering Knoppix 3.9)
    By tr in forum Customising & Remastering
    Replies: 1
    Last Post: 07-23-2005, 09:29 AM
  2. Knoppix 3.8 Segmentation Fault
    By bluestick in forum Customising & Remastering
    Replies: 0
    Last Post: 03-29-2005, 02:33 PM
  3. Segmentation Fault in Knoppix 3.8
    By bluestick in forum General Support
    Replies: 0
    Last Post: 03-29-2005, 11:09 AM
  4. After remastering Knoppix 3.6, hwsetup Segmentation Fault!
    By alexl in forum Customising & Remastering
    Replies: 0
    Last Post: 09-17-2004, 02:36 PM
  5. Replies: 3
    Last Post: 05-09-2004, 06:41 AM

Posting Permissions

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