Announcement

Collapse
No announcement yet.

Kubuntu LiveUSB update-initramfs problem

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

    Kubuntu LiveUSB update-initramfs problem

    I have managed to succesfully create a Kubuntu LiveUSB with KDE 3.5 and 4.0

    The problem I am having is that When it comes to updating the kernel I get package breakages in Adept, all other updates update fine.

    I then goto console and run:

    Code:
    sudo dpkg --configure -a
    and I get this:

    Code:
    Setting up linux-image-2.6.24-19-generic (2.6.24-19.36) ...
    Running depmod.
    update-initramfs is disabled since running on a live CD
    Failed to symbolic-link /boot/initrd.img-2.6.24-19-generic to initrd.img.
    dpkg: error processing linux-image-2.6.24-19-generic (--configure):
     subprocess post-installation script returned error exit status 17
    dpkg: dependency problems prevent configuration of linux-restricted-modules-2.6.24-19-generic:
     linux-restricted-modules-2.6.24-19-generic depends on linux-image-2.6.24-19-generic; however:
     Package linux-image-2.6.24-19-generic is not configured yet.
    dpkg: error processing linux-restricted-modules-2.6.24-19-generic (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     linux-image-2.6.24-19-generic
     linux-restricted-modules-2.6.24-19-generic
    "update-initramfs is disabled since running on a live CD" being the most important part

    Seeing as it is a LiveUSB with Persistence on, how can I enable update-initramfs? or is there any way to update the kernel manually by copying files here and there and changing some config scripts?

    Any help on this would be most appreciated

    #2
    Re: Kubuntu LiveUSB update-initramfs problem

    I've read your post and have been thinking about it with no ideas yet.
    We have at least a few other ”USB persistent” members who may have some ideas, too, should they pop in here.


    In the meantime, I messed around with mine here a bit, along the lines of what you are doing.
    8.04 persistent on USB flash drive, the two standard partitions, call them sdc1 (K8.04) and sdc2 (casper-rw).

    I booted up the flash drive, into 8.04 persistent, then did Adept, Fetch Updates, got the red triangle updater icon, selected it, and got 28 upgradeable packages, install 7, for 89 MB INCLUDING the new 2.6.24-19 (which is an upgrade from the 2.6.24-16 the flash drive was built with). I Applied these updates, and it went well.

    So ... what do I have now?
    I'm not sure at all.

    The menu.lst is located on sdc1 (/sdc1/boot/grub/menu.lst) and references the kernel in casper also on sdc1 (/sdc1/casper):

    title Kubuntu 8.04 LIVE Persistent
    root (hd0,0)
    kernel /casper/vmlinuz boot=casper ramdisk_size=1048576 root=/dev/ram rw quiet splash persistent
    initrd /casper/initrd.gz

    This kernel is the old one: 2.6.24-16.

    All the new updated stuff, including 2.6.24-19, is located on sdc2 = casper-rw, and are at the top level: /sdc2/vmlinuz.old and /sdc2/vmlinuz and same for /sdc2/initrd.img.old and /sdc2/initrd
    (where .old = -16 version, and the new ones are vmlinuz = -19 and initrd = -19). The /sdc2/boot directory also contains the new -19 kernel but does not contain the old one or any initrd files.

    While in the live session in the persistent flash drive,
    uname -a
    returned the -16 kernel.

    => So while Adept seemed to get the new kernel update (from -16 to -19), it appears that the flash drive is still booting from the old one -16.

    (rhetorical) Q: What would happen if I simply copied this new -19 kernel and initrd (possibly also having to rename them) into /sdc1/casper, replacing what's there? TODO ...
    I suppose that's what I should try next.
    (I also have the feeling that I need to understand all this somewhat better than I do – the build is easy, but some of these details are a bit unclear to me.)

    Frankly, at the end of the day, on the run, on a tight time budget here for projects this week, and I admit I need to look at this better, but thought I share this with you and with the other guys who I hope will look in here.



    Btw, I used my how-to on building the flash drive:
    Build a LIVE Kubuntu Flash Drive, How-To
    http://kubuntuforums.net/forums/inde...089474.new#new
    Step-by-step
    Written for 7.10 but applies perfectly for 8.04 (Reply #18) except possibly for that nasty bug:
    The BUG: It may be fixed now by the devs – see the sourceforge bug link in the how-to; if not, the fix is also in the how-to.
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: Kubuntu LiveUSB update-initramfs problem

      SpikoPath, looks like no one has come by here yet. My point to the above post was two-fold:
      1 Unlike your case, I was able to get Adept doing the update in a live USB session (but I have seen your issue before in other builds off the CD files) -- however, as I indicated, it looks like more work is required to make that kernel upgrade the one used by menu.lst that references casper on sdc1;
      2 Just a suggestion that you double check your building details, make sure the live persistent OS is all there just right (and a mention of that persistent casper bug that we think got fixed, according to an email notice I rec'd last week).

      (Here at 5 am, I haven't had a chance to do anything further, and I have appointments all day, into the afternoon. But there's another guy here who knows more specifically about initramfs-update than I.)
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #4
        Re: Kubuntu LiveUSB update-initramfs problem

        This is how I did my build:

        went to this site:

        http://www.pendrivelinux.com/2008/05...a-the-live-cd/

        followed everything up until copying files across, It didn't work for me as at the time the initrd file failed to work for 8.04.1
        busybox stuff, anyway.

        I then followed this:

        Copy these folder to USB stick root: casper disctree dists install pics pool preseed .disk
        Copy ALL files in isolinux folder to USB stick root
        Copy initrd.gz and vmlinuz in casper folder to USB stick root
        Copy md5sum.txt README.diskdefines ubuntu.ico to USB stick root
        Rename isolinux.cfg to syslinux.cfg
        From this forum:

        http://ubuntuforums.org/showthread.php?t=689482&page=2

        I figured how the syslinux.cfg worked then realised persistence was a problem with initrd and followed these instructions:

        1. Copy the /casper/initrd.gz file to a temporary directory
        2. Extract the contents: cd {temporary directory}sudo gzip -dc initrd.gz | cpio -i
        3. Find the file /scripts/casper and open it in an editor. Using a text editor that can display line numbers (like Kubuntu's Kate) is helpful.
        4. On line 406, delete the 9 characters in red: mount ${cowdevice} -t ${cow_fstype} -o rw,noatime,mode=755 /cow || panic "Can not mount ...
        5. Save the file.
        6. Recompress the file: sudo find . | cpio -o -H newc | gzip -9 > initrd.gz
        7. Replace the /casper/initrd.gz file with your now-patched initrd.gz file
        from this forum:

        http://www.gottabemobile.com/forum/f...p?TID=917&PN=2

        Comment


          #5
          Re: Kubuntu LiveUSB update-initramfs problem

          Looks like you did it correctly. The pendrivelinux how-to has been very popular. The last 7 steps you listed fixed the initrd file. You are booting with Syslinux instead of GRUB, but that's not any problem (I modified my how-to to boot from GRUB, or boot from dedicated GRUB partition, but as I say, that's just personal preference and makes no difference). I'm still not sure what's caused your problem and am being distracted today with appointments, as I said, but maybe someone else will think of something in the meantime.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Kubuntu LiveUSB update-initramfs problem

            copying the linux kernel into casper or even root and pointing syslinux.cfg to that kernel has worked

            uname -a reports 19 not 16, we are getting somewhere

            although now I get no sound and my wireless seems to act up

            I do an apt-get update and upgrade and it wants to update the restricted modules still

            I'd love to be able to just unpack them all and do what initramfs-update would do for them seeing as it is disabled.

            Comment


              #7
              Re: Kubuntu LiveUSB update-initramfs problem

              "copying the linux kernel into casper or even root and pointing syslinux.cfg to that kernel has worked ...
              uname -a reports 19 not 16, we are getting somewhere ... "

              As I indicated in Reply #1, that's what I need to try next -- many thanks for your feedback here, and I'm glad that got -19 going. I'm pretty sure it will work on mine, too, and that's a lesson: menu.lst refers to /casper/vmlinuz ** located in the main OS partition ** and not in casper-rw, which when you think about it, that's exactly how it should be! -- although the new kernel updates are thrown into casper-rw.


              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #8
                Re: Kubuntu LiveUSB update-initramfs problem

                *Bump*

                Does anyone know how update-initramfs is disabled on a LiveCD, is it anything to do with initrd.gz?

                So far I've managed to copy over the latest kernel vmlinuz into the casper folder of the USB stick and all is well but adept still wants to update the packages of linux-headers*

                Comment


                  #9
                  Re: Kubuntu LiveUSB update-initramfs problem

                  A bit of digging has revealed that the /usr/sbin/update-initramfs script is a stub on the live CD (or the bootable USB drive made from a live CD). The original version can be found in:

                  /rofs/usr/sbin/update-initramfs

                  so you can (as root):

                  mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old

                  and then:

                  ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs

                  After this, you can successfully upgrade the kernel, and the restricted modules. Looks like the only problem remaining is the hal... I'll look into that a bit deeper.

                  Hope this helps.

                  silica

                  Update: hal problem solved. As root

                  killall hald

                  Then, apt-get upgrade should complete without problems on the installation.

                  silica

                  Comment


                    #10
                    Re: Kubuntu LiveUSB update-initramfs problem

                    Silica – thanks for that. And welcome to the forum.

                    I don't recall ever having seen that, though lots of folks do wonder about how not-up-to-date their flash drive build is when loaded from the Live CD. Interesting. I'll try to get time to test it on my 8.04 live persistent flash drive, and maybe others can as well and report here. If this works ( ), it should be added to the how-to I mentioned in Reply #1.

                    Welcome & Thanks, again, silica!


                    (PS silica -- Of course, I wouldn't want my how-to all butchered up , but I'd welcome your review/critique/suggested improvements of it, should you care to do that sometime. I basically copied/modified/simplified others, except I did it with GRUB; elsewhere (somewhere here) I've done one using a separate GRUB partition on the flash drive (partition 0) that boots either Kubuntu on partition 1 or Ubuntu on partition 2; and of course, either/both those could be made persistent, as well).

                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #11
                      Re: Kubuntu LiveUSB update-initramfs problem

                      It does not work for me . I can not install any application after i updated my system via manager.

                      Here an example if i want install kopete:

                      Richte linux-image-2.6.27-7-generic ein (2.6.27-7.16) ...
                      Running depmod.
                      update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
                      Failed to symbolic-link boot/initrd.img-2.6.27-7-generic to initrd.img.
                      dpkg: Fehler beim Bearbeiten von linux-image-2.6.27-7-generic (--configure):
                      Unterprozess post-installation script gab den Fehlerwert 17 zurück
                      Fehler traten auf beim Bearbeiten von:
                      linux-image-2.6.27-7-generic
                      E: Sub-process /usr/bin/dpkg returned an error code (1)

                      Anybody an idea?

                      Toni

                      Comment


                        #12
                        Re: Kubuntu LiveUSB update-initramfs problem

                        I am also having the same problem. The provided fix does not work for me either.

                        apt-get upgrade
                        Reading package lists... Done
                        Building dependency tree
                        Reading state information... Done
                        0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                        1 not fully installed or removed.
                        After this operation, 0B of additional disk space will be used.
                        Do you want to continue [Y/n]? y
                        Setting up linux-image-2.6.27-7-generic (2.6.27-7.16) ...
                        Running depmod.
                        update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
                        Failed to symbolic-link boot/initrd.img-2.6.27-7-generic to initrd.img.
                        dpkg: error processing linux-image-2.6.27-7-generic (--configure):
                        subprocess post-installation script returned error exit status 17
                        Errors were encountered while processing:
                        linux-image-2.6.27-7-generic
                        E: Sub-process /usr/bin/dpkg returned an error code (1)


                        I also am not able to install any applications like skype. It fails indicating the same symbolic link error.

                        Comment


                          #13
                          Re: Kubuntu LiveUSB update-initramfs problem

                          Originally posted by briant97
                          I am also having the same problem. The provided fix does not work for me either.

                          apt-get upgrade
                          Reading package lists... Done
                          Building dependency tree
                          Reading state information... Done
                          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                          1 not fully installed or removed.
                          After this operation, 0B of additional disk space will be used.
                          Do you want to continue [Y/n]? y
                          Setting up linux-image-2.6.27-7-generic (2.6.27-7.16) ...
                          Running depmod.
                          update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
                          Failed to symbolic-link boot/initrd.img-2.6.27-7-generic to initrd.img.
                          dpkg: error processing linux-image-2.6.27-7-generic (--configure):
                          subprocess post-installation script returned error exit status 17
                          Errors were encountered while processing:
                          linux-image-2.6.27-7-generic
                          E: Sub-process /usr/bin/dpkg returned an error code (1)


                          I also am not able to install any applications like skype. It fails indicating the same symbolic link error.
                          After following all of the steps here I ran into this same problem.

                          I was able to fix it fairly easily for kernel 2.6.24-19

                          Code:
                          sudo su
                          cd /
                          mv initrd.img initrd.img.bak
                          ln -s /boot/initrd.img-2.6.24-19-generic initrd.img
                          apt-get upgrade
                          It may have been coindicental that this fixed my problem.

                          The upgrade was successful after manually creating the symbolic link manually, although the permissions and ownership of the link are exactly the same as they were before.

                          EDIT: After taking a closer look at the links it seems that the original one was a slightly different reference...

                          Code:
                          lrwxrwxrwx  1 root root  34 2008-12-27 07:29 initrd.img -> /boot/initrd.img-2.6.24-19-generic
                          lrwxrwxrwx  1 root root  34 2008-12-27 06:41 initrd.img.bak -> /boot/initrd.img-2.6.24-22-generic
                          lrwxrwxrwx  1 root root  33 2008-07-02 10:52 initrd.img.old -> boot/initrd.img-2.6.24-19-generic
                          It looks like the old link was referencing boot/initrd.img relative to the current path instead of /

                          I was also having an issue upgrading cups.

                          Code:
                          root@ubuntu:/usr/sbin# apt-get install debian-helper-scripts
                          Reading package lists... Done
                          Building dependency tree   
                          Reading state information... Done
                          The following packages were automatically installed and are no longer required:
                           linux-headers-2.6.24-19-generic linux-headers-2.6.24-19
                          Use 'apt-get autoremove' to remove them.
                          The following NEW packages will be installed:
                           debian-helper-scripts
                          0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
                          3 not fully installed or removed.
                          Need to get 12.3kB of archives.
                          After this operation, 143kB of additional disk space will be used.
                          Get:1 [url]http://ubuntu.mirror.rafal.ca[/url] hardy/universe debian-helper-scripts 0.10ubuntu3 [12.3kB]
                          Fetched 12.3kB in 0s (44.6kB/s)    
                          Selecting previously deselected package debian-helper-scripts.
                          (Reading database ... 116136 files and directories currently installed.)
                          Unpacking debian-helper-scripts (from .../debian-helper-scripts_0.10ubuntu3_all.deb) ...
                          Setting up cupsys (1.3.7-1ubuntu3.2) ...
                          Reloading AppArmor profiles : done.
                           * Starting Common Unix Printing System: cupsd
                          /usr/sbin/cupsd: error while loading shared libraries: /lib/tls/i686/cmov/libc.so.6: cannot apply additional memory protection after relocation: Permission denied
                          invoke-rc.d: initscript cupsys, action "start" failed.
                          dpkg: error processing cupsys (--configure):
                           subprocess post-installation script returned error exit status 127
                          dpkg: dependency problems prevent configuration of hplip:
                           hplip depends on cupsys (>= 1.1.20); however:
                           Package cupsys is not configured yet.
                          dpkg: error processing hplip (--configure):
                           dependency problems - leaving unconfigured
                          dpkg: dependency problems prevent configuration of hpijs:
                           hpijs depends on hplip (>= 2.8.2-0ubuntu8.1); however:
                           Package hplip is not configured yet.
                          dpkg: error processing hpijs (--configure):
                           dependency problems - leaving unconfigured
                          Setting up debian-helper-scripts (0.10ubuntu3) ...
                          `/etc/apt/sources.list' -> `/etc/apt/sources.list.default'
                          
                          Errors were encountered while processing:
                           cupsys
                           hplip
                           hpijs
                          E: Sub-process /usr/bin/dpkg returned an error code (1)
                          Trying to start CUPS manually resulted in this error:

                          Code:
                          root@ubuntu:/usr/sbin# sudo cupsd -f
                          cupsd: error while loading shared libraries: /lib/tls/i686/cmov/libc.so.6: cannot apply additional memory protection after relocation: Permission denied
                          I was able to fix this error as follows.

                          Code:
                          sudo aa-complain /usr/sbin/cupsd
                          sudo apt-get upgrade
                          CUPS stopped complaining after that! Credit is due here (https://bugs.launchpad.net/ubuntu/+s...er/+bug/131976) for that bug workaround.

                          Comment


                            #14
                            Re: Kubuntu LiveUSB update-initramfs problem

                            Originally posted by briant97
                            I am also having the same problem. The provided fix does not work for me either.

                            apt-get upgrade
                            Reading package lists... Done
                            Building dependency tree
                            Reading state information... Done
                            0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
                            1 not fully installed or removed.
                            After this operation, 0B of additional disk space will be used.
                            Do you want to continue [Y/n]? y
                            Setting up linux-image-2.6.27-7-generic (2.6.27-7.16) ...
                            Running depmod.
                            update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
                            Failed to symbolic-link boot/initrd.img-2.6.27-7-generic to initrd.img.
                            dpkg: error processing linux-image-2.6.27-7-generic (--configure):
                            subprocess post-installation script returned error exit status 17
                            Errors were encountered while processing:
                            linux-image-2.6.27-7-generic
                            E: Sub-process /usr/bin/dpkg returned an error code (1)


                            I also am not able to install any applications like skype. It fails indicating the same symbolic link error.
                            I was able to get it to work on ubuntu 8.10 live usb by running

                            sudo update-initramfs -u

                            Comment


                              #15
                              Re: Kubuntu LiveUSB update-initramfs problem

                              I am testy jaunty and kde 4.2 and tried this to no avail. My error message was this:

                              Setting up linux-image-2.6.28-4-generic (2.6.28-4.11) ...
                              Running depmod.
                              update-initramfs is disabled since running on a live CD
                              Failed to symbolic-link /boot/initrd.img-2.6.28-4-generic toinitrd.img.
                              dpkg: error processing linux-image-2.6.28-4-generic (--configure):
                              subprocess post-installation script returned error exit status 17
                              Setting up linux-image-2.6.28-6-generic (2.6.28-6.17) ...
                              Running depmod.
                              update-initramfs is disabled since running on a live CD
                              Failed to symbolic-link /boot/initrd.img-2.6.28-6-generic toinitrd.img.
                              dpkg: error processing linux-image-2.6.28-6-generic (--configure):
                              subprocess post-installation script returned error exit status 17
                              Errors were encountered while processing:
                              linux-image-2.6.28-4-generic
                              linux-image-2.6.28-6-generic
                              E: Sub-process /usr/bin/dpkg returned an error code (1)

                              I tried using this command :

                              sudo update-initramfs -u

                              and was told again that:
                              update-initramfs is disabled since running on a live CD

                              However the advice from the bug report here :
                              https://bugs.launchpad.net/ubuntu/+s...er/+bug/292159

                              says

                              Currently, "sudo apt-get upgrade" is forever broken, because it always tries & fails to install the kernel update. This is a huge turn-off for anyone trying out "usb-creator"-built persistent USB installations.
                              :: Workaround ::
                              Workaround discussed here: http://kubuntuforums.net/forums/index.php?topic=3096170
                              in brief
                              "A bit of digging has revealed that the /usr/sbin/update-initramfs script is a stub on the live CD (or the bootable USB drive made from a live CD). The original version can be found in:
                              /rofs/usr/sbin/update-initramfs
                              so you can (as root):
                              mv /usr/sbin/update-initramfs /usr/sbin/update-initramfs.old
                              and then:
                              ln -s /rofs/usr/sbin/update-initramfs /usr/sbin/update-initramfs

                              This worked our at least seemed to
                              Let me know if that gets you out of a spin and we can marked it solved or not

                              Running Kubuntu Karmic Koala&nbsp; with KDE 4.3 at home<br /><br />Kubuntu user 24342<br /><br />Running Dell Inspiron 530 Dual Core 3ghz<br /><br />and also running Kubuntu on a Lenovo thinkpad using a live pen drive<br /><br />Still no Microsoft here!

                              Comment

                              Working...
                              X