/bin/bash: permission denied(after / partition moved)
I install Fedora 9 in a partition of 6.3G. Here is the result of 'fdisk -l'
Code:
Disk /dev/sda: 40.0 GB, 40007761920 bytes So I decide to move the '/' to /dev/sda3. here is my steps: (0) liveCD... (1) mkfs.ext3 /dev/sda3 (2) mount -t ext3 /dev/sda3 /mnt/sda3/;mount -t ext3 /dev/sda7 /mnt/sda7/ (3) cp -a /mnt/sda7/* /mnt/sda3/ (4) modify /mnt/sda3/etc/fstab to change the location of ‘/’ (5) modify /boot/grub/grub.conf, add something as follows: Code:
title NewFedora (2.6.25.3-18.fc9.i686) (6) rebbot I choose the NewFedora(/dev/sda3) and I can see the Fedora9 GUI login interface, I try login as root or other user, all failed. I switch to VT (using Ctrl+Alt+F1) to login in, failed. I try the ssh-client from other computer, got this: Code:
last login..... here is the /dev/sda3: Code:
[...]$ ll -a /mnt/sda3/ Code:
UUID=bea271e0-5490-4701-9039-3e2e432b87f5 / ext3 defaults 1 1 I hate reinstall system. I need your help. Any suggestion will be appreciate. :) |
You moved the root partition, but did you run grub-install to tell grub the new location.
|
Quote:
I didn't do grub-install. I have modified /boot/grub/grub.conf to tell the location of my new '/' partition, and when system boot up, it works. The key problem is 'bash' permission error, but the sshd and login are ok. I don't know why. |
link /usr and /var
In the past I have solved similar situations (more space needed for root partition) by moving the /usr and /var directory to the new partition, creating softlinks to these new locations in the root partition. In that case GRUB settings are unchanged and only /etc/fstab has to be modified to auto-mount the new partition.
As for your current problem I would suggest to either copy back everything and see if you can restore the system that way before proceeding with any alternatives. I'm also curious what user account from the LiveCD was in charge when you copied everything. You should check what user ID's are involved, the displayed names can be misleading. I suspect that there is really some permission problem involved, somehow. |
Why don't you use (g)parted?
|
I did 'cp -a' as root in liveCD.
"creating softlinks to these new locations in the root partition" is a nice try. |
Quote:
I gonna have a try. |
Umm, parted is the program there are at least two frontends. You can either use gparted (gnome) or KDE's qtparted. I simply forgot to mention that, so please do not search for the program with the brackets still contained in its name.
|
All times are GMT -5. The time now is 09:11 PM. |