Results 1 to 8 of 8

Thread: How to access files from pendrive when used as live usb

  1. #1
    Join Date
    May 2012
    Beans
    2

    How to access files from pendrive when used as live usb

    Hello,

    I have recently installed Ubuntu 12.04 on a live pendrive. It works great, but i'm not able to access the files stored in the pendrive while i'm in ubuntu. Please Help.

  2. #2
    Join Date
    May 2012
    Beans
    2

    Re: How to access files from pendrive when used as live usb

    Can i proceed as shown in http://www.pendrivelinux.com/sharing...e-and-windows/. I'm using ubuntu 12.04 and article is for upto 11.10.

  3. #3
    Join Date
    Jul 2010
    Location
    /run/shm
    Beans
    825
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How to access files from pendrive when used as live usb

    When you use a USB drive as a LiveUSB, you can issue this to remount it as writable then proceed to modify it
    Code:
    sudo mount -o rw,remount,umask=000 /cdrom
    I think that is where it was, just poke in the first level / directories, the one that has the same stuff as the USB is the one you need.
    Last edited by Lisiano; May 15th, 2012 at 10:52 AM.
    Quote Originally Posted by Linus Torvalds
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

  4. #4
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,791
    Distro
    Ubuntu Development Release

    Re: How to access files from pendrive when used as live usb

    Quote Originally Posted by Hanzel Jesheen View Post
    I have recently installed Ubuntu 12.04 on a live pendrive. It works great, but i'm not able to access the files stored in the pendrive while i'm in ubuntu. Please Help.
    When using a "live pendrive" (with persistance), the files you save are saved into a file called "casper-rw" which is present in the root of the pen drive.

    The files you create are present in casper-rw/home/ubuntu/.

    To mount casper-rw in LINUX, you can use the following commands
    Code:
    sudo mount -o loop /media/pendrive/casper-rw  /mnt
    (Replace "pendrive" with the mount directory of your pendrive).

    This means that files saved your live "desktop" will now be available at /mnt/home/ubuntu/Desktop/

    Don't forget to UNMOUNT when done!
    Code:
    sudo umount /mnt
    If you want to be able to access these files in WINDOWS, then you cannot save it to the default location in the live session (/home/ubuntu/). Instead, save/copy it to "/cdrom" (though you need elevated priviliges to do so).

    Please post back if the information is unclear or if you want more information.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  5. #5
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: How to access files from pendrive when used as live usb

    the easiest method is just to use gparted and create separate partitions on the disk. here is how I have mine laid out:

    1. system - FAT32 (where the liveUSB image is)
    2. casper-rw - EXT4 (for persistence)
    3. storage - FAT32

    partition 1 is the smallest that it can be (with a 1MB buffer, as sometimes gparted complains if you don't leave one when you shrink the partition)
    partition 2 is a decent size for a persistence
    partition 3 is the remainder of the USB drive, for storage and for sharing files between my home computer and the LiveUSB or simply carting around files from one place to the next or one device to another

  6. #6
    Join Date
    Jun 2007
    Location
    Lynne Valley, BC
    Beans
    2,575
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to access files from pendrive when used as live usb

    When booting from a pendrive the files stored on it can be found in filesystem/cdrom.


    Edit:
    If you are looking for the persistence files in casper-rw use the method in post 4 above.
    Last edited by C.S.Cameron; May 15th, 2012 at 03:15 PM.

  7. #7
    Join Date
    Oct 2007
    Location
    Chennai, India
    Beans
    3,791
    Distro
    Ubuntu Development Release

    Re: How to access files from pendrive when used as live usb

    Quote Originally Posted by HiImTye View Post
    1. system - FAT32 (where the liveUSB image is)
    2. casper-rw - EXT4 (for persistence)
    3. storage - FAT32
    Using ext4 for the persistance file (casper-rw) is a BAD idea. ext4 has journalling features, which are good for filesystems. However, the casper-rw file is a loop-mounted file system, again containing a ext4 filesystem.

    You are needlessly doubling the journal writes. This does cause unnecessary and excessive wear on flash memory.

    Stick with fat32 for casper-rw as well. since casper-rw is a single file, you can even stuff it into your "system" partition (resize as required), the casper-rw file does not need it's own partition.

    However, the idea of a "storage" partition is sound.
    Cheers,PRShah
    Make your own: Ubuntu, Kubuntu, Xubuntu, Mythbuntu All-in-One Live DVD
    "I never make mistakes; I thought I did, once.. but I was wrong."

  8. #8
    Join Date
    Jun 2007
    Location
    Lynne Valley, BC
    Beans
    2,575
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to access files from pendrive when used as live usb

    Quote Originally Posted by prshah View Post
    Using ext4 for the persistance file (casper-rw) is a BAD idea. ext4 has journalling features, which are good for filesystems. However, the casper-rw file is a loop-mounted file system, again containing a ext4 filesystem.

    You are needlessly doubling the journal writes. This does cause unnecessary and excessive wear on flash memory.

    Stick with fat32 for casper-rw as well. since casper-rw is a single file, you can even stuff it into your "system" partition (resize as required), the casper-rw file does not need it's own partition.

    However, the idea of a "storage" partition is sound.
    I have never been able to make a casper-rw partition fat 32 and get persistence to work. Ext2 works pretty good though.

    A flash drive, with casper-rw partition in ext4, should last years under normal use.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •