How to make a USB thumb drive boot and retain your work.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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!
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.