Actually, most of my sticks are either bootable systems or utilities, or if they carry things to exchange, they are usually vfat, since that seems to be the most compatible.
My external HDs have Linux and NTFS partitions, the latter carrying most of the data (such as utilities, installers, reference notes & guides, etc.), since it is far easier to access NTFS from Linux than it is to access Linux partitions from other people’s random Windows machines.
[INDENT=2]Here I come to save the day!
Armed with my openSUSE, I’m on my way!
[/INDENT]
Hi everybody!
I want to explain the reason for why i do this og why i use extn and not FAT32.
I’m setting up a wifi-router and install DD-WRT-firmware instead of the original. ddwrt gives me many extra tools and possibilities for running extra services like YAMon. To do this i need a “disksystem”. The routers disksystem is in RAM and is cleared during reboot.
To manage to get Automount to work, i need extn-filesys on the stick, because i can use UUID to set an certain mountpoint. FAT32 don’t give me UUID.
So the problem is that files created on the stick is owned by root and owner ronsim i set using chown on OpenSUSE don’t exist on router, but only as user-ID:1000.
This can cause some issues with filerights.
I use my OpenSUSE 13.1 to format the memorystick and copy files into it, but after its been used on the router, something happens with the filerights on the stick.
I assume that changing the UID on that router is out of the question. Then it would be best to have a user with UID 1000 on your openSUSE system also. Now I wonder, because IIRC openSUSE starts to give out UIDs from 1000, thus normaly you should have one already.
You can check that by looking in /etc/passwd. Fields there are : separated. The third field is the UID. Obviously there are two cases:
There is no such user. Then that is fine IMHO. You then create a new user special for maintaining the router bussiness with UID 1000 (using YaST e.g., it allows you to choose a UID different from it’s default). Of course you then chown the root of the sticky fs to be owned by that user.
There is already a user with UID 1000. Now you can walk two pathes. When you (as a person) “own” that user, you could use that user in the future for the sticky/router. When the user with UID 1000 is a different person or you do not want that user to use for the sticky (because the user is there for something completely different), you can change the currect user using 1000 to another number and then do like 1 above.
Changing a users UID involves a bit care. As root change the number in the corresponding line in /etc/passwd. All files owned by that user must change ownership now. When that is a well behaving user, those files are only inside his home directory and a chown -R from the home directory should do it. When you need assistence in finding files outside the home directory, please come back and ask.
> So the problem is that files created on the stick is owned by root and
> owner ronsim i set using chown on OpenSUSE don’t exist on router, but
> only as user-ID:1000.
Doesn’t matter. The name of the user is irrelevant. The filesystem only
knows the number, the UID.
> This can cause some issues with filerights.
> I use my OpenSUSE 13.1 to format the memorystick and copy files into it,
> but after its been used on the router, something happens with the
> filerights on the stick.
Just find out what permissions and UIDs the router uses, and then set
them the same way on the computer.
Hint: there is an “ls” variant that displays the UIDs instead of names.
See the manual.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
Hi again!
The memorystick is working on my wifi-router and automount works perfect.
Problem is that when i umount it on router og plug it in my OpenSUSE, there is a long delay before it mount.
My earlier problem still continue.
It shows up in fdisk;
# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x81c02799
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616447 307200 7 HPFS/NTFS/exFAT
/dev/sda2 616448 927137791 463260672 83 Linux
/dev/sda3 927137792 972572671 22717440 7 HPFS/NTFS/exFAT
/dev/sda4 972572672 976756735 2092032 c W95 FAT32 (LBA)
Disk /dev/sdb: 24.0 GB, 24015495168 bytes, 46905264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00090c12
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4192255 2095104 82 Linux swap / Solaris
/dev/sdb2 4192256 46903295 21355520 83 Linux
Disk /dev/sdc: 2007 MB, 2007498752 bytes, 3920896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x71ec093d
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3919871 1958912 83 Linux
As said, what you create on the system with user ronsim (1000) is owned by 1000 (ronsim). That should not surprise you.
And when things created on the router are owned by 0 (root), then that is contrary to your statement that the roouter uses 1000:
So the problem is that files created on the stick is owned by root and owner ronsim i set using chown on OpenSUSE don’t exist on router, but only as user-ID:1000.
But we may have misunderstood you here.
So, when the router uses only UID 0, then everything on the stick should of course be owned by 0. And then all is owned by root (0) when the stick is on your PC. That is naturaly. It makes using the stick on the PC tricky, because only root can manage it and that means that you are going to use root for mere simple tasks that you would never do as root otherwise.
The problem originates in the policy of the router, not the PC.
And like others say, when you have a sticky detach problem, start a new thread. The present title does not cover that problem and thus your audience will be limited here.
> So, when the router uses only UID 0, then everything on the stick should
> of course be owned by 0. And then all is owned by root (0) when the
> stick is on your PC. That is naturaly. It makes using the stick on the
> PC tricky, because only root can manage it and that means that you are
> going to use root for mere simple tasks that you would never do as root
> otherwise.
>
> The problem originates in the policy of the router, not the PC.
Exactly.
What I do on another Linux embedded device I have is change the group
permission of all files to allow write, every single time I plug it on
the computer, with a script I keep on it. Thus I only need one operation
made by root on the computer.
Of course, I do not know if this change may cause any problem in the OP
device.