So this is a long lived Arch 64bit installation that has behaved well on a Toshiba laptop. It looks like this when I boot into the LTS kernel:
So it is pretty much a matter of "simply" replacing Grub with Grub2. in my BIOS system.
Since I am very nervous at this point I chicken out and make a backup of my old grub stuff
Code: Select all
sudo mv /boot/grub /boot/grub-legacyThis is also handy for checking out what settings you had in the old menu.lst when you set up Grub2 later....
I also need to backup my current MBR which contains the boot code and the partition table
Code: Select all
dd if=/dev/sdX of=/path/to/backup/mbr_backup bs=512 count=1Arch is also telling me:
Only 446 bytes of the MBR contain boot code, the next 64 contain the partition table. If you do not want to overwrite your partition table when restoring, it is strongly advised to backup only the MBR boot code:
So monkey see and monkey do:
Code: Select all
dd if=/dev/sdX of=/path/to/backup/bootcode_backup bs=446 count=1This should be enough to save my bacon if I FUBAR
So here we go; time to replace the good old Grub (legacy) with the new Grub(2):
In Arch it is done like this:
Code: Select all
pacman -S grub-biosSo now the old grub is gone - probably not a good time to boot.....
Since I want to Install to 440-byte MBR boot code region
I setup grub-bios in the 440-byte Master Boot Record boot code region, populate the /boot/grub directory, generate the /boot/grub/i386-pc/core.img file, and embed it in the 31 KiB (minimum size - varies depending on partition alignment) post-MBR gap (MBR disks) or in BIOS Boot Partition (GPT disks):
Code: Select all
# 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.moYes I only copied that code from the Arch site and the stuff monkey see and monkey do style.
That last command gave me an error message though ("not a directory"??) so by now I am sweating a lot. And no matter how often I repeat it the error stays so I feel I have no choice but moving on.Please Arch don't let me down now we are so close to the finish line..
Generating GRUB2 BIOS Config file to finish:
Code: Select all
grub-mkconfig -o /boot/grub/grub.cfg/etc/grub.d/10_linux is set to automatically add menu items for Arch linux that work out of the box, to any generated configuration. Other operating systems may need to be added manually to /etc/grub.d/40_custom or /boot/grub/custom.cfg
Time to reboot then