Urmas Posted January 12, 2007 Share Posted January 12, 2007 So... I've installed Ubuntu, PCLos, OpenSuse, Mandriva and Fedora successfully... Slackware is installed, too... the jury is still out 'bout that one.When I partitioned the hard drive, I created a 50+ Gig partition, /hda16 (ext3), to be used as a "common home away from /home" storage. The idea is to put all my junk, browser bookmarks, etc. etc. in there so I can access them from whatever distro I happen to be using.In another thread Eric wrote: Your fstab entry to access the storage drive from all distros:/dev/<drive-partition> /<your mount point> vfat defaults,utf8,umask=007,gid=46 0 1 Ehhh... I'm afraid I'm gonna need a bit of TLC here... Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 12, 2007 Share Posted January 12, 2007 Hi UrmasThere are 2 ways to handle that backup partition:1). The easy way, auto-mounted in your /home and accessible by the user . . . . . not 100% safe when there is a system-crash . . . but 98%2). The safe way, mounted on /media when needed by root and umounted when finished transfering files . . . 100% safe when the OS crashes.Tell me what you prefer BrunoPS: There are a few errors in Erics syntax Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 12, 2007 Author Share Posted January 12, 2007 Tell me what you prefer I'll take the tricycle... the first option. I have an external HD and other stuff for "backups of the backups". Besides, 98% sounds like a good deal. Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 12, 2007 Share Posted January 12, 2007 Yes, disregard my suggestion. I made a boo-boo. Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 12, 2007 Share Posted January 12, 2007 Okay Urmas here is the setup:1). Make ( as user ) a directory in /home called "BACKUP" ( mkdir BACKUP )2). Add a line to your /etc/fstab: /dev//hda16 /home/urmas/BACKUP ext3 defaults 1 2 3) Reboot4) Just to be 100% sure: Check permissions doing "ls -al /home/urmas" and see if the /BACKUP has the same permissions as other directories in your /home5) Check sizes of mounted partitions doing "df -h" . . . . do the same in all distros . . . . . . . Ready Bruno** I named the directory BACKUP in capital letters because that way you do not confuse it with "normal" directories . . . to avoid you will one day delete it and have to post here Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 12, 2007 Author Share Posted January 12, 2007 (edited) Err... partition is mounted... size is right, too... but: drwxr-xr-x 3 root root 4096 2007-01-09 13:50 VARASTO (I renamed it "VARASTO".)Can't write in there. Also funny... I kinda expected it to be empty... but there is a "permission denied" 16kB-folder called "Lost+Found" in there. Edited January 12, 2007 by Urmas Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 12, 2007 Share Posted January 12, 2007 Linux created the "lost and found" directory... nothing to be concerned about. Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 12, 2007 Share Posted January 12, 2007 Err... partition is mounted... size is right, too... but:drwxr-xr-x 3 root root 4096 2007-01-09 13:50 VARASTO (I renamed it "VARASTO".)Can't write in there. Also funny... I kinda expected it to be empty... but there is a "permission denied" 16kB-folder called "Lost+Found" in there. Means you did not make the folder as "user" . . :(Assuming this is Ubuntu . . First: umount the partition as root:$ sudo umount /home/urmas/VARASTO$ sudo rm -rf /home/usrmas/VARASTO$ mkdir /home/urmas/VARASTO Next check: $ ls -al /home/urmas/VARASTO Next reboot $ sudo reboot Bruno Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 12, 2007 Author Share Posted January 12, 2007 Means you did not make the folder as "user" . . :(Assuming this is Ubuntu . . First: umount the partition as root:$ sudo umount /home/urmas/VARASTO$ sudo rm -rf /home/usrmas/VARASTO$ mkdir /home/urmas/VARASTO Next check: $ ls -al /home/urmas/VARASTO Next reboot $ sudo reboot Bruno I sure did make the directory as user... Anyway... no change... still can't write in there. Before reboot the "ls -al" looked good... just urmas, not a single root in sight... after reboot, however:urmas@rocinante:~$ ls -al /home/urmas/VARASTOyhteensä 24drwxr-xr-x 3 root root 4096 2007-01-09 13:50 .drwxr-xr-x 39 urmas urmas 4096 2007-01-12 23:22 ..drwx------ 2 root root 16384 2007-01-09 13:50 lost+found Could it be... yesterday, while in PCLos, I toyed with its "GUI mounting tool" a bit... Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 12, 2007 Share Posted January 12, 2007 Okay . . . . please post the output of "cat /etc/fstab" so I can have a look how Ubuntu does this.Then first do the above tweaks in PCLos . . there it should work without problems . . . . And by the time you are ready I will have the needed fstab line for ubuntu for you. BrunoUPDATE: "sudo chown -R urmas:urmas /home/usrmas/VARASTO""sudo chmod -R 776 /home/usrmas/VARASTO"Then reboot and see if it helped. Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 12, 2007 Author Share Posted January 12, 2007 UPDATE: "sudo chown -R urmas:urmas /home/usrmas/VARASTO""sudo chmod -R 776 /home/usrmas/VARASTO"Then reboot and see if it helped. YES! That did it! Here's cat /etc/fstab, in case you still want it:urmas@rocinante:~$ cat /etc/fstab# /etc/fstab: static file system information.## <file system> <mount point> <type> <options> <dump> <pass>proc /proc proc defaults 0 0# /dev/hda1UUID=59a33b54-752e-43eb-bd50-4528417c39f3 / ext3 defaults,errors=remount-ro 0 1# /dev/hda3UUID=f8d0bf27-818a-45b0-b285-c0e0ab18f22b /home ext3 defaults 0 2# /dev/hda15UUID=d486dbf4-8662-4ed1-82f0-130fcc986098 none swap sw 0 0/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0/dev/hdc /media/cdrom1 udf,iso9660 user,noauto 0 0/dev/scd0 /media/cdrom2 udf,iso9660 user,noauto 0 0/dev/ /media/floppy0 auto rw,user,noauto 0 0# /dev/hda16/dev//hda16 /home/urmas/VARASTO ext3 defaults 1 2urmas@rocinante:~$ Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 12, 2007 Share Posted January 12, 2007 YES! That did it! Great !!. . . up to the next distro ! Here's cat /etc/fstab, in case you still want it: LOL . . . nope . . not interesting anymore :DB) Bruno Quote Link to comment Share on other sites More sharing options...
Frank Golden Posted January 13, 2007 Share Posted January 13, 2007 Great !!. . . up to the next distro ! LOL . . . nope . . not interesting anymore :DB) BrunoHi Urmas, This must be your new computer. Way to go. Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 Hi Urmas, This must be your new computer. Way to go.Ways to go, more likely. OK... PCLos:Who the heck is "1000"? /etc/fstab:drwxrwxrw- 3 1000 1000 4096 Jan 13 00:16 VARASTO/ Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 LOL . . . that is because your Ubuntu has an urmas user with a UID of 1000 and a GID of 1000 ( check /etc/passwd and /etc/group ) . . and PCLos / Mandriva / Fedora gives urmas the number 500:500So . . . . . you have to make all those UID ( user id ) and GID ( group id ) numbers the same accoss distros. ( so either 1000 or 500 or any number in between ) BrunoPS: If you change the numbers in Ubuntu to 500 ( /etc/passwd and /etc/group ) you will have to "chown -R 500:500 /home/urmas" before rebooting.PS2: You can also use the command "usermod" ( "usermod -u uid" and "usermod -g gid" )PS3: The command "find / -uid 1000 -exec chown 500:500" will find all the files with uid 1000 and chown them to 500:500 Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) PS3: The command "find / -uid 1000 -exec chown 500:500" will find all the files with uid 1000 and chown them to 500:500That would be the easiest way out... I've set it up in PCLos and Mandy already. However, when I do (in Ubuntu)...sudo find / -uid 1000 -exec chown 500:500... it complains about a parameter missing in -exec. :blink:Edit... reading the previous post again with with BOTH brain cells fired up...sudo find / -uid 1000 -exec chown -R 500:500... right? Well, we're about to find out. Edited January 13, 2007 by Urmas Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 Sorry try: sudo find / -uid 1000 -exec chown 500:500 {} \; Or use the script: http://directory.fedora.redhat.com/wiki/UidFixup ( save it in a file and make it executable with "chmod 0755 <name_of_script" Bruno Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) Sorry try: sudo find / -uid 1000 -exec chown 500:500 {} \; Or use the script: http://directory.fedora.redhat.com/wiki/UidFixup ( save it in a file and make it executable with "chmod 0755 <name_of_script" Bruno urmas@rocinante:~$ sudo find / -uid 1000 -exec chown 500:500 {} \;chown: vaihdetaan tiedoston "/home/urmas/.kde/socket-rocinante" omistajuus: No such file or directorychown: vaihdetaan tiedoston "/home/urmas/.kde/tmp-rocinante" omistajuus: No such file or directorychown: vaihdetaan tiedoston "/home/urmas/.googleearth/instance-running-lock" omistajuus: No such file or directorychown: vaihdetaan tiedoston "/proc/4978" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/4978/task/4978" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5019" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5019/task/5019" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5022" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5022/task/5022" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5023" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5023/task/5023" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5025" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5025/task/5025" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5028" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5028/task/5028" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5031" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5031/task/5031" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5031/task/5033" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5040" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5040/task/5040" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5041" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5041/task/5041" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5046" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5046/task/5046" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5051" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5051/task/5051" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5053" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5053/task/5053" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5057" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5057/task/5057" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5057/task/5058" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5059" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5059/task/5059" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5067" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5067/task/5067" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5070" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5070/task/5070" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5078" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5078/task/5078" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5078/task/5133" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5091" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5134" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5143" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5177" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5186" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5091/task/5187" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5105" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5105/task/5105" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5118" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5118/task/5118" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5138" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5138/task/5138" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5140" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5140/task/5140" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5142" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5142/task/5142" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5147" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5147/task/5147" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5184" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5184/task/5184" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5196" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5196/task/5196" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5252" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5252/task/5252" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5325" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5325/task/5325" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5325/task/5329" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5327" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5327/task/5327" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5328" omistajuus: Operation not permittedchown: vaihdetaan tiedoston "/proc/5328/task/5328" omistajuus: Operation not permittedfind: /proc/5813/task/5813/fd/4: No such file or directoryfind: /proc/5813/fd/4: No such file or directoryurmas@rocinante:~$ "vaihdetaan tiedoston omistajuus"="changing the ownership of file ..." :blink:Edit: I shouldn't be allowed anywhere NEAR a computer... I gotta do If you change the numbers in Ubuntu to 500 ( /etc/passwd and /etc/group )...... first, right? Edited January 13, 2007 by Urmas Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 This is the problem with "sudo" . . . Do you have a root-password in Ubuntu . . and can you log in as root ?? ( log out urmas first )Then do the command again. ( Without "sudo" !! )OR just do "sudo chown -R 500:500 /home/urmas" and reboot.The /proc are temp ( a direct reflection of the system kept in memory ) . . . so reboot should fix it and give them the changed UID/GIDB) Bruno Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 (edited) I think u'm up the **** creek w/o paddle... haven't got root enabled yet...changed 1000 --> 500 in "/etc/passwd"... unless someone comes up with a VERY bright idea, I'm out of the sudo game... yep... can't even start the Terminal. :angry:Edit... system acting up a bits... might become interesting... Edited January 13, 2007 by Urmas Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 :(If I remember well there is a "rescue-mode" or "single-user-mode" in the Ubuntu grub bootoptions . . . .that will boot you into a recovery console logged in as root . . . there you give the command "passwd" and it will ask you for a root-password.Next you can "chown -R 500:500 /home/urmas" . . . next reboot and login the "normal way" Bruno** I never liked the #$@%&!! "sudo" anyway Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 :(If I remember well there is a "rescue-mode" or "single-user-mode" in the Ubuntu grub bootoptions . . . .that will boot you into a recovery console logged in as root . . . there you give the command "passwd" and it will ask you for a root-password.Next you can "chown -R 500:500 /home/urmas" . . . next reboot and login the "normal way" Bruno** I never liked "sudo" anyway Which root password? Don't have one. Only the user/"sudo" password...Sudo is OK... just needs the rood enabled... hadn't done it yet. Bummer. Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 Does NOT matter if you have a root-password or not . . . . you can set a rootpassword with the command "passwd" in the recovery console ( recovery mode )See here: Ubuntu Rescue Mode Bruno Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 AHA! OK... here goes, then... Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 I just added this link to previous post: Ubuntu Rescue Mode BrunoPS: Sorry, I have to go shopping, else I will starve all next week . . . . see you this evening. Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 Okay... I'm back... found my roots... just call me Mr. 500. Quote Link to comment Share on other sites More sharing options...
Urmas Posted January 13, 2007 Author Share Posted January 13, 2007 Couple of iterations later... tired but happy! Everything worky! For future genarations... some "default uid's":Ubuntu:1000PCLos: 501Mandriva: 500OpenSuse: 1000Fedora Core: 500 Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 13, 2007 Share Posted January 13, 2007 Couple of iterations later... tired but happy! Everything worky! GREAT !! . . . . . So Mr 500 are we ready for point #2 of the aganda ?? 1). Mounting/umounting the backup partition.2). File transfer to computers on the network.3). Printing using cups on a remote computer on the network. BrunoA few remarks on this topic:1). If you want to be able to access the backup partition from Windows too, then use a FAT partition.2). Wen using a FAT partition you don't have the permission/ownership problems we had here above . . . because FAT is not aware of such things as permission/ownership.3). Using a FAT partition is less safe . . . . and at system crash more prone to damage, after all ext3 has a journal for recovery.4). The best and most safe situation is: Having an ext3 backup partition that is not automounted and only accessible by root and located on a different drive then the /home partition. ( Sure having a backup on an external disk or second computer is even better ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.