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

Thread: What does update-initramfs do?

  1. #1
    Join Date
    Jun 2014
    Beans
    282

    What does update-initramfs do?

    While following the instructions here on how to disable the integrated webcam on my laptop, after typing:

    Code:
    sudo update-initramfs
    and getting an error message about possibly missing firmware in the terminal, when I decided to reboot, after the system had done starting up, I got another series of error messages prompting me to send diagnostic info to Canonical. I'm just wondering whether the update-initramfs command, which I am not familiar with, is to blame.

  2. #2
    Join Date
    Dec 2016
    Beans
    18

    Re: What does update-initramfs do?

    boot live cd same version to installation pc and try this
    sudo mount /dev/sdXY /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /dev/pts /mnt/dev/pts
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt
    update-initramfs -c -k x.x.x-xx-generic
    for example if your kernel system 4.4.0-31-generic
    update-initramfs -c -k 4.4.0-31-generic

  3. #3
    Join Date
    Dec 2007
    Beans
    12,533

    Re: What does update-initramfs do?

    Quote Originally Posted by kyknos12 View Post
    boot live cd same version to installation pc and try this
    sudo mount /dev/sdXY /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /dev/pts /mnt/dev/pts
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt
    update-initramfs -c -k x.x.x-xx-generic
    for example if your kernel system 4.4.0-31-generic
    update-initramfs -c -k 4.4.0-31-generic
    Please clarify what you mean by
    Code:
    sudo mount /dev/sdXY /mnt

  4. #4
    Join Date
    Dec 2016
    Beans
    18

    Re: What does update-initramfs do?

    Yes i know that but because I wrote from smartphone I did not see the options for code, Just now I saw the options go advanced options, next time I will bare it in mind

  5. #5
    Join Date
    Jun 2014
    Beans
    282

    Re: What does update-initramfs do?

    Quote Originally Posted by kyknos12 View Post
    boot live cd same version to installation pc and try this
    sudo mount /dev/sdXY /mnt
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /dev/pts /mnt/dev/pts
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt
    update-initramfs -c -k x.x.x-xx-generic
    for example if your kernel system 4.4.0-31-generic
    update-initramfs -c -k 4.4.0-31-generic
    To build slightly on what vasa1 has said, which sda partition should I mount? Cause there's sda, sda1, sda2, sda3, sda4, sda5, and sda6.

    Also, what am I doing here? Am I like updating the firmware? Didn't I already do that in the instructions above?

  6. #6
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: What does update-initramfs do?

    The title of your thread is "What does update-initramfs do?"
    One assumes you actually want an answer.

    initramfs is a tiny version of the OS that gets loaded by the bootloader, right after the kernel. It lives in RAM, and it provides *just* enough tools and instructions to tell the kernel how to set up the real filesystem, mount the HDD read/write, and start loading all the system services. It includes the stub of init, PID #1. If your initramfs is broken, your boot fails.

    update-initramfs is a script that updates initramfs to work with a new kernel. In the Debian universe, you shouldn't need to run this command manually except under very unusual circumstances - a post-install script automatically handles it for you when you install a new kernel package.

  7. #7
    Join Date
    Jun 2014
    Beans
    282

    Re: What does update-initramfs do?

    Quote Originally Posted by ian-weisser View Post
    update-initramfs is a script that updates initramfs to work with a new kernel. In the Debian universe, you shouldn't need to run this command manually except under very unusual circumstances - a post-install script automatically handles it for you when you install a new kernel package.
    So in the instructions in the link I provided on how to disable the integrated webcam from AskUbuntu, running the command:

    Code:
    sudo update-initramfs
    can be considered optional, am I right?

    If so, how do I reverse the damage (if any) after running sudo update-initramfs. Can I just go in /boot and delete the image that was created when I ran the command?

  8. #8
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: What does update-initramfs do?

    Changing (updating) the initramfs merely prevents some modules from being loaded. I'm not sure I would call that damage.

    DO NOT manually delete initramfs files unless you know what you are doing. _That_ would be damage. You might make your system un-bootable.

    Simply use modprobe to restore the kernel module, then update-initramfs again, then reboot. Your system should be back to where you began before your odyssey.

  9. #9
    Join Date
    Jun 2014
    Beans
    282

    Re: What does update-initramfs do?

    Quote Originally Posted by ian-weisser View Post
    Simply use modprobe to restore the kernel module, then update-initramfs again, then reboot. Your system should be back to where you began before your odyssey.
    Code:
    modprobe uvcvideo
    ?

    (uvcvideo being the name of the webcam driver.)
    Last edited by John_Patrick_Mason; March 26th, 2017 at 02:18 AM.

  10. #10
    Join Date
    Dec 2016
    Beans
    18

    Re: What does update-initramfs do?

    Quote Originally Posted by John_Patrick_Mason View Post
    To build slightly on what vasa1 has said, which sda partition should I mount? Cause there's sda, sda1, sda2, sda3, sda4, sda5, and sda6.

    Also, what am I doing here? Am I like updating the firmware? Didn't I already do that in the instructions above?
    Code:
    sudo mount /dev/sdX /mnt
    where your system
    System Lenovo_G510 i3-4100M 2,50ghz hd4600 with amd radeon m230 1GB hdd 1TB Ram 16GB
    OS Dual Boot windows 8 with Slackware 14.2 kernel 4.4.14
    By the way my Slackware live project https://sourceforge.net/projects/slackware-14-2-live/

Page 1 of 2 12 LastLast

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
  •