kali linux on a usb as a fixing utility

captain-sensible

Well-Known Member
Joined
Jun 14, 2019
Messages
2,910
Reaction score
1,973
Credits
18,114
i use Arch Linux on my laptop and as fairly widely reported recently a new grub ,broke a few peoples Os's including mine.
This grub:
Code:
[andrew@darkstar:~]$ pacman -Qi grub                                      (09-03 14:55)
Name            : grub
Version         : 2:2.06.r322.gd9b4638c5-3

Actually it was not the action of installing the new grub but the commands :
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --recheck

grub-mkconfig -o /boot/grub/grub.cfg

that did the damage. Anyway i found myself for the first time not being able to my Arch OS. There are a few approaches , the one that i did on the last fix was to evoke timeshift from a live os on a usb stick.

[Now a prerequisite is to make sure you have recent timeshift snapshots somewhere accessible [ I have mine on a 32gig SD card, so its always there ready to use ]

Now i have a few tools at hand when things go wrong on one ventoy formatted stick including super grub rescue

Anyway use of rEFInd , super grub and a few other tools didn't work. So the next obvious choice was to boot up a live OS from a usb stick . I also have a few choices on that one. I had recently put a recent 64 bit iso of Mint onto a ventoy stick.
Now to be fully useful a live OS , on a usb stick needs to have persistence, because you never know what tools you might need and its a pain to keep installing them.

Witrh Mint i got a " couldn't mount blah blah on /cow " for the persistence file. The thread about that is here:

ventoy problems with persistence file




To cut a long story short , that means the live Mint would not be able to use the persistence file. mmm Welcome back kali .

I show how to set up kali live with persistence here: Kali on usb via ventoy

Here is the structure of my usb stick which has the label ventoyNew :


Code:
[andrew@darkstar:media/andrew]$ tree -L 2 ventoyNew                                                                                                           (09-03 15:01)
ventoyNew
├── ISO
│   └── kali-linux-2021.1-live-amd64.iso
├── persistence.dat
└── ventoy
    └── ventoy.json

2 directories, 3 files
[andrew@darkstar:media/andrew]$

here is the code of the file venoy.json:

Code:
{


"control": [
{ "VTOY_DEFAULT_MENU_MODE": "0" },
{ "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
{ "VTOY_DEFAULT_SEARCH_ROOT": "/ISO" }
],



"persistence": [
{
"image": "/ISO/kali-linux-2021.1-live-amd64.iso",
"backend": "/persistence.dat"
}
]



}


now you see that persistence.dat thats a file you have to create using one of the ventoy scripts, and that the file that is going to store changes. How did i get on when i booted and choose "boot with persistence option" ? No problem.

First a quick check , of the parent that kali-linux-2021.1-live-amd64.iso is based on.

Code:
──(kali㉿kali)-[~]
└─$ cat /etc/*-release
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2021.1"
VERSION_ID="2021.1"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
quick look at sources list :

Code:
──(kali㉿kali)-[~]
└─$ cat /etc/apt/sources.list                                               100 ⨯
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free

ok first I ran :

Code:
sudo apt update


then :

Code:
apt install  software-properties-common


then
Code:
sudo add-apt-repository ppa:teejee2008/timeshift      -y




lastly



Code:
sudo apt install timeshift


Right next time i have a problem , i can boot kali , hopefully it remembers wifi passphrase. I'm sure timeshift will be there because geany is not installed by default and when i booted up (before installing timeshift ) geany was there available in the applications.SO basically i have access to a live Os, that has timeshift installed ( i beleive its installed on Mint as default) but also anything else needed,i can install and it will be there next time for use. So in my recent dabblings kali Linux comes out in top above Mint
 

Attachments

  • timeshift-installed-and-snapshots-on-sd-located.jpg
    timeshift-installed-and-snapshots-on-sd-located.jpg
    166 KB · Views: 190
Last edited:


Any recent Puppy Linux is the way to go. IMO one serves the self better learning Puppy for troubleshooting.
 
will have to have a look sometime key is whether the iso can handle a .dat file

But is puppy good due to tools , or that it breaks so often , you quickly learn to fix things ? :^)
 
Last edited:

Members online


Latest posts

Top