Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How can I have a fully compatible with Ubuntu USB that I can read without old user?

JosiahMaybe

Gold Coder
I know ext4 is fully compatible with Ubuntu. I know FAT and NTFS would lose data. I know there is always an owner with ext4 USBs. As like my question states, how can I have a fully compatible with Ubuntu file system USB that I can access even if read only without old user? By old user I mean user I used to own that USB and write to it. Can I access root owned files like that? I have root owned files on like my Ubuntu 22.04.3 LTS with Ubuntu Pro Lenovo Thinkpad T460 home. Also, could I read from that USB with a Windows computer if I installed correct stuff?

I am trying for full rsync backup with root stuff included. According to some things I could find, rsync can do full recovery too but if anyone ever did that I would like to know. X E.
 
To create a fully compatible USB with Ubuntu that you can read even if you are not the old user, you can consider the following steps:
  1. Format USB with ext4:
    • Format the USB drive with the ext4 file system, which is natively supported by Ubuntu.
      Code:
      sudo mkfs.ext4 /dev/sdX1
    • Replace "/dev/sdX1" with the actual device path of your USB drive.
  2. Set Appropriate Permissions:
    • After formatting, change the ownership and permissions of the USB drive so that it is accessible by any user.
      Code:
      sudo chown -R $USER:$USER /media/your-username/usb-label
    • Replace "your-username" with your actual username and "usb-label" with the label of your USB drive.
  3. Read-Only Mount:
    • To mount the USB drive in read-only mode, you can do:
      Code:
      sudo mount -o ro /dev/sdX1 /media/your-username/usb-label
    • Replace "/dev/sdX1" and the path accordingly.
  4. Access Root-Owned Files:
    • If you have root-owned files on the USB drive, you can still access them by using sudo:
      Code:
      sudo ls /media/your-username/usb-label
    • Enter your password when prompted.
  5. Access from Windows:
    • To access the ext4 USB drive from a Windows computer, you would need third-party software. One popular choice is Ext2Fsd. Install it on your Windows machine, and you should be able to read from the ext4 file system.
  6. rsync Backup:
    • To perform a full rsync backup, use a command similar to the following:
      Code:
      sudo rsync -aAXv --delete --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* --exclude=/tmp/* --exclude=/run/* --exclude=/mnt/* --exclude=/media/* --exclude="swapfile" --exclude="lost+found" / /media/your-username/usb-label
    • Adjust the paths and options based on your requirements.
Remember to replace the placeholders (your-username, usb-label, etc.) with the actual values applicable to your system. Always be cautious when working with system files and root permissions to avoid accidental data loss or system instability.
 
Thanks, apparently Windows cannot do access to root owned stuff. I think I found how to do rsync and format parts. I did not know that it could be an any user USB. I am a type that will probably just exclude USB at and nothing else. Also, I would use -vaxHAX with rsync. Also, --progress addition is good with rsync.

Anyway, solved, and I do not think I can get full compatability with a Windows system without an installed Linux or bootable USB or possible loss of data by copying as nobody/nogroup. I can record user/group to a file and restore but I do not entirely know this system so what if I lose more than just user and group. Thanks and like solved. there is an option to copy as nobody/nogroup but I do not know if I would lose anything else so I am not taking that chance. Since base of that backup is root owned I would need to either keep a secondary backup for Windows or just forget Windows.

Bootable USB may be a viable option and also WSL temporary or permanent install. With bootable USB I can access root owned files and stuff I think but question is: can I sudo rsync it to a Windows system. I think sudo will work and rsync can operate on NTFS and FAT partitions from Linux so this should work. I have like my own timestamps recorder so I can restore all timestamps on a Windows system if in same or similar directory structure.

I think that bootable USB is how to do Windows compatibility and yes, format a USB to ext4 with Disks or whatever should work. Thanks for extra info. Solved maybe. X E.
 
Thanks, apparently Windows cannot do access to root owned stuff. I think I found how to do rsync and format parts. I did not know that it could be an any user USB. I am a type that will probably just exclude USB at and nothing else. Also, I would use -vaxHAX with rsync. Also, --progress addition is good with rsync.

Anyway, solved, and I do not think I can get full compatability with a Windows system without an installed Linux or bootable USB or possible loss of data by copying as nobody/nogroup. I can record user/group to a file and restore but I do not entirely know this system so what if I lose more than just user and group. Thanks and like solved. there is an option to copy as nobody/nogroup but I do not know if I would lose anything else so I am not taking that chance. Since base of that backup is root owned I would need to either keep a secondary backup for Windows or just forget Windows.

Bootable USB may be a viable option and also WSL temporary or permanent install. With bootable USB I can access root owned files and stuff I think but question is: can I sudo rsync it to a Windows system. I think sudo will work and rsync can operate on NTFS and FAT partitions from Linux so this should work. I have like my own timestamps recorder so I can restore all timestamps on a Windows system if in same or similar directory structure.

I think that bootable USB is how to do Windows compatibility and yes, format a USB to ext4 with Disks or whatever should work. Thanks for extra info. Solved maybe. X E.
You're welcome! It seems like you've got a good understanding of the options available and how to proceed with your backup strategy. Using a bootable USB with Ubuntu or accessing the data through WSL could indeed be viable solutions for interacting with root-owned files on a Windows system.

Remember to exercise caution when dealing with system files and root permissions, and it's great that you are aware of the potential risks associated with copying as "nobody/nogroup" on Windows. It's always a good practice to test your backup and restore procedures to ensure everything works as expected.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom