Hi, been a while posting but got into a situation where i have purchaced a new ASUS 550 with EFI boot + GPT installed.
It took a while to get grub2 working, but have somewhat.
Manual install is needed if you
1) want to EFI boot off GPT type hd's and dont want to destroy existing partitions or data (in my case an existing Windows Install)
2) If you have a USB style install to your HD, ie with a KNOPPIX/knoppix-data.img setup.
I have been using a USB install to HD since about knoppix 6.4. I also wanted to keep windows for one and only one reason (Turbo Tax) which i have been using for years.
Plus with usb sticks protruding out of the side of my PC is a matter of time until bump/breakage.
So I needed to manually install grub2 (of which i knew nothing about until this EFI/GPT PC).
With a USB style install to HD you need to have a bootable usb stick or mmc boot. To this day i rarely use lilo boot, but came in handy with GPT.
I still use all the syslinux/*.cfg files as a basis for grub entries.
And the linux/linux64 files. So my /mnt-system looks like the following:
# /dev/sda2 aka (hd0,1) aka (hd1,gpt2) EFI boot on GPT partition 2
# I duplicate this also to /dev/sda4 (hd0,3) and on grub2 (hd1,gpt4) which is big enough to hold 3 DVD KNOPPIX versions which is aka /mnt-system after boot
# /mnt-system is what grub-* cmds wiill alter for the ones that will work with --boot-directory
boot/isolinux -> syslinux # compatibility with lilo (important again with EFI+GPT) # symlink on fs that support it, eg ext2-4, etc just a copy on fs such as VFAT that do not support symlinks.
boot/syslinux -> syslinux74 # defaults to latest # symlink on fs that support it, eg ext2-4, etc just a copy on fs such as VFAT that do not support symlinks.
boot/syslinux72 # Knoppix 7.0 syslinux dir
boot/syslinux70 # Knoppix 7.2 syslinux dir
boot/syslinux74 # Knoppix 7.4 syslinux dir
boot/grub # prior to grub2 this only had menu.lst but with grub2 now al the files that come with grub2 (modules, etc) + grub.cfg
boot/grub/menu.lst # legacy grub <= 0.97 file for reference and "master copy from combining syslinux*.cfg entries into grub-legacy entries
boot/grub/grub.cfg # generated grub-menulst2cfg or by grub-pc.postinst using menu.lst in same dir
# This goes in the first partition with enough size along with a duplicate boot partition above, which is /dev/sda4 - aka grub legacy: (hd0,3) and grub2: (hd1,gpt4)
KNOPPIX -> KNOPPIX74 # symlink on fs that support it, eg ext2-4, etc just a copy on fs such as VFAT that do not support it.
KNOPPIX70 # entries with knoppix_dir=KNOPPIX70
KNOPPIX72 # entries with knoppix_dir=KNOPPIX70
KNOPPIX74 # entries with knoppix_dir=KNOPPIX70
/boot/grub/menu.lst # prior to grub2 install this is the only file in boot grub
boot/syslinux* # duplicate of all above dirs
Rememeber to apt-get install -t testing util-linux to update fdisk to even see your GPT properly. Do ths for each usb drive and knoppix-data.img you have.
1.99 grub2 is not compatible with 2.02 grub2. The difference between apt-get install grub2 grub-pc and apt-get install -t testing grub-pc as of 3/30/2015
The format is basically the same except 1.99 has entries like this:
grub2 2.02 grub2 1.99 grub 0.97
linux legacy_kernel vs kernel legacy grub <= 0.97
initrd legacy_initrd vs initrd
vi /mnt-system/boot/grub/*.cfg
:%s@legacy_kernel@linux@
:%s@legacy_initrd@initrd@
:%s@hd0,1@hd1,gpt2@ # this maps to /dev/sda2 the GPT efi boot/partition which may be different on your system
The errors on 1.99 and 2.02 are the same on any usb style install:
apt-get install [-t testing] grub2 grub-pc has many errors on install
Wether grub2 v1.99 or grub2 v2.02
You must edit the /var/lib/dpkg/info/grub-pc.postinst script and add this to beginning of 1st executable line:
root=/mnt-system # set to "" to get default behaviour
sudo vi grub-pc.postinst and substituted every /boot with /mnt-system/boot by making $root/boot...:
:%s@/boot@$root/boot#@g # many of these in script
:%s@ / /@ $root/ /@ # there's one lonesome root without /boot in the grub-pc.postinst script
:%s@grub-install@grub-install --boot-directory=/mnt-system@
:wq
then sudo ./grub-pc.postinst configure # this will run the command within
After this change you can simple change export root="/mnt-system" to "fix" for knoppix usb installs or "" to restore original script to it's regular operation
Even with this change grub-probe will return with an grub-probe error that it cant find the device for /boot,
but well after it's done most of the installation (and conversion of menu.lst to grub.cfg and many other conversion steps).
Even with this change, until grub2 supports an enviroment var, eg export ROOT_BOOT=/mnt-system, manyl grub2 cmds will report errors.
An alternative is to add --boot-directory=/mnt-system/boot to the grub-install commands and all that will accept it but this is only a few that I have found.
Note that you may try this with export root="" at beginning of grub-pc.postinst
then run: sudo grub-pc.postinst configure to convert those in the /boot/grub stuff as well (although i dont think it will be a complete conversion, it should remove all those legacy stage files and create a new grub.cfg from menu.lst).
after this error you can now rsync /mnt-system/boot /media/sda2 (after mounting /dev/sda2) to get a dup of the resulting files. Remember i am using /dev/sda2
as gpt2 on my primary hard drive since it's EFI/grub_boot partition.
setting grub_boot flag on GPT partition via parted or gdisk (a fdisk replacement) is much different from legacy boot flag of ATA drives/partitions.
you may need to set this flag on your EFI/fat partition if not already set (via gdisk or parted).
DELL Precision T3610 Intel Xeon E5-1620 V2 3.70Ghz 8GB Nvidia NVS 315 No HDD
$89.00
Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 32gb / 500gb / 495w
$164.99
LOT OF 2 Pair Intel Xeon E5-2690v4 2.6Ghz 14-Core 135W 35MB LGA2011-3 CPU SR2N2
$89.99
Supermicro MotherBoard X11SPi-TF Xeon Single CPU Socket LGA3647 w/Heatsink
$279.99
Intel Xeon E5-2697 V2 2.7GHz 12 Core 30M LGA2011 130W SR19H CPU Processor
$24.99
Intel Xeon Gold 6148 SR3B6 2.40GHz 20-Core 27.5MB LGA3647 CPU Processor
$49.99
Intel Xeon Gold 6240 2.6GHz 24.75MB 18-Core 150W LGA3647 SRF8X CPU PERFECT PULL
$89.97
INTEL XEON X5675 3.06GHz FCLGA1366 CPU Processor Tested Working
$11.99
Intel Xeon Gold 6248 SRF90 2.5GHz 20-Core 28MB CPU Processor C5
$154.99
Intel Xeon Gold 6230 2.1GHz 27.5MB 20-Core LGA 3647 CPU / Processor ___ SRF8W
$94.99