home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.slackware      I think its the one without Selinux crap      87,272 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 86,544 of 87,272   
   Joseph Rosevear to Henrik Carlqvist   
   Re: When your boot sector has been wiped   
   23 Dec 23 02:32:35   
   
   From: Mail@JoesLife.org   
      
   On Fri, 22 Dec 2023 06:24:32 -0000 (UTC), Henrik Carlqvist wrote:   
      
   > On Fri, 22 Dec 2023 00:26:54 +0000, Joseph Rosevear wrote:   
   >>       dd if=/dev/zero of=/dev/sda bs=512 count=1   
   >   
   > Be careful with that one, at least with good old MBR partition style   
   > those first 512 bytes will not only contain the MBR code to boot but   
   > also the partition table. However, with a GPT partition table the first   
   > 512 bytes will only contain boot code.   
   >   
   > regards Henrik   
      
   Thank you!   
      
   I apologize for posting something that could cause someone to lose data.   
      
   On reviewing my notes I did, in fact, find words that warn of the above   
   deleting the partition table.  Generally, I use the above when preparing   
   a new drive for a cloned installation of Slackware.  I don't remember the   
   sequence of steps, but it seems I would follow the above with the making   
   of partitions.  Now I'm curious regarding the details of my use of the   
   above.  I'll have to examine my scripts to see what they do.   
      
   I also found in my notes a reference to having to remake my partions   
   after doing the above.  I knew how to remake them exactly as before, and   
   no data was lost.   
      
   The reason I suggested the optional use of the above is that, for reasons   
   I don't understand, the above wipe has sometimes been needed to make a   
   device bootable.  The grub-install command alone wasn't always   
   sufficient.  Generally, I think this happened when I was reusing a drive   
   that had previously been used in some capacity, perhaps as a bootable   
   drive--I don't remember.   
      
   I would like to understand this better.   
      
   I did find, just now, in my notes that the partition information begins   
   *after* the first 446 bytes which is for the bootstrap code.  And I have   
   in the past used a wipe like the above, but using "bs=446".  It seems   
   that that is what I *should* have written in my post.  So I'll give it   
   here:   
      
      dd if=/dev/zero of=/dev/sda bs=446 count=1   
      
   Understand that I provided the wiping step as precaution that "may not be   
   needed".   
      
   Please, any who tries this, be careful and backup your MBR first.   
      
   Also--thanks for the information, I didn't know that (as you wrote) a GPT   
   partition has only boot code in the first 512 bytes.  So it seems that my   
   original instructions are OK in that case.  (I didn't expect this to be   
   so complex!)   
      
   -Joe   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca