linux rescue 모드에서 RPM 설치하는 법 좀 알려주세요.

freesky의 이미지

페도라 4를 사용 중입니다.

실수로 selinux-policy-targeted 패키지를 지웠는데 그 뒤로 부팅하면 커널패닉이 일어나는군요. (패키지 하나 지웠다고 이렇게 되다니..) :evil:

그래서 리눅스 CD로 linux rescue 모드로 들어가서

chroot /mnt/sysimage로 루트 디렉토리를 설정하고

RPM을 설치하려니 설치가 안 됩니다. 설치 시작 스크립트 쪽에서 에러가 나는 듯합니다.

rpm -Uvh --root=/mnt/sysimage <패키지 이름>

이렇게 명령을 내려 봐도 역시 안 되는군요.

혹시 linux rescue 모드에서 RPM을 설치할 줄 아시는 분 계신가요?

아니면 부팅 시 옵션을 이용해서 SELinux를 비활성화할 수 있는 방법이라도 알려주시면 고맙겠습니다.

부트로더는 Grub입니다.

akkmo의 이미지

RedHat 7.3 에서는 rescue 모드로 부팅한 후에
파티션 정보를 확인합니다.

/dev/sda1 ---> /boot
/dev/sda2 ---> /

라고 가정한다면

mkdir /sda2
mount -t ext3 /dev/sda2 /sda2
mount -t ext3 /dev/sda1 /sda2/boot
chroot /sda2

와 같이 합니다.

단풍의 이미지

/boot/grub/grub.conf

    default=0 timeout=5
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux ES (2.6.9-22.0.1.ELsmp)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.9-22.0.1.ELsmp ro root=/dev/sda1 rhgb quiet selinux=0
    initrd /boot/initrd-2.6.9-22.0.1.ELsmp.img
SELinux 기능을 잠시 꺼 놓고 부팅해서 다시 패키지 설치하면 되지 않을까요?
    [root@ask /etc/selinux]# cat config # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    # enforcing - SELinux security policy is enforced.
    # permissive - SELinux prints warnings instead of enforcing.
    # disabled - SELinux is fully disabled.
    SELINUX=disabled
    # SELINUXTYPE= type of policy in use. Possible values are:
    # targeted - Only targeted network daemons are protected.
    # strict - Full SELinux protection.
    SELINUXTYPE=targeted
    [root@ask /etc/selinux]#
[/][/]
freesky의 이미지

Grub에서 selinux=0

이 옵션으로 해결했습니다.

답변 달아주신 분들께 감사드립니다.

올해에는 꼭 노트북이 생기게 해 주세요.