0

I am using Kali Linux on a bootable USB with persistence. I have updated it using all the update/upgrade/dist-upgrade commands. When I tried to install VMware I noticed a problem with the kernel. It was still looking for the old version and therefore VMware will not open. By typing uname -r, I see that Linux is booting on 4.9.0-kali3-amd64 and not on 4.9.0-kali4-amd64 and when VMware runs it cannot find 4.9.0-kali3-amd64 as the update/upgrade downloaded the new kernel I guess. After I looked for solutions on the internet I found that because it is running on Live USB with persistence even after the update the kernel that Linux will boot on is the one from the downloaded ISO. But then I found this post: How to change the boot kernel of a usb live w/ persistent running Kali. This guy seems to have found a solution but I cannot really understands the steps he followed, more precisely I dont understand from where he moved initrd.img and vmlinuz to where. Can anyone elaborate?

1

I just followed his instructions and it does work with a few changes, below are the steps from the link you provided and my comments are in bulletpoints.

  1. I first moved the initrd.img and vmlinuz from the /live folder on my usb to my desktop (for backup).

    • Make a backup of the files mentioned in ./lib/live/mount/persistence/sdxx/live. Note sdxx may vary.
  2. I then copied the initrd.img-4.9.0-kali4-amd64 and vmlinuz from my usb's persistence rw root folder to the /live folder.

    • copy files from ./boot/ to the location mentioned above.
  3. I renamed these to initrd.img and vmlinuz and rebooted. Voilà

    • The rename task will vary depending on version I think, I did this using kali 2017.2 and found that the old kernel was booting using the full file name, initrd.img-4.12.0-kali1-amd64, not just initrd.img.

You maybe able to get away with renaming the new boot files to be exactly the same as the old ones. I didn't try this, instead I went to ./lib/live/mount/persistence/sdxx/boot/grub and created a new entry in grub.cfg to point to the updated initrd.img and vmlinuz files

  • Thank you @Camels for detailed explanation. How did you manage to copy files into ./lib/live/mount/persistence/sdxx/live folder in step 2? I tried that but it says that that folder is read-only. – bumbu Oct 14 '17 at 15:47

protected by Community Sep 15 '18 at 12:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.