regarding not updating to grub2: I suppose it would theoretically be possible using the grub-legacy package from AUR (or just always replacing /boot/vmlinuz-linux and /boot/initramfs-linux.img and never touching grub again) but still: grub1 is not part of the standard package database any more, but I suppose you are right.
regarding grub2 should not have overwritten /boot: Yes, I think so too. ^^ Seriously: It is certainly possible that I made some other mistake or misred some error message or (I don't know, a million possibilities), I'll pay attention to this when I take on updating one of my remaining Archs to grub2
Thanks.
]]>I suspect the use of msdosX in specifying partitions may be because the current grub can also deal with GPT partitioned disks - on my machine, it uses (hdX,gptY). I rather like that this makes it obvious what sort of partition map I'm dealing with.
]]>It does, however, make the update process always time consuming and difficult with most likely one or two things breaking. I guess we have to live with it.
I run arch on 2 more computers which I'm also going to have to update with migtation to systemd and grub2 ... I'm not looking forward to it ;-). Though I have to say that systemd did not turn out as bad as I feared and did actually not break my system ^^
]]>I never had grub-install delete my kernel, or anything else that doesn't belong to it, so I don't know what happened there.
]]>I only saw them now; at the time you posted I had already tried to reboot.
as anticipated, it did not work. however, it provided me with a very interesting evening with a liveCD.
the problem was: the kernel does not like the partition table to change and will ignore any changes until the next reboot ("hdparm -z /dev/sda", i.e. forcing the kernel to see reason and to accept the new partition table did not work) ... which means when I re-mkfs'ed the boot partition it used the old partition table and on reboot partition table and filesystem were inconsistent. jackpot.
so i reformated the partition table another time from a chroot environment. this time grub-install ran cleanly. however it also deleted my kernel. not very nice. i do not really know why or how, the only way i can make sense of it is that it completely deletes the /boot partition. no idea why? it was not really a problem because I still had the backup of the boot partition; but at that point I was convinced that grub2 is a desaster in any possible way.
it took me another 30 minutes to figure out how grub-mkconfig puts the grub2 config together ... and another 30 minutes to figure out that the contents of /etc/grub.d/ are ignored if they are not executable (chmod +x)
finally it appears the device naming convention has changed from (hd0,0) in grub to 'hd0,msdos1' in grub2 for which I also fail to see a good reason.
a couple of hours later my system feels and looks still very messy but I got it up and running again...
thanks, ataraxia & WonderWoofie, for your ideas; good night.
]]>Otherwise: You can try to make the kernel reread the partition table immediately with kpartx, blockdev, or hdparm. It might not work if things are still mounted.
If you do need to reboot, I suggest using a current install media and chrooting in to finish the grub-install.
]]>grub has been replaced by grub2; https://wiki.archlinux.org/index.php/Gr … ode_region states to migrate from grub to grub2 as follows
# modprobe dm-mod
# grub-install --target=i386-pc --recheck --debug /dev/sda
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
to the second command, my system responds that ...
$ grub-install --target=i386-pc --recheck --debug /dev/sda
(...)
+ /usr/sbin/grub-probe -t fs /boot/grub
+ return 1
+ gettext_printf 'Path `%s'\'' is not readable by GRUB on boot. Installation is impossible. Aborting.\n' /boot/grub
+ gettext_printf_format='Path `%s'\'' is not readable by GRUB on boot. Installation is impossible. Aborting.\n'
+ shift
++ gettext 'Path `%s'\'' is not readable by GRUB on boot. Installation is impossible. Aborting.\n'
+ printf 'Path `%s'\'' is not readable by GRUB on boot. Installation is impossible. Aborting.\n' /boot/grub
Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
+ exit 1
$
... which is unfortunate. searching (the arch forums and google) for this error reveals several possible causes:
* dm_mod not loaded (but for me lsmod confirms that dm_mod is loaded)
* EFI disk (to my knowledge this does not apply for me)
* recent change in the partition table (the apparent suggestion being to reboot - however, this does of course not help if the bootloader is not working)
The last one (if it is true and this could be the cause) might be very likely. grub-install had first complained that there was not sufficient space for the core.img between the MBR and the first partition (in fact, there was no space, first partition started at sector 1). therefore I repartitioned the disk using fdisk to have the 2048 empty sectors it needs between the MBR and /dev/sda1 (and had to back up everything from /boot and reformat the fs on /boot).
grub-install will also not work if used with the --force switch; same error as above.
So: What do I do to make grub-install believe that I am serious about the installation and that the installation command is not a just suggestion that it simply can dismiss with some speculations about what might or might not be readable on boot?
]]>