LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 12-03-2005, 11:46 PM   #1
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Rep: Reputation: 15
copy /usr to another filesystem and cann't reboot system by normal user


I'm using RHEL4, someday I found that my / filesystem is full, and I copy the /usr directory to another filesystem. Everything is OK, except that when I run system-config-* from a normal user, it responds with a "Permission denied" instead of asking me to type the root passwords as before. And I just simply can't reboot or shutdown my machine using a normal user account thru the Gnome main menu's Logout button.
I can't figure out how to handle this, anybody help?
Thanx!
 
Old 12-04-2005, 06:40 PM   #2
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Rep: Reputation: 30
This is interesting. So, you still have a directory named /usr ? But it is just now on a separate partition, is this correct? What does "df -h" tell you? What does your /etc/fstab file look like?
 
Old 12-04-2005, 06:48 PM   #3
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
[kinzlaw@luo ~]$ df -h
Filesystem 容量 已用 可用 已用% 挂载点
/dev/hdd2 6.8G 6.0G 439M 94% /
none 506M 0 506M 0% /dev/shm
/dev/hda12 5.0G 3.4G 1.3G 73% /home
/dev/hda11 8.6G 6.5G 1.7G 80% /usr
/dev/hda10 1.5G 525M 971M 36% /fat
/dev/hdd3 17G 11G 6.4G 63% /vmware
/dev/hdd1 14G 13G 831M 95% /solaris
/dev/hda5 7.9G 6.9G 1022M 88% /mywinfiles
/dev/hda9 60G 56G 4.3G 93% /datastore-ntfs
/dev/hda8 20G 17G 2.8G 87% /stable-files
/dev/hda7 25G 24G 925M 97% /wingame
/dev/hda1 6.9G 6.2G 683M 91% /winsys
 
Old 12-04-2005, 06:49 PM   #4
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
[kinzlaw@luo ~]$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/home /home ext2 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
LABEL=/ /usr ext3 defaults 1 2
/dev/hda13 swap swap defaults 0 0
/dev/hda10 /fat vfat users,exec,defaults,umask=000 0 0
/dev/hdd3 /vmware vfat users,exec,defaults,umask=000 0 0
/dev/hdd1 /solaris vfat users,exec,defaults,umask=000 0 0
/dev/hda5 /mywinfiles ntfs ro,users,exec,defaults,umask=000 0 0
/dev/hda9 /datastore-ntfs ntfs ro,users,exec,defaults,umask=000 0 0
/dev/hda8 /stable-files ntfs ro,users,exec,defaults,umask=000 0 0
/dev/hda7 /wingame ntfs ro,users,exec,defaults,umask=000 0 0
/dev/hda1 /winsys ntfs ro,users,exec,defaults,umask=000 0 0
/dev/hdc /media/cdrom auto pamconsole,fscontext=system_u: object_r:removable_t,exec,noauto,managed 0 0

Last edited by kinzlaw; 12-04-2005 at 06:52 PM.
 
Old 12-04-2005, 07:41 PM   #5
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Rep: Reputation: 30
I would start by looking at this line of the /etc/fstab file:

Code:
LABEL=/ /usr ext3 defaults 1 2
That line may be correct; I don't know. You may want to try to replace it with

Code:
/dev/hda11 /usr ext3 defaults 1 2
and see if that does anything. Just a guess.
 
Old 12-04-2005, 07:56 PM   #6
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
No, actually I had two Linux installed on this machine several months, the "Lable" is set by anaconda, the Red Hat installer. Now the other Linux has been deleted manually by me. After the "copying" I set the device to the style as you said but when I run grub-install(you know, I get two hdds and now I still have one Linux and one Windows installed, this command is sometimes useful), the identification of the filesystem became the one right now in my fstab automatically.
I guess this issue is somewhat related to the usermode package, any suggestions?
 
Old 12-04-2005, 07:59 PM   #7
jillande
Member
 
Registered: Oct 2003
Location: fargoh eh.
Distribution: slackware
Posts: 94

Rep: Reputation: 15
that fstab syntax looks like lvm to me. the second style mentioned above by mad scientist should be used if this is not an lvm partition.

if it is an lvm partition, then it still looks wrong. i'd guess it should be LABEL=/usr /usr ext3 defaults 1 2.



i don't know if it's related to the original question or not, but thought i'd chime in about this fstab part.



oh, i see you've posted in the time it took me to type the above. what method did you use to copy the /usr to a different filesystem? did you literally use the cp command? if so, with what tags? i wonder if the usermode executables in /usr/bin didn't lose their executable permission.

Last edited by jillande; 12-04-2005 at 08:06 PM.
 
Old 12-04-2005, 08:11 PM   #8
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
By the way, I tried to install another RHEL in VMware, initially with /usr in a seperate filesystem, and everything turns out to be OK. The fstab is

Code:
[kinzlaw@luo imwheel-1.0.0pre12]$ cat /fat/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/home             /home                   ext3    defaults        1 2
LABEL=/usr              /usr                    ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=SWAP-hda5         swap                    swap    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/fd0                /media/floppy           auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
 
Old 12-04-2005, 08:26 PM   #9
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jillande
i'd guess it should be LABEL=/usr /usr ext3 defaults 1 2.
I forgot to mention that LABEL=/ is the root filesystem of the deleted "other" Linux, this seems not to be a problem because anaconda can handle it, just like the LABEL=/1 stuff(which is the root filesystem of the newly installed and still active Linux). I haven't used lvm, and I surelly know this is not a lvm partition. In my memory, since my first installation of RH9, anaconda was using this style of naming filesystem, wasn't it? Try looking into your fstab if you are using some RH or FC.

Quote:
i wonder if the usermode executables in /usr/bin didn't lose their executable permission.
This seems impossible, before the copy I have tested thoroughly with cp, and knows what I was doing--I didn't want to put myself on such a risk that the main operating system I was using crack. And as I mentioned before,
Quote:
Everything is OK, except that when I run system-config-* from a normal user, it responds with a "Permission denied" instead of asking me to type the root passwords as before.
if executable permission is missing, how can everything be OK?
 
Old 12-04-2005, 08:34 PM   #10
kinzlaw
LQ Newbie
 
Registered: Aug 2005
Location: China
Distribution: Fedora Core, RHEL
Posts: 26

Original Poster
Rep: Reputation: 15
There still is a fact that I have forgotten. It seems that the new Linux I'm using now is installed with only the LABEL=/1 filesystem. Then someday I "borrowed" the /home filesystem from the other Linux, this caused the "shutdown and reboot problem", and then after borrowing LABEL=/, it turned out system-config-* cannot be run...
Actually the process went like this.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
normal user cannot edit vfat filesystem GT_Onizuka Linux - Newbie 3 10-17-2003 10:36 PM
Disable reboot/halt/shutdown as normal user carstenbjensen Mandriva 4 09-09-2003 11:42 AM
copy user accounts to other linux system pangfai Linux - Security 2 08-29-2003 04:50 AM
halt/reboot from a gnome session as normal user tuggy Linux - Software 0 08-28-2003 03:38 PM
cann't a user other than root mount msdos formated floppy justjha Linux - Newbie 3 01-24-2001 09:54 AM


All times are GMT -5. The time now is 11:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration