Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.setup > #861

Re: Help, the dog ate my MBR (Linux/Windows dual boot)

From Franc Zabkar <fzabkar@iinternode.on.net>
Newsgroups comp.os.linux.setup, comp.unix.programmer, comp.sys.ibm.pc.hardware.storage
Subject Re: Help, the dog ate my MBR (Linux/Windows dual boot)
Date 2011-07-25 09:46 +1000
Organization Bachelor Life Ltd
Message-ID <tmap275nlfabe690qa24bt6f0ntqp7o1ig@4ax.com> (permalink)
References (1 earlier) <j0c18i$6v4$1@dont-email.me> <823k275uu87ilej6ctseh0bhp0arosf654@4ax.com> <j0f76i$1cb$1@dont-email.me> <or5p27ddkms1vn4b4npb71mc6gaoaav308@4ax.com> <tB1Xp.52981$NY4.46062@news.usenetserver.com>

Cross-posted to 3 groups.

Show all headers | View raw


On 24 Jul 2011 23:08:09 GMT, scott@slp53.sl.home (Scott Lurndal) put
finger to keyboard and composed:

>Franc Zabkar <fzabkar@iinternode.on.net> writes:
>>On Sat, 23 Jul 2011 21:25:06 +0200, Noob <root@127.0.0.1> put finger
>>to keyboard and composed:
>>
>>>I got a copy of the MBR by running
>>>dd if=/dev/sda of=mbr.bin bs=512 count=2
>>>
>>>This should get to LBA 0, right?
>
>Yes.  count=1 is sufficient for the MBR itself. 

I believe the OP specified count=2 so that he could account for the
14-byte offset.

>>I wonder if you could disable Linux's HDD cache when performing your
>>tests. Then you could test the drive's cache memory (8MB) by dd-ing
>>data in 16MB blocks. In fact it should be sufficient to dd the first
>>8MB of data twice in succession, and then compare the two results.
>>This is because part of the 8MB cache is occupied by the drive's
>>firmware. This would mean that the second read should flush the first
>>sectors from the cache.
>>
>>AFAICS, the following commands should do it:
>>
>> dd if=/dev/sda of=mbr_1.bin bs=512 count=32768
>> dd if=/dev/sda of=mbr_2.bin bs=512 count=32768
>
>Much much much much more efficient to use bs=16m count=1, which will issue a single read
>versus 32,768 reads.
>
>If the hard disk is an IDE or SATA drive, you can use the hdparm command to disable
>the drive cache.

I was thinking that the OP should disable the OS cache in system RAM
rather than the drive's onboard cache. However, I agree that your idea
has merit also.

>It is highly unlikely that this is a drive problem, however.   Much more likely that
>the scatter gather list entry given by the driver to the SATA/IDE controller is fubared
>which implies a memory issue (although I can't figure a 14-byte offset from a single
>bit error).
>
>Another possiblity is a corrupted driver or rootkit.

If this were the case, then if the OP were to boot from an optical
drive before attempting to boot from the HDD, he should see a good
MBR. If instead he boots first from the HDD, and the corruption or
rootkit takes effect by loading code into RAM, a subsequent soft
reboot (Ctrl-Alt-Del) may result in him seeing a bad MBR rather than
the real one at LBA 0. A hard reset should be OK, though.

>scott

- Franc Zabkar
-- 
Please remove one 'i' from my address when replying by email.

Back to comp.os.linux.setup | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@localhost> - 2011-07-22 00:45 -0400
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) Ian Collins <ian-news@hotmail.com> - 2011-07-22 10:50 +1200
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@localhost> - 2011-07-22 01:26 -0400
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Paul <nospam@needed.com> - 2011-07-21 19:38 -0400
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-22 16:29 +0200
          Re: Help, the dog ate my MBR (Linux/Windows dual boot) Paul <nospam@needed.com> - 2011-07-22 14:28 -0400
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) g.fink@gmx.net (Gernot Fink) - 2011-07-22 04:35 +0000
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) Mike Easter <MikeE@ster.invalid> - 2011-07-21 19:20 -0700
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-22 11:00 +0200
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) GangGreene <GangGreene@invalid.com> - 2011-07-22 05:29 -0400
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-22 12:01 +0200
          Re: Help, the dog ate my MBR (Linux/Windows dual boot) g.fink@gmx.net (Gernot Fink) - 2011-07-22 10:28 +0000
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2011-07-21 23:33 -0400
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) BGB <cr88192@hotmail.com> - 2011-07-21 21:26 -0700
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-22 16:25 +0200
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Bob Willard <BobwBSGS@TrashThis.comcast.net> - 2011-07-22 12:17 -0400
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-22 18:35 +0200
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Arno <me@privacy.net> - 2011-07-22 18:41 +0000
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Paul <nospam@needed.com> - 2011-07-22 14:52 -0400
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) The Natural Philosopher <tnp@invalid.invalid> - 2011-07-23 02:23 +0100
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) scott@slp53.sl.home (Scott Lurndal) - 2011-07-22 19:19 +0000
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-23 20:51 +0200
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-24 16:54 +0200
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Arno <me@privacy.net> - 2011-07-24 15:29 +0000
          Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-27 11:36 +0200
            Re: Help, the dog ate my MBR (Linux/Windows dual boot) The Natural Philosopher <tnp@invalid.invalid> - 2011-07-27 12:13 +0100
            Re: Help, the dog ate my MBR (Linux/Windows dual boot) scott@slp53.sl.home (Scott Lurndal) - 2011-07-27 20:48 +0000
              Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-28 10:43 +0200
              Re: Help, the dog ate my MBR (Linux/Windows dual boot) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-07-29 00:49 +0100
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Ian Collins <ian-news@hotmail.com> - 2011-07-23 09:44 +1200
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-23 10:05 +1000
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Paul <nospam@needed.com> - 2011-07-22 20:58 -0400
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-23 11:31 +1000
          Re: Help, the dog ate my MBR (Linux/Windows dual boot) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-07-29 01:18 +0100
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-23 19:02 +1000
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-07-29 01:37 +0100
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-23 17:34 +1000
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-23 21:25 +0200
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-25 08:15 +1000
          Re: Help, the dog ate my MBR (Linux/Windows dual boot) scott@slp53.sl.home (Scott Lurndal) - 2011-07-24 23:08 +0000
            Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-25 09:46 +1000
              Re: Help, the dog ate my MBR (Linux/Windows dual boot) scott@slp53.sl.home (Scott Lurndal) - 2011-07-25 02:19 +0000
                Re: Help, the dog ate my MBR (Linux/Windows dual boot) Paul <nospam@needed.com> - 2011-07-24 22:38 -0400
                Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-25 19:38 +1000
                Re: Help, the dog ate my MBR (Linux/Windows dual boot) Franc Zabkar <fzabkar@iinternode.on.net> - 2011-07-25 19:34 +1000
            Re: Help, the dog ate my MBR (Linux/Windows dual boot) Michael Press <rubrum@pacbell.net> - 2011-08-03 21:56 -0700
              Re: Help, the dog ate my MBR (Linux/Windows dual boot) John Hasler <jhasler@newsguy.com> - 2011-08-04 08:15 -0500
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-07-29 01:10 +0100
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) gordonb.22upl@burditt.org (Gordon Burditt) - 2011-07-23 17:15 -0500
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-07-24 16:42 +0200
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-10-27 11:13 +0200
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Arno <me@privacy.net> - 2011-10-27 15:24 +0000
        Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-10-28 11:06 +0200
  Re: Help, the dog ate my MBR (Linux/Windows dual boot) Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-07-29 00:49 +0100
    Re: Help, the dog ate my MBR (Linux/Windows dual boot) Noob <root@127.0.0.1> - 2011-08-01 11:27 +0200
      Re: Help, the dog ate my MBR (Linux/Windows dual boot) Nico Kadel-Garcia <nkadel@gmail.com> - 2011-08-06 10:00 -0700

csiph-web