Results 1 to 10 of 10

Thread: Knoppix to restore RH9 Kernel

  1. #1
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18

    Knoppix to restore RH9 Kernel

    I've done a very bad thing and accidently removed the 2.4.20-31.9 kernel from my Redhat 9 PC. Can I use Knoppix to restore it somehow? I have Knoppix 3.3 CD and I've used it a few times, just to play around with it, but I am not sure of it's limitations.

    thanks

  2. #2
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    949
    If you A: have a copy of the kernel (will work)
    B: have a kernel config file and rebuild it. (might not work)

  3. #3
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY USA
    Posts
    1,510
    Lets assume that /dev/hda3 is your RH9 root partition. Boot with Knoppix. Mount the root partition as read write right-clicking on the iconod the desktop and changing the device properties. Open a konsole window & get root access. Copy or download the RH9 kernel RPM file. Install the rpm: rpm -Uvh linux-2.4.20-31.9-i386.rpm. Edit the grub.conf file or the lilo.conf file. If necessary run lilo command. Reboot.

  4. #4
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18
    OK Im about to try this but before I do, What do I need to edit the grub.conf file with? How will I know what info to put in it?

  5. #5
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY USA
    Posts
    1,510
    If it is the exact same kernel version as the one that was lost then you probably do not need to edit it . If you do need to edit it, all you should have to do is to replace the current kernel line & have it point to the new kernel. The RH9 manual Chapter 2 should be a good point of reference: http://www.redhat.com/docs/manuals/l...ual/ref-guide/.
    I hope this helps.
    James

  6. #6
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18
    Ok, I only have hda1 and hda2

    I changed bot permissions to RW. I set the password for root via the command line terminal. I "sudo su -" get the root prompt and run this command "mount /mnt/hda1 -o remount,rw" I also tried the same command with hda2.

    I get this error:

    mount: /mnt/hda1 not mounted already, or bad option

    Why is it not mounting?

  7. #7
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18
    ok I was able to mount to my harddrive with

    mount /dev/hda2 /mnt/hda2

    I DL'ed a copy of the RPM and am now running

    alien -i packagename.rpm


    we'll see if this works

    UPDATE

    I got this message when I ran the above command

    alien -i kernel-source-2.4.20-8.i386.rpm
    dpkg: unable to access dpkg status area: Read-only file system


    what should the properties of the .rpm file be?

    right now it is rw-r-r

  8. #8
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY USA
    Posts
    1,510
    I am sorry if I left out a crucial step. You do not, should not use alien.
    Upon mounting hda2, copy the kernel RPM file to /mnt/hda2/tmp. Next you have to chroot into hda2. A chroot is a change root. It makes the system think that /mnt/hda2 is your new / as opposed to its current root from the Knoppix CD. Using the following command:
    chroot /mnt/hda2 /bin/bash
    Then you can use rpm to install the kernel package.
    rpm -ivh /tmp/kernel-version.rpm
    If this works, edit grub.conf if necessary. Next exit the chroot with the exit command. Unmount /dev/hda2:
    umount /mnt/hda2
    Reboot.
    Again, my apologies.
    James

  9. #9
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18
    James,

    No problem, the Alien thing was working anyways. Ok I tried what you posted and I was able to install the kernel RPM. Now about the grub.conf file.

    I ran a find / -name grub.conf and it came back with:
    /etc/grub.conf

    I did a ls -al on /etc/grub.conf and got this:

    lrwxrwxrwx 1 root root 22 Oct 15 2003 grub.conf -> ../boot/grub/grub.conf


    I am not sure by looking at that link where grub.conf is located. I tried all the DIRs(while still in chroot mode)

    I opened a new terminal console and did a cd to /mnt/hda1
    I found grub.conf under /boot/grub

    the contents are:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,0)
    # kernel /vmlinuz-version ro root=/dev/hda2
    # initrd /initrd-version.img
    #boot=/dev/hda
    timeout=10
    splashimage=(hd0,0)/grub/splash.xpm.gz
    password --md5 $1$adRtnzb5$hNqORBo.f757r8WftCiHM1

    default=0
    timeout=10
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    title Red Hat Linux (2.4.20-
    root (hd0,0)
    kernel /boot/vmlinuz-2.4.22-xfs ro root=LABEL=/
    initrd /boot/initrd-2.4.20-8.img


    I changed the kernel line because when I checked /boot i found a file called vmlinuz-2.4.22-xfs

    I was unable to find any initrd*.img files by running find / -name initrid*.*


    Thanks for your help.

    j

  10. #10
    Junior Member registered user
    Join Date
    Dec 2004
    Posts
    18
    uggh.. I've been messing with this thing for the last few days and still can't seem to get it working

Similar Threads

  1. Image save and restore CD/DVD with KNOPPIX
    By mclae in forum Tips and Tricks
    Replies: 0
    Last Post: 03-09-2006, 10:24 PM
  2. How do I use Knoppix to restore Win 9X Hdd.
    By borgward in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 03-01-2006, 11:51 AM
  3. How can I do a system restore on XP Home through knoppix?
    By mikesuth18 in forum MS Windows & New to Linux
    Replies: 6
    Last Post: 08-21-2005, 06:26 PM
  4. Kernel restore?
    By Linuxshark in forum Hdd Install / Debian / Apt
    Replies: 6
    Last Post: 07-20-2004, 12:42 AM
  5. Restore Knoppix Config Always Fails
    By jBeach in forum General Support
    Replies: 5
    Last Post: 07-11-2003, 08:57 PM

Posting Permissions

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


DELL PowerEdge R730 Server 2x E5-2690v4 2.6GHz =28 Cores 128GB H730 4xRJ45 picture

DELL PowerEdge R730 Server 2x E5-2690v4 2.6GHz =28 Cores 128GB H730 4xRJ45

$458.00



Dell R630 Server 2x E5-2620 V4 2.1GHz =16 Cores 128GB DDR4 1x 960GB 2x 1G 2x 10G picture

Dell R630 Server 2x E5-2620 V4 2.1GHz =16 Cores 128GB DDR4 1x 960GB 2x 1G 2x 10G

$240.00



Dell PowerEdge R620 Server - 128GB RAM, 2x8c CPU, 128Gb SSD/3x900Gb SAS, Proxmox picture

Dell PowerEdge R620 Server - 128GB RAM, 2x8c CPU, 128Gb SSD/3x900Gb SAS, Proxmox

$260.00



Dell Poweredge R720 8x 2.5

Dell Poweredge R720 8x 2.5" Bay Xeon E5-2650 2.8GHz 8 Cores / 64gb No HDD

$114.97



Dell Poweredge R220 Server Xeon E3-1270 v3 3.5ghz Quad Core / 16gb / 1x Tray picture

Dell Poweredge R220 Server Xeon E3-1270 v3 3.5ghz Quad Core / 16gb / 1x Tray

$139.99



DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4xRJ45 picture

DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4xRJ45

$379.00



Dell PowerEdge R630 Server | 2x E5-2680 V4 =28 Cores | H730 | Choose RAM/ Drives picture

Dell PowerEdge R630 Server | 2x E5-2680 V4 =28 Cores | H730 | Choose RAM/ Drives

$632.99



R630 DELL OEM 10X2.5'' 2X E5-2680V4 32GB RAM 2X750W PSU IDRAC ENT POWEREDGE picture

R630 DELL OEM 10X2.5'' 2X E5-2680V4 32GB RAM 2X750W PSU IDRAC ENT POWEREDGE

$189.95



DELL PowerEdge R630 8SFF Server 2x E5-2699v3 2.3GHz =36 Cores 64GB H730 4xRJ45 picture

DELL PowerEdge R630 8SFF Server 2x E5-2699v3 2.3GHz =36 Cores 64GB H730 4xRJ45

$345.00



Dell R730xd 26 Port SFF 2x E5-2697v4 36-Cores H730 128GB Server 2x SFP 10G ENT picture

Dell R730xd 26 Port SFF 2x E5-2697v4 36-Cores H730 128GB Server 2x SFP 10G ENT

$490.00