Announcement

Collapse
No announcement yet.

very basic questions on upgrades

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    very basic questions on upgrades

    Hi,

    I have a very stupid problem. I made the last upgrade and so the linux-headers have been also upgraded.

    During the upgrading I was prompting on what to do with the /boot/grub/menu.lst and I kept my former one.

    Now, how to retrieve the menu.lst that I did not use?

    Also, is there a command that list me the last upgrade that I made?

    Thanks,
    g.
    ---------------<br />Linux kernel 2.6.28-15-generic<br />Kubuntu 9.04 64bit KDE 4.2.2<br />Dell Precision M2400 Intel Dual Core 2<br />Nvidia Quadro FX 370M (Driver Nvidia 180.44)<br />HDA Intel (STAC92xx Analog)<br />---------------

    #2
    Re: very basic questions on upgrades

    Now, how to retrieve the menu.lst that I did not use?
    If you want to update/upgrade the menu.lst:
    Code:
    sudo update-grub
    man update-grub
    NAME
    update-grub - program to generate GRUB’s menu.lst file

    SYNOPSIS
    update-grub [-y]

    OPTIONS
    -y Assume ’yes’ on all questions.

    DESCRIPTION

    update-grub is a program used to generate the menu.lst file used by the grub bootloader. It works by looking in /boot for all files which start with "vmlinuz-". They will be treated as kernels, and grub menu entries will be created for each. It will also create the initial menu.lst if none exists, after prompting the user. It will also add initrd lines for ramdisk images found with the same version as kernels found. e.g. /boot/vmlinuz-2.4.5 and /boot/initrd-2.4.5 will cause a line of "initrd=/boot/initrd-2.4.5 or similar to be added for the kernel entry in the menu.lst.

    If you want to edit the menu.lst:

    It is a text file -> you could edit it with a text editor:
    Code:
    kdesudo kate /boot/grub/menu.lst
    There is a dedicated editor: kgrubeditor - graphical editor for GRUB boot manager settings
    A tool to view and edit the menu.lst file of the GRUB boot manager. It offers
    many features and it is the perfect solution for those who want to change the
    way GRUB works, without messing with the menu.lst file.

    This is the KDE 4 version of QGRUBEditor
    After the installation: System Settings > Advanced > Grub Editor

    Backup the menu.lst before you edit !


    If you want to clean the menu.lst > HOWTO: Removing unnecessary entries from the grub menu list (a.k.a removing old kernel packages and rewriting new menu.lst)


    More of the Grub > HOW TO: GRUB Methods - Toolkit


    Also, is there a command that list me the last upgrade that I made?
    What package manager are you using ? ( FAQ: Package Managers)


    The Synaptic is keeping log of packages that are installed through it.
    Synaptic > File > History


    As the Ubuntu is Debian based it is using the dpkg -> /var/log/dpkg.log

    Checking installed/updated/removed packages from the dpkg log:

    Recent status log:
    Code:
    grep "status installed" /var/log/dpkg.log
    Code:
    grep upgrade /var/log/dpkg.log
    Code:
    grep remove /var/log/dpkg.log
    A bit older dpkg log:
    Code:
    grep "status installed" /var/log/dpkg.log.1
    Code:
    grep upgrade /var/log/dpkg.log.1
    Code:
    grep remove /var/log/dpkg.log.1
    The oldest logs - rotated dpkg logs (packed): dpkg.log.2.gz, dpkg.log.3.gz...

    Earlier > Topic: Update Logs
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: very basic questions on upgrades

      thanks a lot, I did not know where the various kernel versions where saved...

      what is strange is that in my /boot' directory I can see

      Code:
      ls -l /boot/vml*
      -rw-r--r-- 1 root root 2340384 2009-04-02 00:09 /boot/vmlinuz-2.6.27-11-generic
      -rw-r--r-- 1 root root 3522336 2009-04-17 05:34 /boot/vmlinuz-2.6.28-11-generic
      -rw-r--r-- 1 root root 3509024 2009-06-02 11:24 /boot/vmlinuz-2.6.28-13-generic
      that correctly shows also the last kernel update. If I run

      Code:
      sudo update-grub
      Searching for GRUB installation directory ... found: /boot/grub
      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.28-13-generic
      Found kernel: /boot/vmlinuz-2.6.28-11-generic
      Found kernel: /boot/vmlinuz-2.6.27-11-generic
      Found kernel: /boot/memtest86+.bin
      Updating /boot/grub/menu.lst ... done
      still is fine. but my menu.lst file is not changed.

      I will modify it by hand.

      Thanks,
      g.
      ---------------<br />Linux kernel 2.6.28-15-generic<br />Kubuntu 9.04 64bit KDE 4.2.2<br />Dell Precision M2400 Intel Dual Core 2<br />Nvidia Quadro FX 370M (Driver Nvidia 180.44)<br />HDA Intel (STAC92xx Analog)<br />---------------

      Comment


        #4
        Re: very basic questions on upgrades

        still is fine. but my menu.lst file is not changed.

        Hmm - looking what is happening at here:

        Code:
        sudo apt-get dist-upgrade
        Reading package lists...
        Building dependency tree...
        Reading state information...
        The following NEW packages will be installed
        linux-headers-2.6.28-13 linux-headers-2.6.28-13-generic
        linux-image-2.6.28-13-generic linux-restricted-modules-2.6.28-13-generic
        ...
        Setting up linux-image-2.6.28-13-generic (2.6.28-13.44) ...
        Running depmod.
        update-initramfs: Generating /boot/initrd.img-2.6.28-13-generic
        Running postinst hook script /sbin/update-grub.
        Searching for GRUB installation directory ... found: /boot/grub
        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.28-13-generic
        Found kernel: /boot/vmlinuz-2.6.28-11-generic
        Found kernel: /boot/memtest86+.bin
        I have a manually edited menu.lst => query " What would you like to do about menu.lst"


        Yes, new version is fine.

        Replacing config file /var/run/grub/menu.lst with new version
        Updating /boot/grub/menu.lst ... done
        => Updated Grub menu.lst



        Pure guess

        Maybe the "update-grub" needs to run the depmod & update-initramfs before ??
        Something like:
        Code:
        sudo depmod && sudo sudo update-initramfs -u && sudo update-grub
        man depmod
        NAME
        depmod - program to generate modules.dep and map files.

        SYNOPSIS
        depmod [ -b basedir ] [ -e ] [ -F System.map ] [ -n ] [ -v ] [ version ] [ -A ]

        depmod [ -e ] [ -FSystem.map ] [ -n ] [ -v ] [ version ] [ filename ... ]

        DESCRIPTION

        Linux kernel modules can provide services (called "symbols") for other modules to use (using EXPORT_SYMBOL in the code). If a second module uses this symbol, that second module clearly depends on the first module. These dependencies can get quite complex.

        depmod creates a list of module dependencies, by reading each module under /lib/modules/version and determining what symbols it exports, and what symbols it needs. By default this list is written to modules.dep in the same directory. If filenames are given on the command line, only those modules are examined (which is rarely useful, unless all modules are listed).
        man update-initramfs
        NAME
        update-initramfs - generate an initramfs image

        SYNOPSIS
        update-initramfs [-k version] [-c] [-u] [-t] [-v] [-b] [-h]

        DESCRIPTION

        The update-initramfs script manages your initramfs images on your local box. It keeps track of the existing initramfs archives in /boot. There are three modes of operation create, update or delete. You must at least specify one of those modes.

        The initramfs is a gzipped cpio archive. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system. All finding of the root device happens in this early userspace.

        OPTIONS
        ...
        -u This mode updates an existing initramfs.
        ...
        Before you edit, BACKUP !

        Why there are dead links ?
        1. Thread: Please explain how to access old kubuntu forum posts
        2. Thread: Lost Information

        Comment


          #5
          Re: very basic questions on upgrades

          Testing

          Removing (moving): /boot/initrd.img-2.6.28-13-generic
          Editing the menu.lst: Removing the "kernel 2.6.28-13 " lines.


          Test #1 - konsole:
          Code:
          sudo update-grub
          Searching for GRUB installation directory ... found: /boot/grub
          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.28-13-generic
          Found kernel: /boot/vmlinuz-2.6.28-11-generic
          Found kernel: /boot/memtest86+.bin
          Updating /boot/grub/menu.lst ... done
          The menu.lst is not updated.


          Test #2 - konsole:
          Code:
          sudo update-initramfs -u && sudo update-grub
          update-initramfs: Generating /boot/initrd.img-2.6.28-13-generic
          Searching for GRUB installation directory ... found: /boot/grub
          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.28-13-generic
          Found kernel: /boot/vmlinuz-2.6.28-11-generic
          Found kernel: /boot/memtest86+.bin
          Replacing config file /var/run/grub/menu.lst with new version
          Updating /boot/grub/menu.lst ... done
          The menu.lst is updated..
          Before you edit, BACKUP !

          Why there are dead links ?
          1. Thread: Please explain how to access old kubuntu forum posts
          2. Thread: Lost Information

          Comment


            #6
            Re: very basic questions on upgrades

            thanks!
            ---------------<br />Linux kernel 2.6.28-15-generic<br />Kubuntu 9.04 64bit KDE 4.2.2<br />Dell Precision M2400 Intel Dual Core 2<br />Nvidia Quadro FX 370M (Driver Nvidia 180.44)<br />HDA Intel (STAC92xx Analog)<br />---------------

            Comment

            Working...
            X