본문 바로가기

OS/_Linux

[영남이공대학교 사이버보안과]Linux- 2)GRUB

리눅스 부트로더 :grub

부트로더 란:시스템에 설치되어 있는 운영체제로 부팅될 수 있도록 해주는 프로그램

 

grub 장치명

원래 리눅스에서 사용하는 장치명과 grub에서 사용하는 장치명은 상이함


 

  예) (hd0,0):첫번째 하드디스크의 첫 번째 파티션, 각 번호는 0부터 시작됨

grub 설정파일

/etc/grub.conf -> /boot/grub/grub.conf



grub 설정파일의 분석

1.root(hd0,0)

2.kernel /vmlinuz-6.32-358.el6.i686.img ro root=/dev/sda3

3.initrd /initramfs-6.32-358.el6.i686.img

4.boot

grub password 걸기

grub -> md5crypt -> ycdc2014(해쉬암호) -> /etc/grub.conf ->맨 밑으로가서 o로 추가 -> password md5 (ycdc2014해쉬값)

 

password를 잃어버렸을 때 긴급 복구 하는버

리눅스부팅 CD를 넣고 rescue모드 -> chroot /mnt/sysimageroot변경 /etc/grub.conf파일에서 패스워드 삭제 -> exit -> reboot(동시에 CD빼기)


-출처 : 강모씨의 정리파일 中