tmp72
August 22nd, 2013, 05:37 AM
I had 2 hard drive:
1) Windows 7 (NTFS)
2) Ubuntu (ext), linux-swap (swap)
I bought new hard drive what is 3x more faster than my older. So i decided to move my operations systems to new HDD.
Ofc i didn't installed them as fresh but used some software to copy all three (Windows, linux, linux-swap) partitions to new HDD.
It finished successfull. I marked new Windows partition as active. After this opertaion, i unplagged both older HDD from PC. Now i used lubuntu LiveCD to change /etc/fstab file and rewrite GRUB 2. Ok, done. Now i'm able to launch "new" linux from "new" partition on new HDD. (I got a problem with linux-swap but doesn't matter right now)
Ok cool story bro, but now i got some !#$^% problem how to add Windows entry to GRUB menu?
I tried with:
adding lines to /etc/grub.d/40_custom
#!/bin/shexec tail -n +3 $0
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}
then
grub-mkconfig -o /boot/grub/grub.cfg
Right now inside grub.cfg there are no lines about Windows entry. So i tried:
update-grub
or
update-grub2
Not working all, still no Windows entry on grub.cfg and GRUB list after restart.
What should i do?
1) Windows 7 (NTFS)
2) Ubuntu (ext), linux-swap (swap)
I bought new hard drive what is 3x more faster than my older. So i decided to move my operations systems to new HDD.
Ofc i didn't installed them as fresh but used some software to copy all three (Windows, linux, linux-swap) partitions to new HDD.
It finished successfull. I marked new Windows partition as active. After this opertaion, i unplagged both older HDD from PC. Now i used lubuntu LiveCD to change /etc/fstab file and rewrite GRUB 2. Ok, done. Now i'm able to launch "new" linux from "new" partition on new HDD. (I got a problem with linux-swap but doesn't matter right now)
Ok cool story bro, but now i got some !#$^% problem how to add Windows entry to GRUB menu?
I tried with:
adding lines to /etc/grub.d/40_custom
#!/bin/shexec tail -n +3 $0
menuentry "Windows 7 (loader) (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
chainloader +1
}
then
grub-mkconfig -o /boot/grub/grub.cfg
Right now inside grub.cfg there are no lines about Windows entry. So i tried:
update-grub
or
update-grub2
Not working all, still no Windows entry on grub.cfg and GRUB list after restart.
What should i do?