Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
erasing boot sector on usb pen drive
#1

Hello all, I am having troubles with a USB Pen Drive. I tried to install FC4 on my 6GB Pen Drive a while back and installed GRUB on the boot sectors of the drive. Unfortunately, I never actually got it to work quite right and I reformatted my pen drive to make it windows compatible again. However, whenever I boot with the drive in the usb port, GRUB still loads. I'm sure there is some easy way to fix this but I don't know what. How can I erase the boot sectors on my drive?

 

Thanks in advance,

Scott

Reply
#2

Hi,

 

Microsoft should over overwritten the boot sector, could you do the following and paste the output:

 



Code:
fdisk -l




Reply
#3

Quote:Hello all, I am having troubles with a USB Pen Drive. I tried to install FC4 on my 6GB Pen Drive a while back and installed GRUB on the boot sectors of the drive. Unfortunately, I never actually got it to work quite right and I reformatted my pen drive to make it windows compatible again. However, whenever I boot with the drive in the usb port, GRUB still loads. I'm sure there is some easy way to fix this but I don't know what. How can I erase the boot sectors on my drive? 

Thanks in advance,

Scott
 

 

If you are willing to blank the disk and start again you can dd the boot sector.

 

YOU WILL LOSE PARTITIONS!!

 



Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1




 

That will completely null the MBR (boot sector and partition information), you can then use fdisk or some other partitioner to make new partitions and start again with the disk.

Reply
#4

Well, znx I did



Code:
dd if=/dev/zero of=/dev/hda bs=512 count=1




 

I did get a change. When I have it plugged in while booting, it no longer boots GRUB, but the computer doesn't boot anything at all. It just sits there with a black screen and a blinking text cursor/underscore thingy in the upper left hand corner of the screen. I reformatted the disk with FDISK but I'm going to use windows now to repartition it to see if it does anything now.

Reply
#5

Quote:Hi, 

Microsoft should over overwritten the boot sector, could you do the following and paste the output:

 



Code:
fdisk -l

<div>


</div>
 

I did fdisk -l -u /dev/sda and heres what I got.

 



Code:
Disk /dev/sda: 6144 MB, 6144638976 bytes
149 heads, 32 sectors/track, 2517 cylinders, total 12001248 sectors
Units = sectors of 1*512 = 512 bytes

  Device Boot      Start      End         Blocks      Id      System
/dev/sda1            62      12001247     6000593       7      HPFS/NTFS




 

I have reformatted several times and sda1 ALWAYS starts on sector 62. I'm not too used to working indepth with boot sectors so I'm gonna take a wild guess and just assume that the first 61 sectors are the boot sectors. Any thoughts?

Reply
#6

Quote:<blockquote data-ipsquote="" class="ipsQuote" data-ipsquote-contentcommentid="8361" data-ipsquote-username="xDamox" data-cite="xDamox" data-ipsquote-contentapp="forums" data-ipsquote-contenttype="forums" data-ipsquote-contentid="2289" data-ipsquote-contentclass="forums_Topic"><div>
Hi,

 

Microsoft should over overwritten the boot sector, could you do the following and paste the output:

 



Code:
fdisk -l

<div>


</div>
 

I did fdisk -l -u /dev/sda and heres what I got.

 



Code:
Disk /dev/sda: 6144 MB, 6144638976 bytes
149 heads, 32 sectors/track, 2517 cylinders, total 12001248 sectors
Units = sectors of 1*512 = 512 bytes

  Device Boot      Start      End         Blocks      Id      System
/dev/sda1            62      12001247     6000593       7      HPFS/NTFS




 

I have reformatted several times and sda1 ALWAYS starts on sector 62. I'm not too used to working indepth with boot sectors so I'm gonna take a wild guess and just assume that the first 61 sectors are the boot sectors. Any thoughts?



</div></blockquote>
 

try to boot with a winxp or win2k-cd, go to the rescue-console and type "fixmbr" it will set your mbr to a state where windows can access it

Reply
#7
is there some sort of flag or option that i can point the fixmbr command to the usb drive? ive done fixmbr for hard drive 0 (or whatever the windows equivalent of /dev/hda is) but i havent done it where i tell what device it goes to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)