multibootusb icon indicating copy to clipboard operation
multibootusb copied to clipboard

unable to update kali Linux with persistence

Open Dorifer opened this issue 7 years ago • 4 comments

(not a mbusb bug per se but related)

Ive installed kali linux with mbusb with encrypted persistence in a seperate partition. When trying to upgrade my packages configuring one package fails: Setting up e2fsprogs (1.43.8-2) ... update-initramfs: deferring update (trigger activated) cp: cannot create regular file '/lib/live/mount/medium/live/vmlinuz.new': No such file or directory dpkg: error processing package e2fsprogs (--configure): installed e2fsprogs package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: e2fsprogs E: Sub-process /usr/bin/dpkg returned an error code (1)

The directory the package is looking for is actually in the multibootusb/kali-linux-2017.3-amd64/live/ directory.

Any ideas?

Dorifer avatar Jan 18 '18 12:01 Dorifer

When looking into this further, I think it may have something to do with using the "multibootusb" program and how it stores the files compared to where Kali is looking when trying to update.

It appears that it fails when trying to find/create the directory at cp: cannot create regular file '/lib/live/mount/medium/live/vmlinuz.new': No such file or directory. This file is actually located at: /lib/live/mount/medium/multibootusb/kali-linux-2018-amd64/live/vmlinuz if you used "multibootusb" to build your usb drive (from www.multibootusb.org). I'm not sure how to tell Kali to look/write to a different directory so the update will finalize and finish successfully? Any ideas?

ryancdavis avatar Mar 14 '18 05:03 ryancdavis

Hi Dorifer -

Ok, after messing around for a little bit (sorry, I am slightly unfamiliar with Linux), I seem to have found a work around. My goal was to get the directories to mirror each other - specifically to get the new folder named "live" that I created at /lib/live/mount/medium/live to mirror the working directory at /lib/live/mount/medium/multibootusb/kali-linux-2018-amd64/live.

I am not sure if the way I ended up getting this to work is the "best way" (or the more efficient way to do this), but it seems to have worked (see below).

So, originally I tried to create a symlink to get the directories to reference and mirror each other (the directories I referenced above). Unfortunately, FAT32 doesn't support symlinks, so this didn't work. So, I started thinking about the "fstab" file (used to mount/reference drives and directories). The "fstab" file for me was located at: ~/etc/fstab. So, what I did is add the following line to the end of my "fstab" file: /lib/live/mount/medium/multibootusb/kali-linux-2018-amd64/live /lib/live/mount/medium/live none bind 0 0. Your location may be a little different, but just substitute accordingly. Then, I rebooted and re-ran the update scripts again and everything worked great! No errors now!

Unfortunately, like I mentioned before, I am not sure if this is a good, clean way to do this or not - but it is working for now.

Maybe someone with some experience with Kali and multibootusb could provide some feedback on if this is a good or bad way to work around the update issue?

Hopefully, this helps you out and at least gets you going for now.

ryancdavis avatar Mar 14 '18 06:03 ryancdavis

The latest version 9.2.0 has introduced new persitence method. Please try with latest release and it should work.

mbusb avatar Apr 05 '18 16:04 mbusb

The latest version 9.2.0 has introduced new persitence method. Please try with latest release and it should work.

Well, I just tried with the latest version and it is not working for me. In my usb drive I could set 4Gb of persistence. The process of writing the iso into de usb and boot with it is ok. But when I boot kali with persistence support and create a directory there, in the next boot it is disappearing.

cvgaviao avatar Nov 14 '20 13:11 cvgaviao