3

When I run a live distro from a USB drive, I want to access the USB key's file system to, for example, get files and copy to the USB drive, or copy files from the USB key to another filesystem.

Is this possible? Any help is appreciated.

Zanna
  • 70,465

3 Answers3

3

Remount cdrom to get write access to /cdrom

+1 to @MihaiRotaru's comment,

sudo mount -o remount,rw /cdrom

Remounting works, but root will own /cdrom and its content. This means that it will work to write with sudo.

Explanation and discussion

  • Here we are talking about a live (live-only) Ubuntu or Ubuntu family flavour that is extracted from an iso file into a FAT32 file system in a partition in a USB pendrive or memory card. This method is used by Rufus and Unetbootin. You can make it yourself according to this link.

    • In a live-only drive with an Ubuntu family system, /cdrom is mounted read-only but can be remounted read-write.
    • In a persistent live Ubuntu family system, cdrom is mounted read-write, but there should also be a casper-rw file or partition, where it is more straight-forward to write (simply write in the home directory tree and it will be stored automatically).
  • A live system can also be created by cloning from an iso file onto the device of a USB pendrive or memory card. This method is used by the Ubuntu Startup Disk Creator and Disks and mkusb in Ubuntu and by Win32 Disk Imager (and Rufus in 'dd-mode') in Windows.

    • The cloned file system ISO 9660 is read-only by design and you cannot store anything in it.
    • You can create a partition 'behind' the cloned part and use the unallocated drive space for a partition, where you can store data.

    • If the Ubuntu version is 19.10 or newer and

    • if the partition has an ext2, ext3 or ext4 file system and
    • if the partition has the label casper-rw

      it will be a persistent live system, where stored data, tweaks and installed programs will persist shutdown and reboot. This is described in this link.

sudodus
  • 46,324
  • 5
  • 88
  • 152
0

If you want to take a backup of your system drives then you will see its name as <storage space> Volume you can right click it, select mount and take a backup to another drive Do this process inthe file manager gui

0

Yes, it is possible. Let's say you are running Ubuntu Live USB. You will have to know the name of the file in /dev that the kernel gave to your USB drive. Open a terminal and run the following command:

lsblk

It will list all the drives detected by the kernel and some information about them, such as their size. Find yours by looking at its size. It should be something like /dev/sdb1. Now run:

mount

This will list all the mount points and theirs respective devices. Find /dev/sdb1 (or whatever your USB drive is) in a line like /dev/sdb1 on /some/path. /some/path is our mount point. Open a file manager and type this path in the address bar. Press ENTER and you will be inside your USB root. Create a directory to put your files in, so they won't be confused with the live system's files.

EDIT: sorry if it was confusing to you. As an Arch Linux user I am used to do almost everything through command line. If you just open Nautilus, your USB drive should already be there, in the left bar. Just click it and you will be inside it. You can follow the command line method anyway to learn the "hardcore" way.

Zanna
  • 70,465
Eduardo Cola
  • 5,817