You are not logged in.
I'm setting up a dual boot system in BIOS-MBR mode with arch and win7 on my new laptop. I set up windows as normal, and then after much poking around, I finally got arch installed and running. Since I had had trouble with it in previous attempts, I decided to wait until I finished installing before configuring GRUB to boot into windows.
I added the following text into /etc/grub.d/40_custom as given in this wiki page:
if [ "${grub-platform}" == "pc" ]; then
menuentry "Microsoft Windows Vista/7/8/8.1/10 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 F0A6268DA626547E
ntldr /ntldr
}
fi
But when I ran grub-mkconfig -o /boot/grub/grub.cfg I got this error text:
[root@(hostname) ~]#grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file...
Found linux image: /boot/vmlinuz-linux.img
Found initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-fallback.img
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 169
Syntax errors detected in generated GRUB configuration file.
Ensure there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
Since the only thing I changed between the wiki page and my own file was to put in the uuid of my windows boot partition instead of the uuid from the example, I'm not sure what the problem could be. Just like in the example, /dev/sda1 is my windows boot partition, with sda2 being my C: drive in windows. Forum and google searches didn't have anything useful, so I'm hoping someone can show me where I went wrong.
Last edited by Leafy Greens (2017-09-22 03:02:40)
Explicit um est volumen
(The scroll has been completely unrolled)
Offline
What is on line 169?
Offline
What is on line 169?
Of course that would have to be the one thing I forget to put in the original post. Here:
169 #if [ "${grub-platform}" == "pc" ]; then
It looks like GRUB commented out the lines that caused the error, but other than that, exactly as I entered them. Maybe the brackets and braces are incorrectly formatted?
Explicit um est volumen
(The scroll has been completely unrolled)
Offline
if [ "${grub-platform}" == "pc" ]; then
if [ "${grub_platform}" == "pc" ]; then
Do you see the difference?
Last edited by 2ManyDogs (2017-09-22 00:24:17)
Offline
Leafy Greens wrote:if [ "${grub-platform}" == "pc" ]; then
arch wiki wrote:if [ "${grub_platform}" == "pc" ]; then
Do you see the difference?
Aha! Man, I hate underscores sometimes. That fixed it, thanks!
Explicit um est volumen
(The scroll has been completely unrolled)
Offline