Originally posted by oshunluvr
View Post
Announcement
Collapse
No announcement yet.
SOLVED: Could someone talk me through step by step about USB ext4 ownership and permissions?
Collapse
This topic is closed.
X
X
-
Thank you, I used ***UUID*** cause I did not want to type the long number. I have removed all references of that from the fstab. I found the problem in the fstab way outside the immediate viewing area; in the line same line with the main SSD drive partition called SSD2 was entered this: < /mnt/sdg1. I removed that, I put the answer in my question. It may have been TImeshift, but more than likely it was my learning error, and/or both of us. It is fixed.
- Top
- Bottom
Leave a comment:
-
Originally posted by TinyTim View Post/dev/sdg1 ***UUID*** /mnt/sdg1 ext4 default 00
If this line is still in your fstab, it needs editing (or removing)
For UUID the line would be this:
UUID=**UUID** /mnt/sdg1 ext4 defaults 00
You don't use the "dev" name here at all, and it should be 'defaults', with an 's'.
- Top
- Bottom
Leave a comment:
-
Yeah, that sounds very odd that your fstab ended up that way unless you did it, lol. Glad you figured that out.
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostYou should not have a removable device in fstab. That's not what fstab is for. I don't use timeshift, but I find it hard to believe it "requires" EXT4 because there is no legitimate reason for any application to specify a file system unless it uses file system specific features of which EXT has almost none being more than 30 years old. In fact the first timeshift wiki I looked at mentioned BTRFS in the first paragraph, so maybe you've relied on out-dated info.
Removable devices are best kept simple. EXFAT is compatible with MS, OS/x, and Linux. Repeating myself: Why EXT* at all
As far as boot requirements, if the USB device is not in fstab and does not hold some required component of your OS, there's no reason it should be needed to boot. The only thing that comes to mind is swap which if is on the USB device, would require it to be present for booting. That is, of course, a bad idea so unlikely that's the issue. Frankly, it seems your problem is Timeshift itself, or how you've set up your system - fstab in particular.
If it were my system, I would remove timeshift and all references to the USB device, reinstall grub(sudo grub-install /dev/whatever), and reboot. Once I had a system that can boot on it's own, then work out how to use USB devices and reinstall timeshift and learn how to use it without all the problems.
/dev/sda1 /mnt/SSD1 ext4 defaults 00 > */mnt/sdg1*
/dev/sdg1 ***UUID*** /mnt/sdg1 ext4 default 00
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostYou should not have a removable device in fstab. That's not what fstab is for. I don't use timeshift, but I find it hard to believe it "requires" EXT4 because there is no legitimate reason for any application to specify a file system unless it uses file system specific features of which EXT has almost none being more than 30 years old. In fact the first timeshift wiki I looked at mentioned BTRFS in the first paragraph, so maybe you've relied on out-dated info.
Removable devices are best kept simple. EXFAT is compatible with MS, OS/x, and Linux. Repeating myself: Why EXT* at all
As far as boot requirements, if the USB device is not in fstab and does not hold some required component of your OS, there's no reason it should be needed to boot. The only thing that comes to mind is swap which if is on the USB device, would require it to be present for booting. That is, of course, a bad idea so unlikely that's the issue. Frankly, it seems your problem is Timeshift itself, or how you've set up your system - fstab in particular.
If it were my system, I would remove timeshift and all references to the USB device, reinstall grub(sudo grub-install /dev/whatever), and reboot. Once I had a system that can boot on it's own, then work out how to use USB devices and reinstall timeshift and learn how to use it without all the problems.
- Top
- Bottom
Leave a comment:
-
You should not have a removable device in fstab. That's not what fstab is for. I don't use timeshift, but I find it hard to believe it "requires" EXT4 because there is no legitimate reason for any application to specify a file system unless it uses file system specific features of which EXT has almost none being more than 30 years old. In fact the first timeshift wiki I looked at mentioned BTRFS in the first paragraph, so maybe you've relied on out-dated info.
Removable devices are best kept simple. EXFAT is compatible with MS, OS/x, and Linux. Repeating myself: Why EXT* at all
As far as boot requirements, if the USB device is not in fstab and does not hold some required component of your OS, there's no reason it should be needed to boot. The only thing that comes to mind is swap which if is on the USB device, would require it to be present for booting. That is, of course, a bad idea so unlikely that's the issue. Frankly, it seems your problem is Timeshift itself, or how you've set up your system - fstab in particular.
If it were my system, I would remove timeshift and all references to the USB device, reinstall grub(sudo grub-install /dev/whatever), and reboot. Once I had a system that can boot on it's own, then work out how to use USB devices and reinstall timeshift and learn how to use it without all the problems.
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostBTW, if you decide to keep EXT4 then the steps are:
sudo mount /dev/XXXX /mnt
sudo chown 1000:1000 /mnt
sudo umount /mnt
"XXXX" being the device name of the USB partition; sdc2, sdd1, etc.
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostIIRC, with EXT4 you need to mount it, set it with your ownership and permissions, then it will retain those. Try doing a manual mount, setting you as owner then umounting it and try the "normal" way to access it like I described above.
On a related note, I know of no reason to use EXT4 on a thumb drive and a couple reasons not to. For example, EXT4 reserves 5% of file system size for "system" use. But on a USB drive, no system space is needed. It's there so a root user can mount the file system even if it's full and delete a few files to free up space. This is not a concern on a removable device unless you're booting to it.
If you MUST use EXT for some reason, use EXT2 and remove the reserved space. If you use EXFAT instead you probably won't have this ownership issue.
FYI, if you're using EXT4 on a large hard drive partition, you probably have given up quite a large amount of drive space due to this function of EXT4. You can manually reduce it to something more reasonable.
https://sysadmintips.com/linux/all-d...t4-partitions/
The recommended reserved space is 1% but not less than 10MB. I have one EXT4 file system used for virtual disks that is not bootable so I reduced the reserve size from 21GB to 0. That's a lot of space wasted if I hadn't done that.
One more thing, when I remove that ext4 USB from my fstab, when I reboot, the system still requires it to boot the system, and to shut it down. Is this something in the kernel, what is it that keeps holding onto this boot requirement? There is something requiring that, I assumed it was Timeshift. I uninstalled Timeshift, reformated the USB drive and assigned a UUID, I have done everything I can think of, but it will not boot without that ext4 usb plugged in, unless I add "nofail".
Here is the thing as long as the ext4 is in the fstab, "default" any ext4 usb in any drive it will allow it to continue it's boot.
(I have a partition on my SSD that is ext4, can I reformat that and it not bother the root partition on that drive?)
- Top
- Bottom
Leave a comment:
-
BTW, if you decide to keep EXT4 then the steps are:
sudo mount /dev/XXXX /mnt
sudo chown 1000:1000 /mnt
sudo umount /mnt
"XXXX" being the device name of the USB partition; sdc2, sdd1, etc.
- Top
- Bottom
- Likes 1
Leave a comment:
-
IIRC, with EXT4 you need to mount it, set it with your ownership and permissions, then it will retain those. Try doing a manual mount, setting you as owner then umounting it and try the "normal" way to access it like I described above.
On a related note, I know of no reason to use EXT4 on a thumb drive and a couple reasons not to. For example, EXT4 reserves 5% of file system size for "system" use. But on a USB drive, no system space is needed. It's there so a root user can mount the file system even if it's full and delete a few files to free up space. This is not a concern on a removable device unless you're booting to it.
If you MUST use EXT for some reason, use EXT2 and remove the reserved space. If you use EXFAT instead you probably won't have this ownership issue.
FYI, if you're using EXT4 on a large hard drive partition, you probably have given up quite a large amount of drive space due to this function of EXT4. You can manually reduce it to something more reasonable.
https://sysadmintips.com/linux/all-d...t4-partitions/
The recommended reserved space is 1% but not less than 10MB. I have one EXT4 file system used for virtual disks that is not bootable so I reduced the reserve size from 21GB to 0. That's a lot of space wasted if I hadn't done that.Last edited by oshunluvr; Sep 16, 2023, 07:48 AM.
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostThere you go. SUDO means super user. So if you mount it that way, you have to unmount it that way. It's what I call "Intended Behavior."
Here - and not sure why you don't do it this way or why you're not having the same result - I plug in a USB device (I have many) - then I get a notification from the "Disks & Devices" in the system tray. I can click on the notification and select "Mount and Open" or I can open Dolphin and it's there under "Removable Devices" which I can select and Dolphin mounts it and opens a window. Then I do yadda-yadda-yadda and when I'm done, I click on "Safely Remove" and it's automagically unmounted.
- Top
- Bottom
Leave a comment:
-
There you go. SUDO means super user. So if you mount it that way, you have to unmount it that way. It's what I call "Intended Behavior."
Here - and not sure why you don't do it this way or why you're not having the same result - I plug in a USB device (I have many) - then I get a notification from the "Disks & Devices" in the system tray. I can click on the notification and select "Mount and Open" or I can open Dolphin and it's there under "Removable Devices" which I can select and Dolphin mounts it and opens a window. Then I do yadda-yadda-yadda and when I'm done, I click on "Safely Remove" and it's automagically unmounted.
- Top
- Bottom
Leave a comment:
-
Originally posted by oshunluvr View PostHow you unmount it depends on how you are mounting it. Did you post a thread asking for help on here?
I just sudo mount it
I might be doing something wrong for sure. I have assigned UUID to a ext4 USB in hopes that it will stop asking me for a password when I unmount it in Dolphin, plus the computer will not shut down or boot up without that ext4 USB plugged in. I have spent like 5 full days trying to figure it out and am simply wasted. The machine does work. Everyone here has been very helpful and I have learned more than I ever expected. I suspect that maybe I'm chown or chmod wrong or the kernel might be unclear on the matter. It is hard to let go of, but I am about spent. Thanks for your interest.
Last edited by TinyTim; Sep 16, 2023, 12:42 AM.
- Top
- Bottom
Leave a comment:
-
How you unmount it depends on how you are mounting it. Did you post a thread asking for help on here?
- Top
- Bottom
Leave a comment:
Leave a comment: