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
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3af63af5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 892 7164958+ b W95 FAT32
/dev/sda2 893 2167 10241437+ c W95 FAT32 (LBA)
/dev/sda3 2168 4079 15358140 c W95 FAT32 (LBA)
/dev/sda4 4080 4864 6305512+ 5 Extended
/dev/sda5 4080 4092 104391 83 Linux
/dev/sda6 4093 4222 1044193+ 82 Linux swap / Solaris
/dev/sda7 4223 4864 5156833+ 83 Linux
Because the '/' is growing bigger and bigger, I decide to get more space for my fedora. But the free space(/dev/sda3) is not adjacent to '/'(/dev/sda7), so i can't merge these two partitions using fdisk.
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)
root (hd0,4)
kernel /vmlinuz-2.6.25.3-18.fc9.i686 ro root=/dev/sda3 rhgb quiet
initrd /initrd-2.6.25.3-18.fc9.i686.img
title Fedora (2.6.25.3-18.fc9.i686)
root (hd0,4)
kernel /vmlinuz-2.6.25.3-18.fc9.i686 ro root=/dev/sda7 rhgb quiet
initrd /initrd-2.6.25.3-18.fc9.i686.img
The first title is all about of my 'new' system location. And I can login the original one.
(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.....
/bin/bash: permission denied.
I google the "/bin/bash: permission denied" and discover this land. I have read all title with '/bin/bash: permission denied', and I check the file system access mode.
here is the /dev/sda3:
Code:
[...]$ ll -a /mnt/sda3/
Total 96
drwxr-xr-x 19 root root 4096 06-15 22:28 .
drwxr-xr-x 5 root root 4096 05-17 21:57 ..
drwxr-xr-x 2 root root 4096 05-28 10:12 bin
drwxr-xr-x 2 root root 4096 05-17 18:15 boot
drwxr-xr-x 2 root root 4096 05-17 18:18 dev
drwxr-xr-x 124 root root 8192 06-15 22:28 etc
drwxr-xr-x 3 root root 4096 06-15 13:41 home
drwxr-xr-x 15 root root 8192 05-26 09:34 lib
drwx------ 2 root root 4096 05-17 18:15 lost+found
drwxr-xr-x 2 root root 4096 06-15 22:25 media
drwxr-xr-x 5 root root 4096 05-17 21:57 mnt
drwxr-xr-x 2 root root 4096 05-17 18:15 proc
drwxr-x--- 36 root root 4096 06-15 16:16 root
drwxr-xr-x 2 root root 8192 05-28 10:12 sbin
drwxr-xr-x 2 root root 4096 05-17 18:18 selinux
drwxr-xr-x 2 root root 4096 05-17 18:15 sys
drwxrwxrwt 129 root root 4096 06-15 22:27 tmp
drwxr-xr-x 13 root root 4096 06-01 14:38 usr
drwxr-xr-x 23 root root 4096 05-17 16:01 var
here is my 'new' system's fstab:
Code:
UUID=bea271e0-5490-4701-9039-3e2e432b87f5 / ext3 defaults 1 1
UUID=ff4b53a9-a43e-4e0f-8159-d39ad8b0a51d /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=eff25086-826d-4d3e-9694-27cc0cc497f6 swap swap defaults 0 0
I can't login in this 'new' system, so I can't use strace to debug this problem.
I hate reinstall system. I need your help. Any suggestion will be appreciate.
