Page 4 of 4 FirstFirst ... 234
Results 31 to 37 of 37

Thread: How to install (only) a kernel from an installation CD

  1. #31
    Join Date
    Mar 2009
    Location
    York, UK
    Beans
    43
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to install (only) a kernel from an installation CD

    Quote Originally Posted by bribera View Post
    Ah sorry, I missed that. It could be that the cdrom doesn't actually contain an installable kernel package, since it copies over a base system. I'm really shooting in the dark with that explanation.

    I'd revert to your original /etc/apt/sources.list and make your goal to get on the internet.

    You should be able to plug in a networking cable and get online. If that's an option, I'd try it.

    You'd plug it in and do something like:
    Code:
    sudo ifup eth0
    sudo dhclient eth0
    Then test to see if you're online:
    Code:
    ping -c 3 google.com
    You really should be able to get online, and once you're online you should be able to install a kernel.
    Thank you Bribera. I will be working on that. Current results are:

    Code:
    ubuntu@ubuntu:~$ sudo chroot /mnt/system /bin/bash
    root@ubuntu:/# sudo ifup eth0
    sudo: unable to resolve host ubuntu
    ifup: failed to open statefile /var/run/network/ifstate: No such file or directory
    root@ubuntu:/# sudo hostname x
    sudo: unable to resolve host ubuntu
    root@ubuntu:/# sudo hostname x
    root@ubuntu:/# hostname
    x
    root@ubuntu:/# sudo ifup eth0
    ifup: failed to open statefile /var/run/network/ifstate: No such file or directory
    
    root@ubuntu:/# sudo dhclient eth0
    Internet Systems Consortium DHCP Client V3.1.1
    Copyright 2004-2008 Internet Systems Consortium.
    All rights reserved.
    For info, please visit http://www.isc.org/sw/dhcp/
    
    /proc/net/dev: No such file or directory
    
    root@ubuntu:/# ping -c 3 google.com
    ping: unknown host google.com

  2. #32
    Join Date
    Mar 2009
    Location
    York, UK
    Beans
    43
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to install (only) a kernel from an installation CD

    Hi. I managed to get the network started by copying the required files from the livecd filesystem. Started synaptic and downloaded a linux-image (needed wireless-crda too, among others) but I get the same Error failed to fork pty when synaptic tries to install the packages... what a pity.

    This is the output:
    Code:
    # synaptic
    vte_terminal_forkpty() failed. Bad file descriptor
    Last edited by tg1w; November 7th, 2009 at 12:01 PM.

  3. #33
    Join Date
    Nov 2004
    Location
    Seattle, WA
    Beans
    93
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: How to install (only) a kernel from an installation CD

    Gack, what an annoyance At least you got networking up

    You can try to install it with dpkg instead of syntaptic, although who knows whether it'll actually install given that syntaptic is broken. To do that, try these instructions:

    First, figure out what kernel version you're running:
    Code:
    uname -r
    Based on that, choose the the directory containing your Ubuntu kernel from kernel.ubuntu.com: http://kernel.ubuntu.com/~kernel-ppa/mainline/ - also be sure to choose the correct architecture.

    Install like this (my example is using the 2.6.31.5 build for x86_64):
    Code:
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31.5/linux-headers-2.6.31-02063105_2.6.31-02063105_all.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31.5/linux-headers-2.6.31-02063105-generic_2.6.31-02063105_amd64.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31.5/linux-image-2.6.31-02063105-generic_2.6.31-02063105_amd64.deb
    sudo dpkg -i linux-headers-2.6.31-02063105_2.6.31-02063105_all.deb
    sudo dpkg -i linux-headers-2.6.31-02063105-generic_2.6.31-02063105_amd64.deb
    sudo dpkg -i linux-image-2.6.31-02063105-generic_2.6.31-02063105_amd64.deb
    The other option you have is to install the kernel yourself. This basically means doing some of the work that syntaptic does for you:
    • copying the right files into /boot
    • updating grub to recognize the kernel
    • hoping it works


    We can try that path if installing the .debs doesn't work...
    "To make a statue needs skill: to view a statue aright needs skill also." -Epictetus

  4. #34
    Join Date
    Mar 2009
    Location
    York, UK
    Beans
    43
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Exclamation Re: How to install (only) a kernel from an installation CD

    Quote Originally Posted by bribera View Post
    Gack, what an annoyance At least you got networking up

    You can try to install it with dpkg instead of syntaptic, although who knows whether it'll actually install given that syntaptic is broken. To do that, try these instructions:

    First, figure out what kernel version you're running:
    Code:
    uname -r
    You mean the version of kernel I was previously running, or the one on the LiveCD?

    The LiveCD is running version 2.6.31-14-generic. This however cannot be found on kernel.ubuntu.com. I have thus used simply v2.6.31.

    Code:
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31/linux-headers-2.6.31-020631-generic_2.6.31-020631_i386.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31/linux-headers-2.6.31-020631_2.6.31-020631_all.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31/linux-image-2.6.31-020631-generic_2.6.31-020631_i386.deb
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.31/linux-source-2.6.31_2.6.31-020631_all.deb
    In order to install the above, I had to copy the /proc/bus/pci directory from the LiveCD filesystem. In order to install linux-image I was required to install wireless-crda, which can be obtained through
    Code:
    wget http://mirrors.kernel.org/ubuntu/pool/main/w/wireless-crda/wireless-crda_1.7_i386.deb
    sudo dpkg -i wireless-crda_1.7_i386.deb
    This is the big output:
    Code:
    root@ubuntu:/# sudo dpkg -i linux-image-2.6.31-020631-generic_2.6.31-020631_i386.deb 
    (Reading database ... 304651 files and directories currently installed.)
    Preparing to replace linux-image-2.6.31-020631-generic 2.6.31-020631 (using linux-image-2.6.31-020631-generic_2.6.31-020631_i386.deb) ...
    Done.
    Unpacking replacement linux-image-2.6.31-020631-generic ...
    Running postrm hook script /sbin/update-grub.
    Searching for GRUB installation directory ... found: /boot/grub
    findfs: Unable to resolve 'UUID=c1448a6e-04eb-46a1-80f0-5154db00f923'
    Cannot determine root device.  Assuming /dev/hda1
    This error is probably caused by an invalid /etc/fstab
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-2.6.31-020631-generic
    Found kernel: /boot/memtest86+.bin
    Updating /boot/grub/menu.lst ... done
    
    Setting up linux-image-2.6.31-020631-generic (2.6.31-020631) ...
    Running depmod.
    update-initramfs: Generating /boot/initrd.img-2.6.31-020631-generic
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    grep: /proc/modules: No such file or directory
    Running postinst hook script /sbin/update-grub.
    Searching for GRUB installation directory ... found: /boot/grub
    findfs: Unable to resolve 'UUID=c1448a6e-04eb-46a1-80f0-5154db00f923'
    Cannot determine root device.  Assuming /dev/hda1
    This error is probably caused by an invalid /etc/fstab
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-2.6.31-020631-generic
    Found kernel: /boot/memtest86+.bin
    Replacing config file /var/run/grub/menu.lst with new version
    Updating /boot/grub/menu.lst ... done
    
    Examining /etc/kernel/postinst.d.
    run-parts: executing /etc/kernel/postinst.d/nvidia-common
    Last edited by tg1w; November 12th, 2009 at 12:50 AM. Reason: mistake

  5. #35
    Join Date
    Mar 2009
    Location
    York, UK
    Beans
    43
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How to install (only) a kernel from an installation CD

    On restart, GRUB shows me the new 2.6.31 kernel, but the booting procedure stops midway - screen turns black.

    I'll try to install the Jaunty kernel, 2.6.28.

  6. #36
    Join Date
    Mar 2009
    Location
    York, UK
    Beans
    43
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Smile Re: How to install (only) a kernel from an installation CD

    God bless you bribera.

    After installing the 2.6.28 kernel and reverting to my very first /etc/fstab, the system correctly booted. That's where I'm writing from.

    Issue solved. I'm very grateful.

    Regards

  7. #37
    Join Date
    Nov 2004
    Location
    Seattle, WA
    Beans
    93
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: How to install (only) a kernel from an installation CD

    Awesome! Glad one of these crazy ideas finally panned out.
    "To make a statue needs skill: to view a statue aright needs skill also." -Epictetus

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

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