Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

  1. #1
    Join Date
    Apr 2008
    Beans
    367

    How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Hi Guys,
    I'm making an USB stick with 24.04.1 LTS on it.
    To make it I used Rufus and made a persistent partition quite big (around 7 GB). As I plan to use this live system to repair/maintain a lot of computers I will have access to, I installed some tools, made all the updates.
    But the kernel is still set to the vmlinuz-6.8.0-41-generic the iso was made with.
    Of course, my casper-rw partition hold the new vmlinuz-6.8.0-48-generic kernel but I can't update/made the initramfs I need and copy them into the casper directory used for kernels when booting.
    So I would be delighted to get all help and leads I can get to make this possible.
    Thank you very much for your help !

    P.S. : I need the latest kernel in order to test/make work very recent computers which will benefit from these updates.
    Edit : I forgot to tell you something...
    Previously, before Noble, I used the command live-update-initramfs to create the corresponding initramfs and it worked ...
    But now, it is not :
    Code:
    root@ubuntu:~# live-update-initramfs --help
    Command 'live-update-initramfs' not found, but can be installed with:
    apt install live-tools
    root@ubuntu:~# apt install live-tools
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Suggested packages:
      debian-installer-launcher
    The following NEW packages will be installed:
      live-tools
    0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
    Need to get 0 B/26.3 kB of archives.
    After this operation, 108 kB of additional disk space will be used.
    (Reading database ... 261972 files and directories currently installed.)
    Preparing to unpack .../live-tools_1%3a20190831.1_all.deb ...
    dpkg-divert: error: 'diversion of /usr/sbin/update-initramfs to /usr/sbin/update-initramfs.orig.initramfs-tools by live-tools' clashes with 'local diversion of /usr/sbin/update-initramfs to /usr/sbin/update-initramfs.distrib'
    dpkg: error processing archive /var/cache/apt/archives/live-tools_1%3a20190831.1_all.deb (--unpack):
     new live-tools package pre-installation script subprocess returned error exit status 2
    Errors were encountered while processing:
     /var/cache/apt/archives/live-tools_1%3a20190831.1_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    root@ubuntu:~#
    Last edited by georgesgiralt; 3 Weeks Ago at 07:18 PM. Reason: Forgot something

  2. #2
    Join Date
    May 2008
    Beans
    4,506
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Here's an alternative to explore:-
    If you have installed additional kernels in the virtual environment, they will be listed on the Kernel Tab. You can chose to use one of these as the boot kernel for your new live ISO.
    Full information here https://github.com/PJ-Singh-001/Cubic

  3. #3
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Why not a full install to USB flash drive. Then you can add/update everything.
    I have many USB flash drives, but now use an external SSD as so much faster and easier to use. Almost as fast as an internal SSD.

    I started with a USB to M.2 adapter for smaller M.2 SATA SSD that was in my desktop when I updated to a larger NVMe M.2 SSD. Worked so well, I do not plan purchase of any more flash drives as I already have many.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #4
    Join Date
    Apr 2008
    Beans
    367

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Thank you for your answer, Tea for One, but the proposed lead will help me make a *new* live ISO, not install a new kernel into my *live* installation (which is heavily modified post installation onto the USB stick). And as I plan to keep this usb stck for some time (at least for the duration of the LTS life, I will have to update kernel often during that period of time...
    Have a nice and bright day !

  5. #5
    Join Date
    Apr 2008
    Beans
    367

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Well, OldFred, I used this approach (using, too, an M.2 SSD, SATA version ) but the live USB stick with it's persistent partition has the advantage of being very small and can be used as a "normal" USB stick when not at home because of it's vfat partition....
    Can you teach a new trick to an old dog ?
    Thank you anyway.
    P.S. : have you heard about "live-toram" which is part of the live-tools package and allows you to install the live system onto RAM and be free from the USB stick ? I also forgot to add that a recent USB 3.2 16GB stick is reasonably fast and quite convenient to use. You should try it.
    Enjoy your day !
    Last edited by georgesgiralt; 3 Weeks Ago at 05:18 AM.

  6. #6
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Have not booted ISO from flash drive for a long time.
    I use grub2's loopmount to directly boot ISO and have used the toram parameter. You just need enough RAM to support size of ISO.
    I then have ISOs on almost all drives & external devices, along with full install on most. I do not think any still have standard Ubuntu as lighterweight flavors work better on smaller devices or low end systems.


    I have 3 256GB flash drives and have noticed one is faster than others. But my desktop's USB ports all are USB 3.1.

    And 2 128s, 3 64s, 4 32s, and even had full install on one of my 16GB. Lived near Microcenter store and behind counter were the flash drives. Just about could not get out of store without adding another flash drive as price lower or capacity higher.
    Several older USB2, too small for much, but found I could fit rEFInd on my first flash drive that is only 256MB.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #7
    Join Date
    Mar 2011
    Beans
    2,073

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    If your live usb boots an ISO, I don't know an easy solution (respin?). But if the USB was created by extracting the ISO contents to a FAT filesystem (not the persistent fs, the root fs), you might be able to replace the vmlinuz and intrd with the new ones. However, I don't know what comes built into the supplied vmlinuz, so check (nm?) and compare to the proposed replacement.

  8. #8
    Join Date
    Apr 2008
    Beans
    367

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Hello Ubfan1,
    Previously, I used the live-update-initramfs to create the proper initramfs for the new installed kernel then I copied it and le kernel into the casper directory, at initrd and vmliuz respectively. Of course, as this partition is mounted readonly under /cdrom, I have to make it under another OS (preferably Linux in order to mount the casper-rw to get the file I need) to copy them.
    But, I need to make the initramfs under the live system otherwise the initramfs is unusable not having the proper paths and modules included...
    So I need the live-tools in the live system

  9. #9
    Join Date
    May 2008
    Beans
    4,506
    Distro
    Ubuntu 24.04 Noble Numbat

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Quote Originally Posted by georgesgiralt View Post
    I'm making an USB stick with 24.04.1 LTS on it.
    Quote Originally Posted by georgesgiralt View Post
    P.S. : I need the latest kernel in order to test/make work very recent computers which will benefit from these updates.
    Just to offer another perspective.........
    Instead of creating one USB stick with one ISO to provide universal repair options, how about one USB stick with multiple ISO images.
    More flexibility guaranteed, even inc. Windows ISO.
    https://www.ventoy.net/en/doc_start.html
    Here is my list of ISO images
    Code:
    redact@gmktec:/media/redact/Ventoy$  ls
     boron-1-240123-amd64.hybrid.iso
     clonezilla-live-20240408-noble-amd64.iso
     efi-shell.img
     lubuntu-24.10-desktop-amd64.iso
     refind-flashdrive-0.14.0.2.img
     ubuntu-24.04.1-desktop-amd64.iso
     ubuntu-24.10-desktop-amd64.iso
     Win11_24H2_EnglishInternational_x64.iso
    redact@gmktec:/media/redact/Ventoy$

  10. #10
    Join Date
    Apr 2008
    Beans
    367

    Re: How to upgrade kernel on a live Ubuntu 24.04.1 LTS system ?

    Hi Tea For One,
    My problem does not lie with other variant of Linux on a USB stick, it is to have a stick with the latest kernel available on it in order to try and check if this particular new hardware is/will be working under a Linux brand (here Ubuntu).
    So whatever ISO I use, I will have to update the kernel or reinstall the new iso with the new kernel (if I create it using Cubic, for example), but this solution is a PITA because I also customise a lot my USB stick after I put the ISO onto it.

Page 1 of 2 12 LastLast

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
  •