LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-06-2020, 08:00 AM   #1
cold iron
LQ Newbie
 
Registered: Apr 2020
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 05-06-2020, 12:32 PM   #2
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,505

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

Other distros, I believe, will also work.
 
Old 05-14-2020, 07:47 AM   #3
cold iron
LQ Newbie
 
Registered: Apr 2020
Posts: 2

Original Poster
Rep: Reputation: Disabled
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!
 
Old 05-14-2020, 04:25 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by cold iron View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying ISO to thumb drive using 'dd' causes thumb drive to be read-only? ahc_fan Linux - General 8 01-15-2019 08:10 AM
dd to copy a thumb drive which I am live booted on to another thumb drive DrinkinHomeBrew Linux - Newbie 3 01-26-2015 04:52 PM
Only root can automount CD drive and USB thumb drive km4hr Red Hat 3 03-25-2009 12:30 PM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 06:36 PM
USB thumb drive works great, but I still can't get my USB mouse to work. blk96gt Slackware 8 06-22-2004 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration