LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Running Linux off USB. How to save files to USB? (https://www.linuxquestions.org/questions/linux-newbie-8/running-linux-off-usb-how-to-save-files-to-usb-4175501529/)

eatup 04-13-2014 07:35 AM

Running Linux off USB. How to save files to USB?
 
I'm running Linux Mint live distro off a USB drive. How do I save files to the USB drive for later use? (PS, I didn't allocate any space for "persistence" when creating the bootable USB from ISO. If I recreate the USB with "persistence", will Mint load newly installed programs the next time it boots?)

goumba 04-13-2014 07:44 AM

I don't have much experience with casper, but if you have enough room left over on the drive, try creating a file called casper-rw (I think it's called) in the root directory of the USB drive. Add "persistent" to the kernel boot command line.

Other options:

1. Recreate the drive, saving room for persistence (probably your easiest).
2. Create an additional partition on the drive, and save files to that partition before you exit.
3. Create an additional partition and bind mount it to your home directory. This would have to be done every time you boot, and can be a PITA.

Casper makes me appreciate Debian's persistence. Create a partition, label it persistence, add a .conf and done. It also provides more control.

yancek 04-13-2014 09:03 AM

Creating the bootable flash with unetbootin or pendrivelinux and adding persistence would probably be easiest.

You could also create an additional partition on the flash for persistence. From a GParted CD or a Linux system which contains GParted, open gparted and resize the first partition to just over the iso file size, create a second ext2 partition with the rest of the flash and make sure the Label is casper-rw. Click the partition to highlight it in the main GParted window, click on the Partition tab and then click Label and enter casper-rw.

eatup 04-13-2014 09:23 AM

I'm running Linux Mint. Recreated the USB with persistence. How do I mount or access the persistent part? Tried saving a file in Documents. I was gone when I rebooted...

goumba 04-13-2014 09:25 AM

How did you do it? With unetbootin, it should have been done automatically, but make sure that "persistent" is included on the kernel command line at boot (highlight the selection, press Tab, add it if necessary).

eatup 04-13-2014 09:28 AM

^ It sucks to have to type that on every boot. Is there a way to permanently add persistent?

goumba 04-14-2014 07:08 AM

Yeah... I don't remember which bootloader unetbootin uses, I think it's syslinux (?).

Look at the files in /boot/syslinux on the USB drive. The files you're interested in end in .cfg, check syslinux.cfg then look for something like live.cfg. You're looking for a section that starts with the menu entry you select to boot the live system; so if you choose "Linux Mint", look for a line similar to "label Linux Mint", etc.. Now, find the first line following that starts with "append" and at the end of that line, add "persistent" to the end. Save, and boot.

yancek 04-14-2014 10:35 AM

A more detailed explanation of what I suggested in my last post is at the link below. It is at the Ubuntu site but applies equally to Mint. You need to post a little more detail on how you are trying to accomplish this. I've used this on a number of different Ubuntu derivatives including Mint and it works.

https://wiki.ubuntu.com/LiveUsbPendrivePersistent


All times are GMT -5. The time now is 09:48 AM.