You are not logged in.

#1 2009-10-22 13:21:43

jargoman
Member
Registered: 2008-03-10
Posts: 33

[SOLVED] accidentally installed grub to root partition.

I don't have /boot on a separate partition everythings in /. I was dual booting arch and vista but decided to also install mandriva 2009 on an empty partition. For some stupid reason Mandriva installed grub to the "mbr" (intended) but it also installed grub to my arch linux root (sda6) partition. Now when I select arch from my boot menu, grub chain loads to the other grub in / and I get yet another menu that fails to load because I wasn't intending to use the menu.lst in arch only the one in mandriva.

My question isn't how to install grub as I know how to edit the menu.lst in mandriva to boot all my partitions (vista, arch, mandriva - which is gone once I burn another distro). What I want to know is. Did I botch my arch installation by installing grub to "root". Did I potentially overwrite something important that happened to have been at the beginning that ext3 partition.

I once installed grub to a winMe partition and overwrote the boot sector of that partition and had to run the fixboot command. Is there anything in the boot sector of an ext3 partition? I'm hoping that 512 bytes are reserved for the boot sector of ext3 and I have nothing to worry about.

Last edited by jargoman (2009-10-22 17:48:49)

Offline

#2 2009-10-22 14:05:46

alexandrite
Member
Registered: 2009-03-27
Posts: 326

Re: [SOLVED] accidentally installed grub to root partition.

GRUB does not need to chain-load to a boot sector for a partition that has GRUB on it.  You can just boot right in, and as far as I know, GRUB won't hand off booting to the boot sector in any other partition unless you use "chainloader" in your menu.lst.  So no, you have nothing to worry about.

Last edited by alexandrite (2009-10-22 14:10:57)

Offline

#3 2009-10-22 14:29:29

jargoman
Member
Registered: 2008-03-10
Posts: 33

Re: [SOLVED] accidentally installed grub to root partition.

I know I don't have to chainload and can just load my kernel straight from the mbr. My concern is that by installing grub to my working / partition did I somehow corrupt data or is the first 512 bytes always reserved as a boot sector even when grub wasn't installed there previously?

Offline

#4 2009-10-22 16:25:40

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [SOLVED] accidentally installed grub to root partition.

I'm pretty sure that everything is fine and that the first 512 bytes are reserved as boot sector, because "installing grub to a partition" is a supported procedure, and there would be warnings all over the place if it actually destroyed existing data.
Still, it was surprisingly difficult to get precise information about this, and also on how to clear the boot sector again.
For the mbr the command is
dd if=/dev/null of=/dev/{h,s}sdX bs=440 count =1
and it that might work for /dev/sdXY as well, but I'd try that only after making a backup.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#5 2009-10-22 17:48:21

jargoman
Member
Registered: 2008-03-10
Posts: 33

Re: [SOLVED] accidentally installed grub to root partition.

That was precisely the information I was looking for. I thought I was going to have to back up and reinstall. The ext boot sector should really should be documented somewhere. Thanks a lot you've eased my nerves and now I can continue with my repartitioning.

Offline

#6 2009-10-22 23:04:21

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] accidentally installed grub to root partition.

There is a wiki page on this fyeo:

http://wiki.archlinux.org/index.php/Boo … FRestoring


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#7 2009-10-23 07:59:24

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: [SOLVED] accidentally installed grub to root partition.

The wiki article is about the MBR. This thread is about the boot sector of a partition. Google turns up lots of information on the former, but very little on the latter. I'd really like to get a pointer to more / better info here.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#8 2009-10-23 08:05:51

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED] accidentally installed grub to root partition.

True the article doesn't cover erasing the boot sector for a particular partition.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#9 2009-10-23 13:00:17

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] accidentally installed grub to root partition.

I would just leave it alone if everything is working properly, otherwise you risk actually loosing data.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB