Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 42

Thread: Moving Data from old partitions to new failed 24.04 install

  1. #21
    Join Date
    Oct 2024
    Beans
    55

    Re: Moving Data from old partitions to new failed 24.04 install

    I just opened the fstab file to compare it to the article https://www.howtogeek.com/442101/how...er-hard-drive/
    Anything interesting here? Looks like a mess to me

    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    # / was on /dev/sda6 during curtin installation
    /dev/disk/by-uuid/1aceb469-c683-41a0-81e3-ede8fe0ff4b4 / ext4 defaults 0 1
    # /boot/efi was on /dev/sda1 during curtin installation
    #/dev/disk/by-uuid/EEDC-1691 /boot/efi vfat defaults 0 1
    /swap.img    none    swap    sw    0    0
    UUID=EEDC-1691  /boot/efi       vfat    defaults      0       1

  2. #22
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Moving Data from old partitions to new failed 24.04 install

    These are all 1-time commands.

    Run this:
    Code:
    sudo mkdir  /media/DATA
    Then add this line to the bottom of your /etc/fstab (use sudoedit /etc/fstab as the command)
    Code:
    UUID=2e8a4205-058b-44bc-810a-910260e478f3   /media/DATA    ext4  defaults   0     2
    If you are interested in some more secure options, ask. I seldom use "defaults" when I mount storage. I tend to use nodev,nofail,noatime,errors=remount-ro for base options of data-only areas.

    Now run these commands to mount the storage:
    Code:
    sudo systemctl daemon-reload
    sudo mount -a
    The storage should be mounted in /media/DATA now. Check this with
    Code:
    ls -l /media/DATA
    Only "home" should be there, if what you've said already is true. If you see more stuff there, stop.

    Take ownership of the HOME under that location AND set reasonable permissions:
    Code:
    sudo     chown      -R      wcalvert:wcalvert       /media/DATA
    chmod     -R      ug+w,o-w       /media/DATA
    Those 2 commands may not be necessary if the uid/gid currently used AND used before on the other storage match. Allso, that chmod command might break some picky security-related things, like ssh, so if you use/used ssh previously, you may not want to run the chmod at all. See if not having that works for your needs for a few days. I think the chown command should be safe and may actually fix a few things. There's a risk in trying to be complete, but not seeing what the truth is.

    Don't worry about the extra spaces, 1 is enough between the different parts of those command. I was just trying to be VERY obvious.

    And lastly, to create the symlink in your current HOME directory, run
    Code:
    ln -s  /media/DATA/home/wcalvert ~/data
    I've made assumptions about your username and groupname. All but the last command use sudo. After running the last command you should be able to use ~/data whenever you want to open any file or save any file and it will end up on sda5, which we mounted under /media/DATA.

    Since this is your machine, you can mount it almost anywhere, but the command above will need to be tweaked for any changes. I tried to be consistent.

    And you can look up what every command does and what that fstab line does. Please do.

    Hopefully, others will see any problems here and provide corrections.

  3. #23
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Moving Data from old partitions to new failed 24.04 install

    Quote Originally Posted by wcalvert View Post
    I just opened the fstab file to compare it to the article .... Looks like a mess to me

    Code:
    /dev/disk/by-uuid/1aceb469-c683-41a0-81e3-ede8fe0ff4b4 / ext4 defaults 0 1
    /swap.img    none    swap    sw    0    0
    UUID=EEDC-1691  /boot/efi       vfat    defaults      0       1
    are the only real lines. The others are all comments.

    Nothing odd, not really. I don't do things the way the installer did. I hate extra characters that are meaningless and I despise using a swap file (I much prefer swap partitions), but that's the normal expectations in Ubuntu these days. I do lots of things different than the defaults so useful information that means something is in my fstab for mounts. UUIDs are fine for computers, but suck for humans. There are other options, but those other options to safely denote which partition is which partition aren't programmatically easy, I guess.

    I wouldn't bother changing those lines ... unless you want to make each field line up for all 4 lines you'll have after you add the line I provided above.

    BTW, in my most recent post, I hope it is clear, doing that stuff will make the storage all there after reboots too. It really is a 1-time thing.

  4. #24
    Join Date
    Oct 2024
    Beans
    55

    Re: Moving Data from old partitions to new failed 24.04 install

    Dang, I feel like I'm listening to my old college roommate who could diagnose an old Windows computer by laying his hands on it, and then explaining the fix in a foreign language while reducing wasted memory and unnecessary code, typing it all in at the same time!!

    I do appreciate the detailed instructions ... I fly big planes for a living, computers left me behind decades ago. Time to press on and get this thing fixed.

    Cheers

  5. #25
    Join Date
    Oct 2024
    Beans
    55

    Re: Moving Data from old partitions to new failed 24.04 install

    Oh geez ... you say
    Only "home" should be there, if what you've said already is true. If you see more stuff there, stop.
    There is a "home" there, but a lot of other stuff . Stopped ...


    Code:
    lson@wilson-Inspiron-5770:~$ ls -l /media/DATA
    total 947272
    lrwxrwxrwx   1 root root         7 Jun 10  2023 bin -> usr/bin
    drwxr-xr-x   2 root root      4096 Mar 31  2024 bin.usr-is-merged
    drwxr-xr-x   5 root root      4096 Oct 30 09:26 boot
    drwxrwxr-x   2 root root      4096 Mar 18  2018 cdrom
    drwxr-xr-x   4 root root      4096 Jan  5  2018 dev
    drwxr-xr-x 159 root root     12288 Oct 30 09:19 etc
    drwxr-xr-x   2 root root      4096 Apr 23  2021 hdd
    drwxr-xr-x   3 root root      4096 Mar 18  2018 home
    lrwxrwxrwx   1 root root        34 Nov 18  2020 initrd.img -> boot/initrd.img-4.15.0-124-generic
    lrwxrwxrwx   1 root root        34 Nov 18  2020 initrd.img.old -> boot/initrd.img-4.15.0-123-generic
    lrwxrwxrwx   1 root root         7 Jun 10  2023 lib -> usr/lib
    lrwxrwxrwx   1 root root         9 Jun 10  2023 lib32 -> usr/lib32
    lrwxrwxrwx   1 root root         9 Jun 10  2023 lib64 -> usr/lib64
    drwxr-xr-x   2 root root      4096 Feb 14  2024 lib.usr-is-merged
    lrwxrwxrwx   1 root root        10 Jun 10  2023 libx32 -> usr/libx32
    drwx------   2 root root     16384 Mar 18  2018 lost+found
    drwxr-xr-x   5 root root      4096 Apr 23  2021 media
    drwxr-xr-x   2 root root      4096 Jan  5  2018 mnt
    drwxr-xr-x   7 root root      4096 Oct 21 17:56 opt
    drwxr-xr-x   2 root root      4096 Mar 20  2018 pia
    drwxr-xr-x   2 root root      4096 Oct 16  2017 proc
    drwx------  10 root root      4096 Oct 30 09:57 root
    drwxr-xr-x  10 root root      4096 Jan  5  2018 run
    lrwxrwxrwx   1 root root         8 Jun 10  2023 sbin -> usr/sbin
    drwxr-xr-x   2 root root      4096 Feb 14  2024 sbin.usr-is-merged
    drwxr-xr-x  35 root root      4096 Jul  5 18:22 snap
    drwxr-xr-x   2 root root      4096 Jan  5  2018 srv
    -rw-------   1 root root 969815040 Mar 18  2018 swapfile
    drwxr-xr-x   2 root root      4096 Oct 16  2017 sys
    drwxrwxrwt   7 root root     69632 Nov  6 18:47 tmp
    drwxr-xr-x  16 root root      4096 Jun 10  2023 usr
    drwxr-xr-x  15 root root      4096 Oct 30 09:19 var
    lrwxrwxrwx   1 root root        31 Nov 18  2020 vmlinuz -> boot/vmlinuz-4.15.0-124-generic
    lrwxrwxrwx   1 root root        31 Nov 18  2020 vmlinuz.old -> boot/vmlinuz-4.15.0-123-generic
    wilson@wilson-Inspiron-5770:~$

  6. #26
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Moving Data from old partitions to new failed 24.04 install

    Quote Originally Posted by wcalvert View Post
    I do appreciate the detailed instructions ... I fly big planes for a living, computers left me behind decades ago. Time to press on and get this thing fixed.
    Everyone has their areas of expertise. I used to write code for avionics systems. Trained as an ASE in CFD. My father was a pilot - 8-engine jets (you can probably name that plane), a few others (some supersonic) and flew a single engine O-1 in SE Asia as a FAC (ever see BAT-21?). I grew up around aircraft and worked in the space industry, but realized the opportunities for my specific love were more generic and could include non real-time systems too.

    As for what you are seeing under /media/DATA .... you probably weren't using anything except the data files in /media/DATA/home, so it should be safe to delete everything else. Then you can move on and decide about the stuff under /media/DATA/home/ that you want to keep. I'd just keep the actual data files, not any of the other stuff if it were me. Getting fresh settings and initialization files is something I like to force every 3-5 yrs.

    And then you can continue with the instructions from where you left off. Only you will know which data files are important or not below there.

  7. #27
    Join Date
    Oct 2024
    Beans
    55

    Re: Moving Data from old partitions to new failed 24.04 install

    TheFu, thanks for the confirmation and some of your history.

    So the rest of the instructions did what they needed to do and I have access to my data. That was the goal and it worked (with a bit of cleanup to do now!) Now I'm looking to do some more restoration work like settings and preferences that were in place for browsers etc. before the crash. Specifically the tool bar in Ubuntu and the short cut links in my browsers. Is that something you 'll remark on or should it be started in a new thread?

  8. #28
    Join Date
    Mar 2010
    Location
    Been there, meh.
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Moving Data from old partitions to new failed 24.04 install

    I know little about web browsers. You might be able to just copy/move those settings from the old HOME directory structure into the new one and it will probably work. OTOH, migrating old settings from many releases prior to the current release for any program may break some things in the program. YMMV.

  9. #29
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Moving Data from old partitions to new failed 24.04 install

    If you copy everything from old /home to new /home, it should include all your user settings and hidden (.) configuration files.
    Firefox & Thunderbird by default with pre-snap versions kept all data in /home. Not sure about snap version where data is stored as I do not use snaps.

    Probably first thing you need to do is set up a good backup procedure, then you can restore /home, list of installed apps & any other system settings you may have changed back into new install easily.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #30
    Join Date
    Oct 2024
    Beans
    55

    Re: Moving Data from old partitions to new failed 24.04 install

    Guys, I was thinking the same about moving stuff to the home folder. I'll give it a try. Thanks

Page 3 of 5 FirstFirst 12345 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
  •