GRUB 설정 CeotOS7

윈도우 설치 -> 리눅스 설치 하면 grub에서 윈도우랑 리눅스 멀티 부팅을 하도록 자동으로 잡아준다
하지만 여기에 다시 리눅스를 설치하면 기존 grub설정에서 윈도우는 사라진다
다시 윈도우랑 멀티 부팅을 하고 윈도우를 default 부팅으로 하기 위한 설정이다.
리눅스 설치 후 윈도우 설치시에 멀티부팅 방법은 다음 기회에...

fdisk -l | more

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   249700351   124746752    7  HPFS/NTFS/exFAT
/dev/sda3       499191808   500113407      460800   27  Hidden NTFS WinRE
/dev/sda4       249700352   499191807   124745728    5  Extended
/dev/sda5       249702400   251799551     1048576   83  Linux
/dev/sda6       251801600   499191807   123695104   8e  Linux LVM



cd  /etc/grub.d/

vi 40_custom


 menuentry "Windows 7" {
         set root=(hd0,1)
         chainloader +1
         }



grub2-mkconfig --output=/boot/grub2/grub.cfg

grub2-set-default 2

댓글

이 블로그의 인기 게시물

LSF (GPU 스케쥴링) 명령어 사용법

CentOS 7 리부팅 없이 새 디스크 인식 (find a new disk without reboot)

python에서 hive 사용