[arch-general] Quick question about post-MBR gap?
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date). I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work? I can't find that as an explicit statement in any of the documentation that I have read for installs/grub2/partitioning! i.e. does grub2 still need to embed the core.img file in the post-MBR gap as the preferred and dev recommended approach in this case? The reason I would like to have that explicit answer is that if I want to install arch on a machine which has a pre-existing NTFS partition, and possibly host-protected partition as well for Windows recovery, at the start of the drive, then if the 2MiB post-MBR gap is a requirement (rather than a nicety) for grub2 with BIOS and MBR partitioning (but no GPT partitioning or UEFI) then unless the drive is re-partitioned and the NTFS partition reduced in size and moved out by 2MiB then there could be problems? However doing that partition jinking about might itself lead to a few issues! I am going to do an install with new partitioning on an old laptop to check that I can successfully use the new install system (without AIF) and hopefully that will work, but I also have other machines with existing and important (to me) Windows partitions that I would really like to NOT corrupt when installing arch to the partitions on their drives. The other reason I am asking this question is that I also have existing dual boot laptops with Windows XP and arch with BIOS and MBR partitioning - and at some point it would presumably be sensible to move from the existing grub to grub2 - and on these systems where I have already checked that there is only a 64 sector post-MBR gap - will this lead to problems if I change from grub to grub2 if I don't change the partitions to have a 2MiB post-MBR gap? Thanks for any help on this - I have been doing reading and trying to prepare without looking an idiot and being a good arch admin, but there is quite a lot to read and I still can't find the answer to the explicit question above! -- mike c
On Wed, Jul 18, 2012 at 7:40 PM, mike cloaked <mike.cloaked@gmail.com> wrote:
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date).
I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work? I can't find that as an explicit statement in any of the documentation that I have read for installs/grub2/partitioning! i.e. does grub2 still need to embed the core.img file in the post-MBR gap as the preferred and dev recommended approach in this case?
The reason I would like to have that explicit answer is that if I want to install arch on a machine which has a pre-existing NTFS partition, and possibly host-protected partition as well for Windows recovery, at the start of the drive, then if the 2MiB post-MBR gap is a requirement (rather than a nicety) for grub2 with BIOS and MBR partitioning (but no GPT partitioning or UEFI) then unless the drive is re-partitioned and the NTFS partition reduced in size and moved out by 2MiB then there could be problems? However doing that partition jinking about might itself lead to a few issues!
I am going to do an install with new partitioning on an old laptop to check that I can successfully use the new install system (without AIF) and hopefully that will work, but I also have other machines with existing and important (to me) Windows partitions that I would really like to NOT corrupt when installing arch to the partitions on their drives.
The other reason I am asking this question is that I also have existing dual boot laptops with Windows XP and arch with BIOS and MBR partitioning - and at some point it would presumably be sensible to move from the existing grub to grub2 - and on these systems where I have already checked that there is only a 64 sector post-MBR gap - will this lead to problems if I change from grub to grub2 if I don't change the partitions to have a 2MiB post-MBR gap?
Thanks for any help on this - I have been doing reading and trying to prepare without looking an idiot and being a good arch admin, but there is quite a lot to read and I still can't find the answer to the explicit question above!
-- mike c
I just realised that the current build of the netinstall isos still have grub legacy and not grub2 - so I will wait for my first test install - but my questions above remain keenly awaiting some replies anyway! Thanks -- mike c
On 07/18/2012 12:46 PM, mike cloaked wrote:
On Wed, Jul 18, 2012 at 7:40 PM, mike cloaked <mike.cloaked@gmail.com> wrote:
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date).
I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work?
I use grub2 with msdos partitioning and no gap.
On Wed, Jul 18, 2012 at 8:54 PM, Matthew Monaco <dgbaley27@0x01b.net> wrote:
On 07/18/2012 12:46 PM, mike cloaked wrote:
On Wed, Jul 18, 2012 at 7:40 PM, mike cloaked <mike.cloaked@gmail.com> wrote:
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date).
I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work?
I use grub2 with msdos partitioning and no gap.
Thank you - though I am ignorant about whether at some point in the future the gap would be a "requirement" and whether the core.img may get large and cause an issue - certainly I use another distro on a server where grub2 is the bootloader with BIOS and standard partitioning and it also has no problems at all though in that case the core.img file is in a directory in /boot - but having seen dire warnings on various web pages I wanted someone who knew to confirm that grub2 in the old style BIOS and disk partitioning would continue to work into the future or not! -- mike c
On Thu, Jul 19, 2012 at 12:40 AM, mike cloaked <mike.cloaked@gmail.com> wrote:
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date).
I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work? I can't find that as an explicit statement in any of the documentation that I have read for installs/grub2/partitioning! i.e. does grub2 still need to embed the core.img file in the post-MBR gap as the preferred and dev recommended approach in this case?
The reason I would like to have that explicit answer is that if I want to install arch on a machine which has a pre-existing NTFS partition, and possibly host-protected partition as well for Windows recovery, at the start of the drive, then if the 2MiB post-MBR gap is a requirement (rather than a nicety) for grub2 with BIOS and MBR partitioning (but no GPT partitioning or UEFI) then unless the drive is re-partitioned and the NTFS partition reduced in size and moved out by 2MiB then there could be problems? However doing that partition jinking about might itself lead to a few issues!
I am going to do an install with new partitioning on an old laptop to check that I can successfully use the new install system (without AIF) and hopefully that will work, but I also have other machines with existing and important (to me) Windows partitions that I would really like to NOT corrupt when installing arch to the partitions on their drives.
The other reason I am asking this question is that I also have existing dual boot laptops with Windows XP and arch with BIOS and MBR partitioning - and at some point it would presumably be sensible to move from the existing grub to grub2 - and on these systems where I have already checked that there is only a 64 sector post-MBR gap - will this lead to problems if I change from grub to grub2 if I don't change the partitions to have a 2MiB post-MBR gap?
Thanks for any help on this - I have been doing reading and trying to prepare without looking an idiot and being a good arch admin, but there is quite a lot to read and I still can't find the answer to the explicit question above!
-- mike c
What the fuck is wrong with you, guys? Why didn't you just read the manual? http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation Arch follows upstream, you know? -- Kirill Churin Jabber: reflexing@reflexing.ru
On Wed, Jul 18, 2012 at 10:13 PM, Kirill Churin <reflexing@reflexing.ru> wrote:
What the fuck is wrong with you, guys? Why didn't you just read the manual? http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation
Arch follows upstream, you know?
Thank you for your polite reply! I have read the manual and maybe I am just plain stupid but I could not find the answer to my question in that link! I am aware that arch follows upstream. But grub2 as released is new. Can you tell me in which section the answer lies - (there is a single reference to the post-MBR gap in that link but it implies that it should be 1MiB in general and yet grub has worked without it forever!) That is why I asked the question related to grub2 - if that means I am regarded as a complete idiot then I will shut up and not raise this further - maybe I am the only arch user who fails to know how to find the answer to this question. -- mike c
mike cloaked, Wed 2012-07-18 @ 22:42:37+0100:
On Wed, Jul 18, 2012 at 10:13 PM, Kirill Churin <reflexing@reflexing.ru> wrote:
What the fuck is wrong with you, guys? Why didn't you just read the manual? http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation
Arch follows upstream, you know?
Thank you for your polite reply! I have read the manual and maybe I am just plain stupid but I could not find the answer to my question in that link! I am aware that arch follows upstream. But grub2 as released is new. Can you tell me in which section the answer lies - (there is a single reference to the post-MBR gap in that link but it implies that it should be 1MiB in general and yet grub has worked without it forever!) That is why I asked the question related to grub2 - if that means I am regarded as a complete idiot then I will shut up and not raise this further - maybe I am the only arch user who fails to know how to find the answer to this question.
Just ignore the troll. There are a few people on this list who seem to take offense at the fact that people ask questions about Arch Linux...on a list for asking questions about Arch Linux. It's one thing if you had made no effort to find an answer on your own, which is admittedly irritating, but that doesn't seem to be the case for you. So just don't pay him any mind.
On Wed, Jul 18, 2012 at 10:51 PM, Taylor Hedberg <tmhedberg@gmail.com> wrote:
Just ignore the troll. There are a few people on this list who seem to take offense at the fact that people ask questions about Arch Linux...on a list for asking questions about Arch Linux. It's one thing if you had made no effort to find an answer on your own, which is admittedly irritating, but that doesn't seem to be the case for you. So just don't pay him any mind.
Actually the nearest I got to an answer is https://bugs.archlinux.org/task/24103 which implies that for more complex setups there could be a problem without the post-MBR gap in grub2. So my best bet would indeed be to ensure that all my machines do have the recommended first partition start point even for legacy type partitioning (despite the potential pain in so doing) before attempting to convert or install with grub2 when it moves to core (and the new netinstall isos). I can foresee some users hitting issues when grub2 becomes default. Thanks - I won't pursue this any further on this list. -- mike c
last time I installed arch on a virtual machine, I was unable to install grub2. one google search later I put the mbr gap of 2MiB back in place and everything went smoothly. 2MiB isn't much by today's standards, and if the software says it needs it, why not just give it? if you find a way to avoid it, that would be great, although I can think of numerous reasons why that shouldn't work. just my two cents. cheers! mar77i
On Thu, Jul 19, 2012 at 5:33 AM, Martti Kühne <mysatyre@gmail.com> wrote:
last time I installed arch on a virtual machine, I was unable to install grub2. one google search later I put the mbr gap of 2MiB back in place and everything went smoothly. 2MiB isn't much by today's standards, and if the software says it needs it, why not just give it? if you find a way to avoid it, that would be great, although I can think of numerous reasons why that shouldn't work. just my two cents.
cheers! mar77i
Indeed it is easy to put a gap between the MBR and the first partition when partitioning from scratch - the main issue is for anyone with a pre-existing (non-linux) partition at the start of the hard drive containing an OEM installed Windows system or HPA recovery area or similar - what I have done many times in the past is to shrink the windows partition in a newly acquired desktop or laptop, and then add in suitable partitions for the linux needs in the newly available space in the rest of the disc. However what I have usually not done is to "move" the Windows/HPA partitions at the start of the drive - on occasions when I have attempted to move them along a bit (say to make space for a /boot ext4 partition) then booting Windows can give messages that it is not entirely happy (sic!) - sometimes Windows "fixes" itself but occasionally not! I have usually ended up dumping Windows altogether if that happens and repartitioning the drive from scratch and putting only linux on it and resorting to using Windows on other machines. However for some people without access to other machines to run applications that have no linux equivalent it is vital to keep a functional Windows system - for example updating many GPS boxes eg from Garmin can only be done via Windows - similarly to update (officially) the Android system on a Samsung cellphone is only realistic using Samsung Kies on a Windows machine. There are many similar examples of the need to keep Windows. Of course for many seasoned arch users there is nothing to beat it once it is installed - but unfortunately there still remain some tasks for which linux cannot be used. I have also tried using Windows in a VM for such tasks and have frequently come up against problems that are tough to crack. Hence a dual boot (or dedicated) Windows machine is for me at least a necessity even though the majority of my work can be done perfectly well and efficiently with arch. Over the past ten years I have done somewhere around 150 linux installs, and many disc partitioning sessions - but maybe others have a lot more experience than I have! Having been through a certain amount of pain at times concerning an attempt to keep Windows working as well as the linux in a dual boot machine, and now seeing a pretty major change to the bootlloader coming up it is probably sensible to read ahead as much as possible, and be as prepared as possible for how to deal with different install scenarios, but also be prepared for quite a lot of work to recover if it all goes pear shaped during the process. I will certainly be doing what I can in this regard and I will also be doing test installs on a non-critical machine - but I do have a couple of machines where keeping Windows is essential - and on those machines I already also have arch dual booting. I hope that the move to grub2 gives a minimum of problems during the transition period. -- mike c
Indeed it is easy to put a gap between the MBR and the first partition when partitioning from scratch - the main issue is for anyone with a pre-existing (non-linux) partition at the start of the hard drive containing an OEM installed Windows system or HPA recovery area or similar
You can make grub just use a pointer (I forget the name) in the MBR and actually use the start of any partition instead. Have you already downloaded the grub 2 manual, it is explained in there anyway. Apologies if I haven't looked hard enough at your mails. -- ________________________________________________________ Why not do something good every day and install BOINC. ________________________________________________________
On Thu, Jul 19, 2012 at 3:42 AM, mike cloaked <mike.cloaked@gmail.com> wrote:
On Wed, Jul 18, 2012 at 10:13 PM, Kirill Churin <reflexing@reflexing.ru> wrote:
What the fuck is wrong with you, guys? Why didn't you just read the manual? http://www.gnu.org/software/grub/manual/grub.html#BIOS-installation
Arch follows upstream, you know?
Thank you for your polite reply! I have read the manual and maybe I am just plain stupid but I could not find the answer to my question in that link! I am aware that arch follows upstream. But grub2 as released is new. Can you tell me in which section the answer lies - (there is a single reference to the post-MBR gap in that link but it implies that it should be 1MiB in general and yet grub has worked without it forever!) That is why I asked the question related to grub2 - if that means I am regarded as a complete idiot then I will shut up and not raise this further - maybe I am the only arch user who fails to know how to find the answer to this question.
-- mike c
Okay, I'm really sorry me being so harsh, really. Drunk and furious, you know? Really sorry. There're enough people complain about obvious things like /lib movements :) The answer you want only GRUB2 devs can answer (as far as I know there not more than 2 of them). So feel free to ask on their mailing list (upstream again). -- Kirill Churin Jabber: reflexing@reflexing.ru
mike cloaked <mike.cloaked@gmail.com> on Wed, 2012/07/18 19:40:
I am planning a test install using the new arch-install-scripts via the latest netinstall images from releng (from today's date).
I know that for a system where I blow away all previous disc partitions and partition from scratch I can create a 2MiB partition (using MBR and NOT GPT partitioning) before the first formatted partition on the HD and install grub2 during the base install. However can someone please tell me explicitly if, for a system with only BIOS (no UEFI at all), and no GPT partitioning but just plain old MBR partitioning - is the recommended 2MiB post-MBR gap still a "requirement" for that specific situation for grub2 to work? I can't find that as an explicit statement in any of the documentation that I have read for installs/grub2/partitioning! i.e. does grub2 still need to embed the core.img file in the post-MBR gap as the preferred and dev recommended approach in this case?
The reason I would like to have that explicit answer is that if I want to install arch on a machine which has a pre-existing NTFS partition, and possibly host-protected partition as well for Windows recovery, at the start of the drive, then if the 2MiB post-MBR gap is a requirement (rather than a nicety) for grub2 with BIOS and MBR partitioning (but no GPT partitioning or UEFI) then unless the drive is re-partitioned and the NTFS partition reduced in size and moved out by 2MiB then there could be problems? However doing that partition jinking about might itself lead to a few issues!
I am going to do an install with new partitioning on an old laptop to check that I can successfully use the new install system (without AIF) and hopefully that will work, but I also have other machines with existing and important (to me) Windows partitions that I would really like to NOT corrupt when installing arch to the partitions on their drives.
The other reason I am asking this question is that I also have existing dual boot laptops with Windows XP and arch with BIOS and MBR partitioning - and at some point it would presumably be sensible to move from the existing grub to grub2 - and on these systems where I have already checked that there is only a 64 sector post-MBR gap - will this lead to problems if I change from grub to grub2 if I don't change the partitions to have a 2MiB post-MBR gap?
Thanks for any help on this - I have been doing reading and trying to prepare without looking an idiot and being a good arch admin, but there is quite a lot to read and I still can't find the answer to the explicit question above!
Grub 2.x is fine with embedding its core.img into about 31kB. That is starting sector 2 directly after the MBR and having first partition start at sector 63. (Old disk alignment to cylinders, you should not use that - especially with hard drives with 4k blocks or SSDs.) However this could become a problem if core.img increases with time. I think even the wrong compiler flags are enough to exceed the limit. You are perfectly fine if your partitions are aligned to 1MB-Boundaries. Grub has 1023 sectors to embed its core.img. Having GPT partition table you need a BIOS boot partition (type EF02) that Grub uses to embed its core.img. Note that the GPT partition table itself starts from sector 2, so you should not write anything there! However you should note that only Windows 7 64 Bit can boot from GPT partition table on UEFI Hardware. Every other MS OS is out of luck. (At least without faking anything, you could use gptsync for example.) Hope that helps... -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Chris get my mail address: */=0;b=c[a++];) putchar(b-1/(/* gcc -o sig sig.c && ./sig */b/42*2-3)*42);}
participants (7)
-
Christian Hesse
-
Kevin Chadwick
-
Kirill Churin
-
Martti Kühne
-
Matthew Monaco
-
mike cloaked
-
Taylor Hedberg