FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 05-21-2008, 01:11 AM
Allan Gottlieb
 
Default is grub in my mbr?

I believe that when I upgrade grub I am supposed to re-run it.

I would like to keep the same configuration I have know but am not
sure if I installed grub in the MBR (I dual boot windows since it is
often needed when calling Dell Support).

I believe that I do have grub in the mbr, but wish to confirm it so
executed an od to confirm.

Here is my disk layout (a one disk laptop)

ajglap ~ # fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x08000000

Device Boot Start End Blocks Id System
/dev/sda1 1 6 48163+ de Dell Utility
/dev/sda2 * 7 1963 15716352 7 HPFS/NTFS
/dev/sda3 1963 1975 98683+ 83 Linux
/dev/sda4 1976 12161 81819045 5 Extended
/dev/sda5 1976 2098 987966 82 Linux swap / Solaris
/dev/sda6 2099 4531 19543041 83 Linux
/dev/sda7 4532 5991 11727418+ 83 Linux
/dev/sda8 5992 8424 19543041 83 Linux
/dev/sda9 8425 10857 19543041 83 Linux
ajglap ~ #

Here is an od of the mbr

ajglap ~ # dd if=/dev/sda ibs=512 count=1 | od -c --address-radix=d
1+0 records in
1+0 records out
0000000 353 H 220 320 274 | 216 300 216 330 276 | 277
0000016 006 271 002 374 363 244 P h 034 006 313 373 271 004
0000032 275 276 a 200 ~ | v 017 205 020 001 203 305 020
0000048 342 361 315 030 210 V U 306 F 021 005 306 F 003 002
512 bytes (512 B) copied, 1.8159e-05 s, 28.2 MB/s
0000064 377 001 002 372 220 220 366 302 200
0000080 u 002 262 200 352 Y | 1 300 216 330 216 320 274
0000096 373 240 @ | < 377 t 002 210 302 R 276 177 }
0000112 350 4 001 366 302 200 t T 264 A 273 252 U 315 023 Z
0000128 R r I 201 373 U 252 u C 240 A | 204 300 u 005
0000144 203 341 001 t 7 f 213 L 020 276 005 | 306 D 377 001
0000160 f 213 036 D | 307 004 020 307 D 002 001 f 211
0000176  307 D 006 p f 1 300 211 D 004 f 211 D
0000192 f 264 B 315 023 r 005 273 p 353 } 264  315 023
0000208 s
366 302 200 017 204 352 351 215 276 005 | 306
0000224 D 377 f 1 300 210 360 @ f 211 D 004 1 322 210
0000240 312 301 342 002 210 350 210 364 @ 211 D  1 300 210 320
0000256 300 350 002 f 211 004 f 241 D | f 1 322 f 367 4
0000272 210 T
f 1 322 f 367 t 004 210 T v 211 D f
0000288 ; D  } < 212 T
300 342 006 212 L
376 301
0000304  321 212 l f Z 212 t v 273 p 216 303 1 333
0000320 270 001 002 315 023 r * 214 303 216 006 H | ` 036 271
0000336 001 216 333 1 366 1 377 374 363 245 037 a 377 & B
0000352 | 276 205 } 350 @ 353 016 276 212 } 350 8 353
0000368 006 276 224 } 350 0 276 231 } 350 * 353 376 G
0000384 R U B G e o m H a r d D
0000400 i s k R e a d E r r o r
0000416 273 001 264 016 315 020 254 < u 364 303
0000432  001
0000448 001 336 376 ? 005 ? G x 001 200 036
0000464 031 006 a 376 377 377 200 001 240 337 001 376
0000480 377 377 203 376 377 377 341 001 367 002 003 376
0000496 377 377 005 376 377 377 367 " 344 001 J 353 300 U 252
0000512

Am I right that seeing `GRUB' in bytes 383-386 (decimal) is proof that
I did install grub in the MBR?

thanks,
allan

--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-21-2008, 05:53 AM
Dirk Heinrichs
 
Default is grub in my mbr?

Am Mittwoch, 21. Mai 2008 schrieb ext Allan Gottlieb:

> I believe that when I upgrade grub I am supposed to re-run it.

Only if you want to upgrade your MBR too.

> Am I right that seeing `GRUB' in bytes 383-386 (decimal) is proof that
> I did install grub in the MBR?

At least it isn't LiLo ;-)

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 05-21-2008, 08:48 AM
Neil Bothwick
 
Default is grub in my mbr?

On Wed, 21 May 2008 07:53:52 +0200, Dirk Heinrichs wrote:

> > I believe that when I upgrade grub I am supposed to re-run it.
>
> Only if you want to upgrade your MBR too.

If you don't, the stage1 in your MBR may not work with the stage1.5 and
stage2 in /boot. This happened with a recent GRUB update.


--
Neil Bothwick

DANGER! DANGER! Computer store ahead...hide wallet.
 
Old 05-21-2008, 08:53 AM
Dirk Heinrichs
 
Default is grub in my mbr?

Am Mittwoch, 21. Mai 2008 schrieb ext Neil Bothwick:
> On Wed, 21 May 2008 07:53:52 +0200, Dirk Heinrichs wrote:
> > > I believe that when I upgrade grub I am supposed to re-run it.
> >
> > Only if you want to upgrade your MBR too.
>
> If you don't, the stage1 in your MBR may not work with the stage1.5 and
> stage2 in /boot. This happened with a recent GRUB update.

Not to me.

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 05-21-2008, 09:31 AM
Neil Bothwick
 
Default is grub in my mbr?

On Wed, 21 May 2008 10:53:28 +0200, Dirk Heinrichs wrote:

> > If you don't, the stage1 in your MBR may not work with the stage1.5
> > and stage2 in /boot. This happened with a recent GRUB update.
>
> Not to me.

Aha, the old "works for me" defence

It came up on this list very recently, where someone had to use a live CD
to fix GRUB after ignoring/missing the elog warnings.

WARN: postinst
*** IMPORTANT NOTE: you must run grub and install
the new version's stage1 to your MBR. Until you do,
stage1 and stage2 will still be the old version, but
later stages will be the new version, which could
cause problems such as an unbootable system.


--
Neil Bothwick

Everything's back to normal. Damn.
 
Old 05-21-2008, 09:42 AM
Dirk Heinrichs
 
Default is grub in my mbr?

Am Mittwoch, 21. Mai 2008 schrieb ext Neil Bothwick:
> On Wed, 21 May 2008 10:53:28 +0200, Dirk Heinrichs wrote:
> > > If you don't, the stage1 in your MBR may not work with the stage1.5
> > > and stage2 in /boot. This happened with a recent GRUB update.
> >
> > Not to me.
>
> Aha, the old "works for me" defence

No, it's the "couldn't happen to me because my /boot is mounted ro" defense.

BTW: One doesn't really need to keep grub installed after writing the MBR.
Just unmerge it and your /boot and/or MBR are save.

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 05-21-2008, 01:16 PM
Allan Gottlieb
 
Default is grub in my mbr?

At Wed, 21 May 2008 11:42:37 +0200 Dirk Heinrichs <dirk.heinrichs.ext@nsn.com> wrote:

> Am Mittwoch, 21. Mai 2008 schrieb ext Neil Bothwick:
>> On Wed, 21 May 2008 10:53:28 +0200, Dirk Heinrichs wrote:
>> > > If you don't, the stage1 in your MBR may not work with the stage1.5
>> > > and stage2 in /boot. This happened with a recent GRUB update.
>> >
>> > Not to me.
>>
>> Aha, the old "works for me" defence
>
> No, it's the "couldn't happen to me because my /boot is mounted ro" defense.
>
> BTW: One doesn't really need to keep grub installed after writing the MBR.
> Just unmerge it and your /boot and/or MBR are save.

This discussion is interesting and may well prove helpful. But,
unless I missed it, I didn't see an answer to my question, namely

Am I correct in believing that seeing `GRUB' within the first 512
bytes of /dev/sda (I have a one-hard-disk laptop) confirms my memory
that I did install grub in the mbr (as opposed to the boot block of
the active partition).

thanks,
allan
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-21-2008, 01:31 PM
Dirk Heinrichs
 
Default is grub in my mbr?

Am Mittwoch, 21. Mai 2008 schrieb ext Allan Gottlieb:

> This discussion is interesting and may well prove helpful. But,
> unless I missed it, I didn't see an answer to my question, namely

Although it was a little bit ironic, I gave it in my first reply.

> Am I correct in believing that seeing `GRUB' within the first 512
> bytes of /dev/sda (I have a one-hard-disk laptop) confirms my memory
> that I did install grub in the mbr (as opposed to the boot block of
> the active partition).

Yes.

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
 
Old 05-21-2008, 02:08 PM
Allan Gottlieb
 
Default is grub in my mbr?

At Wed, 21 May 2008 15:31:23 +0200 Dirk Heinrichs <dirk.heinrichs.ext@nsn.com> wrote:

> Am Mittwoch, 21. Mai 2008 schrieb ext Allan Gottlieb:
>
>> This discussion is interesting and may well prove helpful. But,
>> unless I missed it, I didn't see an answer to my question, namely
>
> Although it was a little bit ironic, I gave it in my first reply.

Thanks. I thought so, but feared that my question might have been
poorly written and suggested that I wanted to know which loader I had
rather that where it was installed.

Thanks again.
allan
--
gentoo-user@lists.gentoo.org mailing list
 
Old 05-21-2008, 02:12 PM
"Mark Knecht"
 
Default is grub in my mbr?

On Wed, May 21, 2008 at 7:08 AM, Allan Gottlieb <gottlieb@nyu.edu> wrote:
> At Wed, 21 May 2008 15:31:23 +0200 Dirk Heinrichs <dirk.heinrichs.ext@nsn.com> wrote:
>
>> Am Mittwoch, 21. Mai 2008 schrieb ext Allan Gottlieb:
>>
>>> This discussion is interesting and may well prove helpful. But,
>>> unless I missed it, I didn't see an answer to my question, namely
>>
>> Although it was a little bit ironic, I gave it in my first reply.
>
> Thanks. I thought so, but feared that my question might have been
> poorly written and suggested that I wanted to know which loader I had
> rather that where it was installed.
>
> Thanks again.
> allan

I think this answer would be good to have on a Gentoo grub Wiki
somewhere. (If it isn't already.) There have been times I've wondered
the same thing and didn't know how to extract the data out fo the MBR
the way you did. It would also be good to add a second example of how
to get it out of a partition instead of the MBR in case grub is
installed there.

Anyway, great info. Thanks!

Cheers,
Mark
--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 07:33 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org