segmentation fault

Discussion in 'Installation/Configuration' started by Daisy, Apr 11, 2007.

  1. Daisy

    Daisy New Member

    FC5 multiple segmentation faults - help?

    newbie screw up. I noticed that my server was running slow and I couldn't figure out what it was so I pulleda windows and rebooted. ACK! It rebooted and everything is screwed. Segmentation errors out the wazoo. i get to a prompt and login and the error I get there is /bin/unicode_start: line 15: 1835 Segmentation fault /bin/kbd_mode -u. Where are the logs and where should I even start to look for what went wrong? Please help!!

    running:
    fedora core 5
    ispconfig
    dovecot
    postfix
    openssh

    the howtoforge perfect server setup

    p.s. what the heck is a segmentation fault?
    p.p.s. I looked in dmesg but don't see any errors. Is that the right place to look?
    p.p.s I've got no network either.
     
    Last edited: Apr 11, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Segmentation faults are often caused by hardware problems, so it might be a problem with your RAM or mainboard that causes the problems.
     
  3. Daisy

    Daisy New Member

    I dropped a spare hdd in and installed FC5 and ispconfig and it's working like a champ. I took the two hdd's that were in my machine and put them in a different machine with the same hardware config and still got the segmentation faults so I'm 99% sure it's not hardware. What would be the next step. I had noticed that the RAID 1 wasn't working. I have it setup with LVM RAID 1. Consequently, I can't access the drives independently. They have to be together which sucks. I think I made a mistake using LVM. What would be the next step from here to figure out what went wrong?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It is possible to recover data from a LVM raid volume. Here is the first draft of a howto that I'am currently writing:

    I used a Knoppix 5.1 LiveCD for this tutorial. Download the CD ISO-Image from here and burn it on CD, then connect the harddisk which contains the raid partition(s) to the IDE / ATA controller of your mainboard, put the Knoppix CD in your CD drive and boot from the CD.

    The Harddisk I used is a IDE drive that is attached to the first IDE Controller (hda). In my case, the harddisk contained only one partition.

    Restoring the Raid

    After Knoppix has bootet, Open a shell and execute the command:

    sudo su

    to become root user.

    As I dont have the mdadm.conf file from the original configuration, I create it with this command:

    mdadm --examine --scan /dev/hda1 >> /etc/mdadm/mdadm.conf

    The result shall be similar like this:

    DEVICE partitions
    CREATE owner=root group=disk mode=0660 auto=yes metadata=1
    MAILADDR root
    ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a28090aa:6893be8b:c4024dfc:29cdb07a

    Edit the file and add "devices=/dev/hda1,missing" at the end of the line that describes the raid array.

    vi /etc/mdadm/mdadm.conf

    finally the file looks like this:

    DEVICE partitions
    CREATE owner=root group=disk mode=0660 auto=yes metadata=1
    MAILADDR root
    ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a28090aa:6893be8b:c4024dfc:29cdb07a devices=/dev/hda1,missing

    The string "/dev/hda1" is the hardware device and "missing" means that the second disk in this raid is not present at the moment.

    Edit the file /etc/default/mdadm:

    vi /etc/default/mdadm


    and change the line:

    AUTOSTART=false

    to:

    AUTOSTART=true


    Now we can start our raid setup:

    /etc/init.d/mdadm start
    /etc/init.d/mdadm-raid start

    To check if our raid device is ok, run the command:

    cat /proc/mdstat

    The output shall look similar to this:


    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [ra id10]
    md0 : active raid1 hda1[1]
    293049600 blocks [2/1] [_U]

    unused devices: <none>


    Recovering the LVM setup

    The LVM configuration file can not be created by a easy command like the mdadm.conf, but LVM stores one or more copy(s) of the configuration file content at the beginning of the partition. I use the command dd to extract the first part of the partition and write it to a text file:

    dd if=/dev/md0 bs=512 count=255 skip=1 of=/tmp/md0.txt

    Open the file with a text editor:

    vi /tmp/md0.txt

    You will find some binary data first and then a configuration file part like this:

    VolGroup00 {
    id = "evRkPK-aCjV-HiHY-oaaD-SwUO-zN7A-LyRhoj"
    seqno = 2
    status = ["RESIZEABLE", "READ", "WRITE"]
    extent_size = 65536 # 32 Megabytes
    max_lv = 0
    max_pv = 0

    physical_volumes {

    pv0 {
    id = "uMJ8uM-sfTJ-La9j-oIuy-W3NX-ObiT-n464Rv"
    device = "/dev/md0" # Hint only

    status = ["ALLOCATABLE"]
    pe_start = 384
    pe_count = 8943 # 279,469 Gigabytes
    }
    }

    logical_volumes {

    LogVol00 {
    id = "ohesOX-VRSi-CsnK-PUoI-GjUE-0nT7-ltxWoy"
    status = ["READ", "WRITE", "VISIBLE"]
    segment_count = 1

    segment1 {
    start_extent = 0
    extent_count = 8942 # 279,438 Gigabytes

    type = "striped"
    stripe_count = 1 # linear

    stripes = [
    "pv0", 0
    ]
    }
    }
    }
    }

    Create a file /etc/lvm/backup/VolGroup00:

    vi /etc/lvm/backup/VolGroup00

    and insert the configuration data so the file looks similar to the above example.

    Now we can start LVM:

    /etc/init.d/lvm start

    read in the volume:

    vgscan

    Reading all physical volumes. This may take a while...
    Found volume group "VolGroup00" using metadata type lvm2

    pvscan

    PV /dev/md0 VG VolGroup00 lvm2 [279,47 GB / 32,00 MB free]
    Total: 1 [279,47 GB] / in use: 1 [279,47 GB] / in no VG: 0 [0 ]

    and activate the volume:

    vgchange VolGroup00 -a y

    1 logical volume(s) in volume group "VolGroup00" now active

    Now we are able to mount the partition to /mnt/data

    mkdir /mnt/data
    mount /dev/VolGroup00/LogVol00 /mnt/data/


    If you recover data from a harddisk with filenames in UTF-8 format, it might be nescessary to convert them to your current non UTF-8 locale. In may case, the raid harddisk is from a Fedora Core system with UTF-8 encoded filenames. My target locale is ISO-8859-1. In this cases, the perl script cnvmv helps to convert the filenames to the target locale.

    Installation of confmv:

    cd /tmp
    wget http://j3e.de/linux/convmv/convmv-1.10.tar.gz
    tar xvfz convmv-1.10.tar.gz
    cd convmv-1.10
    cp convmv /usr/bin/convmv


    To convert all filenames in /mnt/data to ISO-8859-1 locale, run this command:

    convmv -f UTF-8 -t ISO-8859-1 -r --notest /mnt/data/*

    If you want to test the conversion first, use:

    convmv -f UTF-8 -t ISO-8859-1 -r /mnt/data/*


    Related Links:


    http://j3e.de/linux/convmv/
    http://www.linuxjournal.com/article/8874
     
  5. Daisy

    Daisy New Member

    while a very cool how to, I was sorta hoping to save the FC5/ISPconfig installation so I don't have to do it all over again. I've got a mess of sites and users and it would like, way suck to have to try to get all their info again. not to mention make me look like a compelte tard. (which I am I'm just pretty good at hiding it.)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    As you posted above, the install on the harddisks wont boot anymore. So the normal way to resolve is to gain access to the data (thyts why I posted the howto) and migrate the users, ISPConfig and webiste data to a new running linux system.

    If you search the forum for "move ispconfig", you will find several threads about moving a ISPConfig installation to a new server.
     
  7. Daisy

    Daisy New Member

    oh! sorry! My fault. I didn't communicate well enough. It still boots. Gets to a prompt. I can login as root. I just get a ton of failed msg's and segmentation fault alert thingy mabobbers as it's loading. It also has a real hard time shutting down. it won't cut off unless I do a shutdown -r now and then hard power it off while it's reloading the bios.
     
  8. Daisy

    Daisy New Member

    definitely 100% sure it's not a hardware issue now. I dropped in a spare hdd and installed FC5 4 days ago and it's still running fine. I'm hoping we can figure out what went wrong with the other installation so we can fix it and keep using it. I really don't want to start all over. It's why I switched to linux. supposedly more stable than windows but so far, it's been more problematic. Running fine one minute and broken the next with no changes made. My windows server was up and running with only 5 reboots in 6 years. It once ran 507 days without error or reboot and I'm really hoping I can get the same kind of performance out of linux. Any other suggestions on where I should start looking? Like I said, I can login as root but my commands are limited because of all the errors. I should be able to use a rescue cd to get around that though right?
     
  9. edge

    edge Active Member Moderator

    I'm lost here... Is a "HDD" not hardware?
    It sounds to me that your HDD (the old one with the error's) is the problem.
     
  10. Daisy

    Daisy New Member

    ahhm, forgot to mention, the "old" hdd's (there were two using linux software raid1 with LVM) are only about 2 months old. I ran diagnostics on them and they didn't show any errors. I can mount them with the new installation of FC5 and access all the data. I'm pretty sure it's not hardware. I think I might of screwed something a while back trying to make the RAID work but I never rebooted and because I just now rebooted the problems showed up.
     
    Last edited: Apr 14, 2007
  11. Daisy

    Daisy New Member

    any ideas? at all? anyone? Still haven't found the problem and really don't want to start over....
     
  12. Daisy

    Daisy New Member

    looking at your tutorial, I'm not sure what to do. I installed FC5 on a clean hdd and then I hooked up one of the hdd's from the broken raid set. I think it's a bit different cause I'm using sata and it shows up different. I do a fdisk -l and it shows this:

    [[email protected] etc]# fdisk -l

    Disk /dev/sda: 160.0 GB, 160000000000 bytes
    255 heads, 63 sectors/track, 19452 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 13 104391 83 Linux
    /dev/sda2 14 19452 156143767+ 8e Linux LVM

    Disk /dev/sdb: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 13 104391 fd Linux raid autodetect
    /dev/sdb2 14 38913 312464250 fd Linux raid autodetect

    Disk /dev/md0: 106 MB, 106823680 bytes
    2 heads, 4 sectors/track, 26080 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes

    Disk /dev/md0 doesn't contain a valid partition table

    Disk /dev/md1: 319.9 GB, 319963267072 bytes
    2 heads, 4 sectors/track, 78116032 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes

    Disk /dev/md1 doesn't contain a valid partition table

    what should I do differently? Also what's a knoppix live cd?
     
  13. falko

    falko Super Moderator ISPConfig Developer

    Take a look here: http://www.knoppix.net/
    It's a Debian-based, very powerful Live-CD.
     
  14. Daisy

    Daisy New Member

    Till, so I followed your instructions replacing hda1 with sda1. My hdd has two partitions though. sda1 and sda2. The other drive is sdb1 and sdb2. I went through your steps for the RAID part of it and I get an error:

    Assembling MD array md0. . . failed (no devices found)
    generating udev events for MD arrays. . . done.

    What should I do?
     
  15. Daisy

    Daisy New Member

    scratch that. Ok, so I added sda2, sdb1, and sdb2 to the mdadm.conf and restarted and it found the raid array. yaay. ok. so, basic tutorial time? what's md0 and md1? so it finds array md1 and it's degraded. I assume that means it's working somewhat but would love to learn more about it.
     
  16. Daisy

    Daisy New Member

    went through the LVM stuff and can now access all the data but what do I do with it? Both drives are hooked up to my sata card and the cdrom is IDE so where can I copy the data to so I can reinstall FC5 and get ispconfig reinstalled?
     
  17. Daisy

    Daisy New Member

    I borrowed a USB hdd and I've got it mounted but I can't seem to copy all my info. I don't know if I did it right though cause I'm only trying to copy 18GB to a 40GB drive but it keeps telling me I'm out of room. What did I do wrong?
     
    Last edited: May 8, 2007
  18. Daisy

    Daisy New Member

    anyone? Hello?
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    If it tells you that you are out of space, then you are most likely out of space. have you considered to compreass tha data in a tar.gz or tar.bz2 file?
     
  20. Daisy

    Daisy New Member

    i used the right click properties in konquerer and it says only 4.1 gb are copied over before it runs out of space but it's a 40 gb drive. I used fdisk and mkfs as described here.

    http://www.ehow.com/how_1000631_hard-drive-linux.html

    and then I mount it to a folder I created following the steps you outlined to mount the LVM from the previous page. could I have gotten something wrong?

    and no. I hadn't considered tar. It's like zip right? How does one go about that? I'm really sorry but this is all still really new to me.
     

Share This Page