By the way, if you're wondering how I knew the answer to this question, I just did an Ixquick search on the exact error message you got, and I found a topic on another board that discussed how to fix it.
]]>I'm not absolutely sure. I suspect you do not have to do those steps again if the directory exists and you ran the cp command.
Just so we're clear, I never promised that anything I recommended would not "mess up your system." But if it does, I'm sure WonderWoofy will be happy to help you fix it (And breaking things and fixing them is a learning opportunity)
Thanks for everybody the help.
Grub now, successfully installed in mbr.
One more question before I mark the thread solved.
Should I issue the: # chattr +i ... command to make the directory "immutable" again, or just leave as it is?
]]>Just so we're clear, I never promised that anything I recommended would not "mess up your system." But if it does, I'm sure WonderWoofy will be happy to help you fix it (And breaking things and fixing them is a learning opportunity)
]]>Use the command in my post (the one you quoted). You set it with +i, so unset it with -i.
One more question before I go ahead and do that. After instlling grub:
# grub-install --target=i386-pc --recheck --debug /dev/sda
Do I still have to do:
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
I already have done these when intalled arch at first time.
I already have the "locale" directory on my system.
Im asking these questions just to make sure I won't mess up my system.
]]>You will need to unset that flag. "immutable" means "don't allow this file to be changed or deleted."
# chattr -i /boot/grub/i386-pc/core.img
How should I do that? Or you think it is better not to mess with grub and leave as it is now?
]]> A file with the `i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file.
# chattr -i /boot/grub/i386-pc/core.img
How did you install grub the first time? Did you set the immutable flag on core.img when you installed grub? Did you issue this command:
# chattr +i /boot/grub/i386-pc/core.img
?
Yes, I did because, the first time I installed grub in its own partition, rather than mbr.
]]># chattr +i /boot/grub/i386-pc/core.img
?
]]>dm_mod?
]]>I would like to restore grub to mbr.
This is what I have done so far.
I mounted the target partition into /mnt.
I arch-chroot-ed into /mnt
I issued the command: grub-install /dev/sda
I got the message: rm cannot remove /boot/grub/i386-pc/core.img: Operation not permitted
Could anyone help how to proceed?
Thanks.