grub2 윈도우즈7 부팅

joshuakwon의 이미지

우분투 10.04 사용자입니다.
제가 HDD 2개를 가지고 있습니다.
PC는 삼성 DM-V190이구요.

첫번째 HDD에 복구파티션(/dev/sda1)과 윈도우즈7(C드라이브;/dev/sda3), 백업(D드라이브;/dev/sda4)
두번째 HDD에 리눅스
를 설치했습니다.

그런데 부팅할때 grub2 메뉴 중에서 windows7(/dev/sda2) <- /dev/sda3인데 /dev/sda2로 잡혀있네요...
를 선택하면 error: no such device: 3638b6933866521b
error: no such partition
press any key to continue.
라고 에러가 납니다.

어떻게 하면 windows7이 제대로 부팅될까요?

송효진의 이미지

title Windows 7
rootnoverify (hd0,2)
chainloader +1

이 얘기 맞나 모르겠네요.

emerge money
http://wiki.kldp.org/wiki.php/GentooInstallSimple - 명령어도 몇 개 안돼요~
http://xenosi.de/

danskesb의 이미지

grub2라면 저렇게 쓰면 안 됩니다.

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

---- 절취선 ----
http://blog.peremen.name

joshuakwon의 이미지

말씀하신대로 해보았지만 여전기 같은 에러가 나네요

/etc/grub.d/40_custom 파일에 말씀하신 내용을 쓰고

update-grub하고 나니

/etc/grub.d$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-22-generic
Found initrd image: /boot/initrd.img-2.6.32-22-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Vista (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
done

라고 나옵니다.

tslinux@tslinux-desktop:~$ more /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}

function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
set locale_dir=($root)/boot/grub/locale
set lang=ko
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, 그리고 Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=4d0bc59a-bc19-4a93-8b00-49396e46281d ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, 그리고 Linux 2.6.32-22-generic (복구 모드)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
echo 'Linux 2.6.32-22-generic을 불러옵니다 ...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=4d0bc59a-bc19-4a93-8b00-49396e46281d ro single
echo '가상 램디스크를 불러옵니다.'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, 그리고 Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=4d0bc59a-bc19-4a93-8b00-49396e46281d ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, 그리고 Linux 2.6.32-21-generic (복구 모드)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
echo 'Linux 2.6.32-21-generic을 불러옵니다 ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=4d0bc59a-bc19-4a93-8b00-49396e46281d ro single
echo '가상 램디스크를 불러옵니다.'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set 4d0bc59a-bc19-4a93-8b00-49396e46281d
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sda1)" {
insmod ntfs
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 04c88f11c88f0062
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 3638b69338b6521b
chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows7(on /dev/sda3)"{
set root=(hd0,2)
#drivemap -s hd0 hd1
chainloader +1
}
### END /etc/grub.d/40_custom ###

joshuakwon의 이미지

1

joshuakwon의 이미지

댓글 삭제가 안되네요....

joshuakwon의 이미지

1

joshuakwon의 이미지

1

joshuakwon의 이미지

1

검객의 이미지

grub2는 언제생긴 녀석이래요??
오늘 첨 봤네요..
아무튼..
grub2도 grub과 비슷할거라 생각하고 몇가 적습니다.

윈도7이 /dev/sda3에 설치되어 있지만 윈도7을 부팅하는 파티션이 따로 있고 그 파티션이 /dev/sda2일 겁니다.
그래서 /dev/sda2로 잡혀 있을거구요.

grub2에도 map 명령어가 있는지 모르겠지만 grub2가 두번째 하드에 설치되어 있고 윈도우7이 첫번째 하드에 설치되어 있으면
map명령어로 하드를 교체(?)해 줘야 합니다. 물론 이건 윈도우 xp일 경우의 내용인데 윈도우7도 마찬가지일거라고 생각되서
map명령어가 필요할것 같네요.

menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
map (hd0) (hd1)
map (hd1) (hd0)
set root='(hd0,2)'
chainloader +1
}

우리 항시 웃고 살아요 ^^

joshuakwon의 이미지

error: unknown command 라는 메세지만 나오네요....

누구 좀 도와주실 분 없으신가요? T.T

검객의 이미지

map 명령어가 grub2에서는 drivemap으로 바뀌었네요. 그래서 error: unknown command가 나왔을 겁니다.
직접해보지 않고 생각만으로 하려니 쉽지 않네요.

일단 아래의 설정으로 부팅해 보시구요.
menuentry "Windows 7 (loader) (on /dev/sda2)" {
insmod ntfs
insmod chain
insmod drivemap
drivemap -s (hd1) (hd0)
set root=(hd1,2)
chainloader +1
}

안되면 몇가지를 바꿔가면서 해보세요.
바꿔야 할 부분은 위의 설정을 기준으로 해서 바꾸면 됩니다.

1번째 방법
set root=(hd1,2)를
set root=(hd0,2)로 바꿔 본다.

2번째 방법
drivemap -s (hd1) (hd0)를 제외 시켜본다.

3번째 방법(peremen님이 알려주신 방법과 같은 방법 입니다. 이 방법이 이미 실패 했다면 해볼 필요는 없습니다.)
drivemap -s (hd1) (hd0)를 제외 시키고
set root=(hd0,2)로 바꿔 본다.

꼭 성공하시길 바랍니다.

우리 항시 웃고 살아요 ^^

rogon3의 이미지

1. /etc/grub.d/xx_otheros를 편집해야 합니다

저는 /etc/grub.d/30_otheros를 편집해서 grub 2가 먹어버린 xp 부팅을 살렸습니다

2. 그리고 한가지 더 중요한 점은 /etc/grub.d/XXXX 파일의 편집을 끝냈으면
반드시 !!! 터미널에서 update-grub 명령으로 변경사항을 적용시켜줘야 한다는 점입니다

3. 또한 grub 2의 경우 이전 grub와 달리 파티션 넘버링 방법이 바뀌었습니다

예를 들어 grub에서 hd(0,0) 였던건 grub 2에서는 hd(0,1)입니다

즉, 물리하드의 넘버링은 기존 grub와 같으나 (hd(0, )) 파티션 넘버링에 있어서 0부터 시작하는게 아니라 1부터 시작합니다(LILO와 비슷)

따라서 헷갈리지 않으려면
데비안계열인 경우 $ sudo fdisk -l 명령으로 현재 장착된 하드의 파티션 구성을 확인하고 /etc/grub.d/30_otheros 파일을 수정하는게 좋습니다

그러므로 첫파티션에 윈7이 있다면 /etc/grub.d/30_otheros파일을 열어 hd(0,1) 으로 수정하고 저장한 후 터미널을 열어

$ sudo update-grub 명령을 실행해서 변경사항을 grub에 적용하면 됩니다

*******************************
데비안과 세벌식 사용자입니다

*************************************

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.