Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
hi, I think I have badly messed up my mandrake linux kernel. I would like ot retrive the files stored there since ihavent taken a back in sometime. Please Help! ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39

    Exclamation Need help soon, cannot boot linux!!


    hi,
    I think I have badly messed up my mandrake linux kernel. I would like ot retrive the files stored there since ihavent taken a back in sometime. Please Help!
    I was trying to get madwifi to install the required driver for my atheros wireless card

    http://madwifi.org/wiki/UserDocs/Distro/Mandrake
    Here is hte page I was looking at
    and this is what I did
    * urpmi gcc cvs sharutils
    * cd /usr/src/linux
    * make clean; make xconfig

    and simply save the file upon entry to .config (the default) and quit, then

    * make KERNELRELEASE=$(uname -r) MODULEPATH=/lib/modules/$(uname -r)
    * make modules KERNELRELEASE=$(uname -r) MODULEPATH=/lib/modules/$(uname -r)
    I think my kernel was 2.6.8.1-12mdk or something like that!

    Anyway, my computer has a windows and linux partition. When I boot the computer it refuses to boot linux, also I have an extra option there now saying 268-12 or something like that!

    So I booted from both options. The default linux boot and the new kernel option.
    It pretends to do something, then restarts itself
    So nothing really happens, it doesn't seem to get to booting linux at all.
    On the other hand hte windows boots fine, which is why I can write these mesgs!
    What do you suggest I try?
    Thanks.

    Is all my linux lost now? Is there anyway I can retrieve my files and stuff?

    I am starting a new thread in the hope that more people will read it and suggest something!

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Getting your data backed up should be quite easy. http://www.knoppix.org/. Boot from knoppix, mount your drives and burn your data to CD or copy it to the windows partition (unless its NTFS). Once that is done you can look at repairing your install. Did you copy the kernel into place and install the modules?
    Code:
    cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinux-<somthing> make modules_install
    When you say it pretends to do something, does it just hang and reboot or do you get any messages out of it. If you can get messages then post them here so we can take a look. Which bootloader are you using? Knoppix can be used to reinstall lilo. As root:
    Code:
    mount -o dev /mnt/<linux root partition>
    chroot /mnt/<linux partition> /sbin/lilo -v
    The chroot will make lilo unaware of the knoppix filesystem so it will use the /etc directory that mandrake provides. If that has any problems can you post the output here along with your lilo.conf. Let us know how you get on, Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39
    When I say it restarts itself, I get to the boot options ie the screen with linux and windows boot option.
    when I click linux it waits a minute on the same screen (like always!) and then instead of starting to boot linux it restarts itself. no error mesgs!
    I will try booting from knoppix and see what happens.
    thanks
    rekha

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39
    managed to get a back up.
    but cannot run the command chroot to do anything.
    it says
    cannot run command /sbin/lilo -v no such file or directory
    I definitely was using LILO there!
    Any ideas what I shoudl do now?
    Thanks a ton for telling me how to get my data backed up.
    needed one file desperately!
    Rekha

  6. #5
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Glad you managed to get your data backed up, all hail the mightly Knoppix.

    First of all we need to find lilo. In Knoppix run

    Code:
    $find /mnt/<linux root partition> -name lilo
    It ought to be located at /mnt/<linux root partition>/sbin/lilo but if not, don't worry too much.

    The re-run the chroot command from the previous message, but change the location of lilo to the path find returned minus the /mnt/<partition> part. Note that I've edited it to add an option to the mount command (note to self: Never quote commands from memory; <reverb>Terrible</reverb> things could happen.)

    Failing that you can use the lilo that Knoppix provides and tell it to use the config file on your linux partition. This shouldn't be required unless lilo isn't installed.

    Code:
    $/sbin/lilo -C /mnt/<partition>/etc/lilo.conf -v
    BTW all of this is being cribbed from http://www.knoppix.net/wiki/Rescue_F...einstall_LILO..

    If this doesn't work, could we take a peek at your lilo.conf file.

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  7. #6
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39
    I tried what you said. I was originally looking at the wrong partition (duh me!)
    anyway, no it says

    " Reading boot sector from /dev/hda
    FAtal: open /dev/hda: Permission denied

  8. #7
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Are you running the command as root? (The graphical interface comes up under a user account. run "sudo su -" first)

    and are you including the "-o dev" in the mount command?

    Failing that it might be because it can't find suitable /dev/ and /proc/ folders. We can fix that too, but I tried this out and didn't need them.

    Check the other two things first and if that doesn't work try this from a fresh Knoppix boot:

    Code:
    <press ctrl+alt+F1 to switch to a root console>
    $mount -o dev /mnt/hdaX
    $mount -t proc none /mnt/hdaX/proc
    $mount -t none /dev /mnt/hdaX/dev -o bind
    $chroot /mnt/hdX
    $lilo -v
    Replacing hdX with the root Linux partition.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  9. #8
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39
    I guess I wasn't doing the mount properly. The two command you said worked.
    And then I restarted the computer and tried loading linux, it still had the same problem.
    Do you think I can just reload mandrake? I had version 10.1 and now I have 10.2 on CD.
    How would I go about doing that without messing up my windows partition.
    Thanks a ton.
    Rekha

  10. #9
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    682
    Actually reloading Mandrake would be the fastest way to get your linux system back on it's feet now you have a backup (you do have a backup, don't you?). You can put reload Mandrake onto the partitions that already exist without disturbing your windows install in the least.

    You need be sure which partition is which though, if you accidentally install Mandrake over windows you will trash the windows install completely. It should be fairly obvious because the part of the install that asks about partition layout should tell you the format of each partition, but to be sure, print out a copy of your /etc/fstab file (recovered through Knoppix) to refer to during the installation.

    Also, if I remember my Mandrake installs (it's been a wee while) you will have to select a more advanced installation option or Mandrake will offer to repartition your drives as it sees fit and it may overwrite your windows partition automatically.

    http://www.mandrake.tips.4.free.fr/installmdv2006.html will give you a walkthrough of a more recent version, but it should be fairly similar. Particularly the "Use Existing Partitions" option in the Hard Disk Partitioning option.

    Other that that, it ought to detect the windows installation when it is putting lilo back on and automatically set up an option for it.

    Just be sure you have an external backup of everything important in case of disaster/power cut/godzilla.

    Let us know how it goes,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

  11. #10
    Just Joined!
    Join Date
    Jan 2005
    Posts
    39
    I have the greatest ability to mess this up.
    So I loaded MAndrake 10.2 just fine.. or mandriva limited version.
    And I dont remember what my graphics card specs were. I can't get my xserver running
    When i boot linux it comes to the login and once I login I get errors on running startx, it says it cannot load modules
    What to do now? I assumed it was a problem with graphics card.
    Now am not so sure
    I have a IBM Thinkpad R51.

Page 1 of 2 1 2 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
  •