Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Backup files to external through chroot?

  1. #1
    Join Date
    Jan 2012
    Beans
    88

    Backup files to external through chroot?

    Okay so I had a problem, that either nobody wanted to help me fix or either just didn't know how to answer my question. I accidentally deleted the contents of /lib/modules. I found a lot of answers through searching and I had successfully booted up into a live session and chroot'd into my filesystem. And I actually have the module package which is 3.2.0-40-generic-pae on my external, but I don't know how to copy it from my external into my chroot'd filesystem. My external is labeled My Passport, so in commands I can't use that because of the space in the name. So if I could figure out how to copy that package from my external into my filesystem, I think that may work. I could then use insmod (i believe) to load the modules individually once I boot back into the system. My previous question was what package I could download and install now that I have access to the internet, someone suggested linux-kernel-headers and I tried that, and it said it was the newest versiona already and wouldn't install. So all I need to know is either
    1. What package I can download and install to replace my modules
    or
    2. How to copy files to and from My Passport (possibly how to change the name of the external) so I can either backup my files and re-install Ubuntu, or copy the 3.2.40-generic-pae package from the external and then load the modules into the system.

    About question 2, if I can indeed copy the module package back into /lib/modules, if I do so, then reboot my filesystem, will the kernel automatically load the modules or will I have to go in and load them one by one using insmod?

    Thank you for your help. The last time I posted, I got NO answers, so I figured I'd go again, and this time it's a little bit simpler, and I have two different options, so that gives me twice the possibility for a known answer to my problem, as either would work.

    Edit: Referencing what someone said to me before (if you don't have current backups of your data then it must not be important to you), my data is very important to me, I just am not as fortunate as everyone to have terabytes of space to backup all my data to, as I share a computer, and don't have much internal space, and I do have an external where I backup certain imporant data to, but I don't do it every single time I download important data.

    I recently backed up a lot of my data, that's actually WHAT I was doing when I messed up my /libs/modules, because I was backing up some Android development (due to low storage space) and saw that /lib/modules was taking up a lot of space on my system, and I actually have a /lib/modules folder for developing Android kernels, so I got mixed up on which /lib folder I was in. The first thing I was backing up was my Android development, then going to personal data, and that's when my system broke (that's how I have a backup of the 3.2.40-generic-pae)
    Last edited by lemonoid; May 30th, 2013 at 05:41 AM.

  2. #2
    Join Date
    Jan 2012
    Beans
    88

    Re: Backup files to external through chroot?

    I could always just re-install Ubuntu without worrying about my data, as I have MOST of it backed up, but I think learning how to do either of the things above would help me learn and grow in my knowledge of the Ubuntu system, and Linux as well. I've been working on Ubuntu for two years now and learned many things along the way and had to fix many things, but chroot and having to move around between filesystems is something I've never had to do, so I've avoided it so I wouldn't mess anything up just for play, but now that I mostly HAVE to learn, I'd like to.

  3. #3
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,199
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Backup files to external through chroot?

    lemonoid;
    I do not mind lending a hand in your endeavor. I too am always open to a learning experience.
    Easy approach:
    With your "my passport" device attached, can you access it in the file manager of the liveCD ?
    Secondly is the liveCD the same version as your install - that may later become important -?
    Just to copy files one may not have to resort to "chroot", maybe simply mounting the external partition(s),from the liveCD, will be good enough.
    I anticipate that in the graphical file manager (nautilus) to be able to mount both partitions and copy the files straight across with root's privileges.

    The modules are just files, if the scripts are "inplace" to parse them, the system should never even know they were gone.

    that is what I think

    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  4. #4
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Backup files to external through chroot?

    The liveCD and the chrooted system don't have to be the same version. (I've chrooted into 13.10 from 12.04 many times.) But they do need to be the same architecture e.g. both 32 bit or 64 bit.
    BACKUPS are unsexy — until you discover you should have done one yesterday.
    Spare your nerves and do one before you upgrade or install.

  5. #5
    Join Date
    Jan 2012
    Beans
    88

    Re: Backup files to external through chroot?

    Quote Originally Posted by Bashing-om View Post
    lemonoid;
    I do not mind lending a hand in your endeavor. I too am always open to a learning experience.
    Easy approach:
    With your "my passport" device attached, can you access it in the file manager of the liveCD ?
    Secondly is the liveCD the same version as your install - that may later become important -?
    Just to copy files one may not have to resort to "chroot", maybe simply mounting the external partition(s),from the liveCD, will be good enough.
    I anticipate that in the graphical file manager (nautilus) to be able to mount both partitions and copy the files straight across with root's privileges.

    The modules are just files, if the scripts are "inplace" to parse them, the system should never even know they were gone.

    that is what I think

    thank you for your response, and to the person below. to answer the question at hand, I orignally had made a 13.04 live USB to see how well it would run on my system, I was using that at first, but I really think my graphics card or some other piece of hardware is too old to smoothly run 13.04, so I remade 12.04 USB and that's what I'm currently using.

    Second of all, yes I can access 'my passport' through the LiveUSB, the modules work perfectly live, that's how I'm on the internet now.

  6. #6
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,199
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Backup files to external through chroot?

    lemonoid; Hey ---
    In the liveDVD open "nautilus"-> key combo ctl+alt+t yields a terminal
    terminal command:
    Code:
    sudo nautilus
    nautilus opens;
    .. in the left pane are all the partitions the system is aware of, find the partition to be copied to, and open the directory to be copied to///
    now while still there -same routine, find the partition of the files to be copied and the directory where they are ...
    two tabs are now open in the file manager (nautilus) drag one of these tabs to the desk top,
    start choosing files -in the to be copied window - and drag them into the other window (that is open where ya want the final destination to be, where you opened it at). When done copying,close all out, close applications and reboot into the install. What do you now have ?

    should workie great, last long time
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  7. #7
    Join Date
    Jan 2012
    Beans
    88

    Re: Backup files to external through chroot?

    Quote Originally Posted by Bashing-om View Post
    lemonoid; Hey ---
    In the liveDVD open "nautilus"-> key combo ctl+alt+t yields a terminal
    terminal command:
    Code:
    sudo nautilus
    nautilus opens;
    .. in the left pane are all the partitions the system is aware of, find the partition to be copied to, and open the directory to be copied to///
    now while still there -same routine, find the partition of the files to be copied and the directory where they are ...
    two tabs are now open in the file manager (nautilus) drag one of these tabs to the desk top,
    start choosing files -in the to be copied window - and drag them into the other window (that is open where ya want the final destination to be, where you opened it at). When done copying,close all out, close applications and reboot into the install. What do you now have ?

    should workie great, last long time
    okay, I thought about this but for some reason last night it wasn't showing my other filesystem, I'll go look now and do that, I thought it could be that easy but wasn't sure. But before so, you're saying, I take the module folder I copied onto my external '3.2.40-generic-pae' and copy and paste it into my main filesystem correct? Should I try to copy it straight into /lib/modules or should I just copy it into my home folder, reboot, and then use the terminal to move it to /lib/modules (I copy all my files through terminal)

  8. #8
    Join Date
    Jan 2012
    Beans
    88

    Re: Backup files to external through chroot?

    okay, I tried through Nautilus to drop and drag into my filesystem, and its giving me the response that I do not have the permissions. Do you think it would work if I mounted that filesystem and chroot'd. Because then I would have root, but I don't know if I'd only have it through the terminal. I guess if that wouldn't work then I'm lost again, because I don't know how to gain permissions to my other system through nautilus.

    UPDATE: Ok so I had an idea and tried it, and so far its working. Through Nautilus, I was able to copy and paste the module folder (3.2.40-generic-pae) to my Windows filesystem. When I boot into my other filesystem, I should be able to copy it from my Windows filesystem to my broken system correct? Or did deleting modules somehow block me gaining access to my Windows from my broken system? I mean the modules are mainly for hardware correct? Not filesystems? So the Windows system should load on my filesystem, correct agian right?
    Last edited by lemonoid; June 1st, 2013 at 02:50 AM.

  9. #9
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,199
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Backup files to external through chroot?

    lemonoid; Hi !
    Ya gotta open nautilus from terminal with "sudo" to gain that level of authorization>
    Code:
    sudo nautilus
    and then you are going to open those two directories, compare them for the different FILES.
    Else to copy the whole directory best I can advise is to "chroot" and
    Code:
    sudo cp -Rp <path_of_copy_from/directory> <path_to_location/directory>
    ... ya must be sure absolutely sure of your paths and directories; linux assumes that you know what you are doing and does not permit for mistakes ! What is done is done !
    This for guidance:
    Code:
    man cp
    there does exist other means to copy a directory, however, "cp" works.

    'nuff said ? else, more coming
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  10. #10
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Backup files to external through chroot?

    If that doesn't work, I think it should be fixable fairly easily through a chroot (did some experiments on a test install). But I'll wait to see what happens with the copying method first.
    BACKUPS are unsexy — until you discover you should have done one yesterday.
    Spare your nerves and do one before you upgrade or install.

Page 1 of 4 123 ... LastLast

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
  •