LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to make a USB thumb drive boot and retain your work. (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-make-a-usb-thumb-drive-boot-and-retain-your-work-4175674686/)

cold iron 05-06-2020 08:00 AM

How to make a USB thumb drive boot and retain your work.
 
I hope this is the right stop to write this. You may delete it.

This worked on Parrot and Kali 2019, could not make it work on Kali 2020.
If you have to use sudo, I did this sudo -i bash, that stopped the need for each line of text. But if you close the terminal, you will need to redo it.
I make no claims this will work for you, it did for me.
So after your load your Kali on a USB drive, boot to LIVE.

Now type.
fdisk -l this will show all the partitions. I had 3, it's the 3 rd one we are working on.

fdisk /dev/sdb

#now it will ask you for command, type n and hit enter
Now press enter 4 more times, and type w and hit enter.
#we have successfully created the partition.

fdisk -l chk for sdb3

mkfs.ext4 -L persistence /dev/sdb3 wait a bit

e2label /dev/sdb3 persistence

mkdir -p /mnt/duke or any name I used duke.

mount /dev/sdb3 /mnt/duke

echo “/ union” > /mnt/duke/persistence.conf this may not work.

umount /dev/sdb3
exit



NOW DO THIS IS ABOVE FAILS.

must be in sdb3 or your last part.), If you have 3 partitions. otherwise persistence will not work. You may have 2, just make sure what you have.

Create a new mount point called your choice, I use duke.

sudo mkdir -p /mnt/duke
Mount your USB persistence partition to duke. Reminder: Your persistence partition may not be sdb2, please ensure you mount the right one.

sudo mount /dev/sdb2 /mnt/duke

Create a new file called persistence.conf using the nano text editor.

sudo nano /mnt/duke/persistence.conf

In this file, type / union. enter

/mnt/duke/persistence.conf enter

/ union enter

Save the file and exit. (Press CTRL + X, press Y, then press ENTER).

Now unmount your persistence partition. Reminder: Your persistence partition may not be sdb2, please ensure you unmount the right one.
sudo umount /dev/sdb2

We’re done! I would make a fold just to test it is still there after you boot so you know it works.

YOU MUST BOOT TO PERSISTENCE ON MENU, IF YOU GET BLACK SCREEN TYPE EXIT, maybe twice.
IT WILL BOOT BUT IT'S VERY SLOW.

fatmac 05-06-2020 12:32 PM

AntiX & MX Linux will also boot with persistence, based on Debian, & fairly easy to set up. :)

Other distros, I believe, will also work. ;)

cold iron 05-14-2020 07:47 AM

I was not looking for any help or guidance, it is/was just info for anyone wanting to try installing a working Linux OS on a USB thumb drive.
There is nothing to resolve!

ondoho 05-14-2020 04:25 PM

Quote:

Originally Posted by cold iron (Post 6122800)
I was not looking for any help or guidance, it is/was just info for anyone wanting to try installing a working Linux OS on a USB thumb drive.
There is nothing to resolve!

Neither did fatmac explicitely offer anything of the kind; just pointing out that it works on other distros, even ootb.


All times are GMT -5. The time now is 10:15 AM.