[arch-general] How big really is the MBR?
Whats up guys, Was planning on re-install Arch on my laptop, started writing a couple scripts to handle the usual things I do. One of the NEW things im going to be trying is grub2. Now, the Grub2 wiki says to run dd if=/dev/zero of=/dev/sda bs=440 count=1 to wipe out grub-legacy from the MBR. And since the Arch-devs removed "No Bootloader" as an option in the AIF, you can't follow the "during installation" instructions for Grub2. Here's my problem, just by sheer luck was I roaming the web today, and noticed a few other threads (in various forums for various distros / blogs) and they all had a similar command to run if youre grub-legacy was screwed and you needed to write over it. The only issue, and the reason for this email? They had different commands. Not completly different, but different enough that raised an eyebrow. In dd if=/dev/zero of=/dev/sda bs=440 count=1 They had various numbers for bs=, some 440, some 446, some 506, and some 512. Normally I would've just shrugged and followed the wiki, but notice on one said that if you zero out too far, you wipe out hte partition table...which I wouldn't enjoy haha. So can anyone confirm that the command above, from the wiki, is correct? And that it IS 440, and not something different. I'd hate to pick the wrong one and zero out my partition table, or not completly zero out grub-legacy and run into a whole different set of problems. Thanks!
On 03-09-2011 23:09, Eric Griffith wrote:
So can anyone confirm that the command above, from the wiki, is correct? And that it IS 440, and not something different. I'd hate to pick the wrong one and zero out my partition table, or not completly zero out grub-legacy and run into a whole different set of problems.
Thanks!
No google and wikipedia in your area? A block size of 440 bytes should be enough to wipe the code area but you can use or may have to use up to a maximum of 446 bytes. http://en.wikipedia.org/wiki/Master_boot_record -- Mauro Santos
On Sat, 3 Sep 2011 18:09:10 -0400 Eric Griffith <egriffith92@gmail.com> wrote:
Whats up guys, Was planning on re-install Arch on my laptop, started writing a couple scripts to handle the usual things I do. One of the NEW things im going to be trying is grub2. Now, the Grub2 wiki says to run
dd if=/dev/zero of=/dev/sda bs=440 count=1
to wipe out grub-legacy from the MBR.
And since the Arch-devs removed "No Bootloader" as an option in the AIF, you can't follow the "during installation" instructions for Grub2.
Here's my problem, just by sheer luck was I roaming the web today, and noticed a few other threads (in various forums for various distros / blogs) and they all had a similar command to run if youre grub-legacy was screwed and you needed to write over it. The only issue, and the reason for this email? They had different commands.
Not completly different, but different enough that raised an eyebrow. In
dd if=/dev/zero of=/dev/sda bs=440 count=1
They had various numbers for bs=, some 440, some 446, some 506, and some 512. Normally I would've just shrugged and followed the wiki, but notice on one said that if you zero out too far, you wipe out hte partition table...which I wouldn't enjoy haha.
So can anyone confirm that the command above, from the wiki, is correct? And that it IS 440, and not something different. I'd hate to pick the wrong one and zero out my partition table, or not completly zero out grub-legacy and run into a whole different set of problems.
Thanks!
grub gets installed in the first 440 (446) bytes, then some disk-specific data (optional), the rest takes up the partition table up to the 512th byte. look also at https://secure.wikimedia.org/wikipedia/en/wiki/Master_boot_record
On Sun, Sep 4, 2011 at 12:09 AM, Eric Griffith <egriffith92@gmail.com> wrote: <snip>
They had various numbers for bs=, some 440, some 446, some 506, and some 512. Normally I would've just shrugged and followed the wiki, but notice on one said that if you zero out too far, you wipe out hte partition table...which I wouldn't enjoy haha.
looking in the wiki might have been enough. https://wiki.archlinux.org/index.php/GUID_Partition_Table btw, slightly off topic, concerning that ominous 1MiB post-mbr gap, which I looked up because it didn't seem to be noted anywhere in non linux-related sources: http://marc.info/?l=util-linux-ng&m=128152568828109&w=4 cheers! mar77i
participants (4)
-
Aljosha Papsch
-
Eric Griffith
-
Martti Kühne
-
Mauro Santos