Find the answer to your Linux question:
Results 1 to 3 of 3
Originally asked in Yahoo Answers...Still waiting there. Primary boot disk has a straightforward directory structure: /home/ubuntu/Desktop /home/ubuntu/Documents /home/ubuntu/Downloads /home/ubuntu/Music /home/ubuntu/Pictures /home/ubuntu/Public /home/ubuntu/Templates /home/ubuntu/Videos Now I plug in a Pen Drive ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33

    Newbie: Linux Home folders, where are they located on a secondary linux disk?

    Originally asked in Yahoo Answers...Still waiting there.

    Primary boot disk has a straightforward directory structure:

    /home/ubuntu/Desktop
    /home/ubuntu/Documents
    /home/ubuntu/Downloads
    /home/ubuntu/Music
    /home/ubuntu/Pictures
    /home/ubuntu/Public
    /home/ubuntu/Templates
    /home/ubuntu/Videos

    Now I plug in a Pen Drive w/bootable linux on it and the drive structure
    looks like this:

    /media/ubuntu_usb/casper
    /media/ubuntu_usb/dists
    /media/ubuntu_usb/install
    /media/ubuntu_usb/pics
    /media/ubuntu_usb/pool
    /media/ubuntu_usb/preseed
    /media/ubuntu_usb/syslinux
    /media/ubuntu_usb/autorun.inf
    /media/ubuntu_usb/casper-rw
    /media/ubuntu_usb/ldlinux.sys
    /media/ubuntu_usb/md5sum.txt
    /media/ubuntu_usb/README.diskdefines
    /media/ubuntu_usb/wubi.exe

    If I COULD boot to that disk, I would see comparable directory structure as
    the first example. The structure is there SOMEWHERE on the disk I can't
    boot to - WHERE?

    and

    WHAT accounts for the difference?

    HOW can I access these files?

    and

    Is there a way to copy them (or backup and restore them) from one Bootable
    USB to the other? Having to reinstall from LiveCD everytime a USB crashes
    and the subsequent reinstall of software is a royal PAIN.

    Thanx

    Linux Newbie

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    It should be casper/filesystem.squashfs.
    SQUASHFS - A squashed read-only filesystem for Linux

    The main difference I suppose is that everything on a CD or USB is highly compressed. The Ubuntu iso is ~700MB, but a full install is what, 2-3 GB?

    HOW can I access these files?
    You can extract the file system and make changes.
    https://help.ubuntu.com/community/LiveCDCustomization

    Is there a way to copy them (or backup and restore them) from one Bootable
    USB to the other? Having to reinstall from LiveCD everytime a USB crashes
    and the subsequent reinstall of software is a royal PAIN.
    That seems a little odd. I've never had to reinstall my on a flash drive because of a crash. Part of the whole point of live USB installs is that it gives you a pristine environment each boot.

    But you can back it up with the dd command. (Be careful though, this is a very powerful tool that can cause a lot of damage if you screw up.)
    Code:
    dd if=/dev/sd(x) of=/dev/sd(y) conv=noerror,sync
    Where /dev/sd(x) is the device node of your flash drive, and /dev/sd(y) is the disk or partition you want to copy the image to.
    http://wiki.linuxquestions.org/wiki/Dd#Create_a_backup

    You could use something like Clonezilla as well.
    Clonezilla
    Last edited by reed9; 03-24-2010 at 11:46 AM.

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    33

    Thanx much...

    Here's what I got.

    Did some searching. Found:

    squashfs-tools

    Installed using:

    sudo apt-get install squashfs-tools

    Copied the filesystem.squashfs to
    another drive, another folder

    Created a folder 'us'

    ran

    unsquashfs -f -d us filesystem.squashfs

    and got the following:

    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/bin
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/boot
    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/dev
    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/etc
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/home
    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/lib
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/media
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/mnt
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/opt
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/proc
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/root
    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/sbin
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/selinux
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/srv
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/sys
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/tmp
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/usr
    * /media/9030BC6F30BC5DC2/USB_Squashfile/us/var
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/initrd.img
    /media/9030BC6F30BC5DC2/USB_Squashfile/us/vmlinuz

    the * folders had anything in them.

    In the home folder I was expecting to see:

    /home/administrator/Desktop
    /home/administrator/Documents
    /home/administrator/Downloads
    /home/administrator/dwhelper
    /home/administrator/Music
    /home/administrator/Pictures
    /home/administrator/Public
    /home/administrator/Templates
    /home/administrator/Videos

    or even something in:

    /media/9030BC6F30BC5DC2/USB_Squashfile/us/opt

    where I know I've installed:

    Firefox, Google Chrome and Open Office

    but,

    Nothing.

    Most of the time, I'm able to move the USB drive between
    home and work no problem.

    This time, I tried using several bootable USB drives with either
    Ubuntu 9.10 (Pen Drive) or Ubuntu 9.10 (LiveCD) installed on
    a virus infected (Windows) laptop. None of them would load.
    I got a CD to load ONCE after several tries.

    The screen would blink FOREVER after which I just shut everything
    down and restarted the system to Windows or tried another boot
    disk.

    When I got home and to work the following day, nothing
    would load.

    And now, I can boot to linux (dual boot laptop) ok, but, not
    to any of the USB drives. I can see the files, but, I can't load
    Linux.

    Given these kind of problems, at least if I can backup the USB
    drive, I can, perhaps, toast it and reinstall the OS from backup.

    Tried Clonezilla once. It either successfully completed, and
    restored, but, wouldn't boot, or it bombed on the image process.

    I've got my USB setup (using GParted) as main ubuntu files (Fat32) and the
    rest as storage (ext2) on 16 GB USB drives.

    Maybe it's not SUPPOSED to do this, but that and a dime ain't
    making a difference SEVERAL times out.

    I asked on another forum how to fix this to move boot files
    from either a dual boot config or from a LiveCD. The "best" I got
    was to "Chroot to the USB" and copy files over.

    Being new to Linux, I then asked the user to elaborate on what
    exactly was meant by "chroot to the USB" and could they provide
    some syntax. I further explained that it's entirely easy to trash
    the whole car so to speak when all you wanted to do was change the
    oil. I really didn't want to be taking (un)educated guesses and in the
    process go from bad to worse by ruining my dual boot system as well.

    The user responded, "I gave you an answer. Use it. Search".

    Well, I didn't understand the answer in the first place. Searching either
    led to more confusion or more possibilities that either didn't work or appeared
    too risky to try.

    Having said all this, I REALLY appreciate your answer, your thoroughness and
    your explanations.

    Now you have considerable background as to where this is coming from.

    As I said, I've wiped and reinstalled bootable linux SEVERAL times now.

    I've almost got it down to a science. But, it really is a LOT of effort to go
    through every time a boot goes south.

    So far, I've used Pen Drive Ubuntu 9.10, LiveCD Create USB Startup Disk (Ubuntu
    9.10, Linux Mint v8, and am now playing with Lucid Lynx Beta 1 v10.04

    If I leave it alone for the most part, there aren't many problems.

    But, if I start updating it, as noted:

    Open Office 3.2 (Pre Lucid Lynx)
    Google Chrome
    Ubuntu Tweaks
    Bleach Bit
    Geany
    SBackup
    Firefox 3.6 (Pre Lucid Lynx)
    Wine (Wine-Doors)
    unrar
    flashplayer
    ubuntu-restricted-extras
    vlc
    etc

    and top it all off with

    sudo apt-get update && sudo apt-get upgrade

    after having turned on all software sources

    next thing I know, I've gone one boot too many,
    one install too far,

    and poof!

    toasted.

    Having said all that, any suggestions or recommendations as to
    how best to get off this roller coaster?

    Thanx

Posting Permissions

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