IPB

Welcome Guest ( Log In | Register )




 
Reply to this topicStart new topic
> erasing boot sector on usb pen drive
CrunKMunkY
post May 9 2006, 07:17 AM
Post #1


Linux-Noob Member
**

Group: Members
Posts: 19
Joined: 29-March 06
From: United States
Member No.: 1401



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
Go to the top of the page
 
+Quote Post
xDamox
post May 9 2006, 11:08 AM
Post #2


t0t5lly l33t linux-noob
******

Group: Moderator
Posts: 390
Joined: 13-December 04
From: Preston, England
Member No.: 655



Hi,

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

CODE
fdisk -l
Go to the top of the page
 
+Quote Post
znx
post May 10 2006, 12:01 AM
Post #3


Linux-Noob GURU
********

Group: Members
Posts: 1220
Joined: 21-March 05
From: Aberdeen, Scotland
Member No.: 798



QUOTE (CrunKMunkY @ May 9 2006, 07:17 AM) *
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.


--------------------
Bye
Go to the top of the page
 
+Quote Post
CrunKMunkY
post May 10 2006, 06:44 AM
Post #4


Linux-Noob Member
**

Group: Members
Posts: 19
Joined: 29-March 06
From: United States
Member No.: 1401



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.
Go to the top of the page
 
+Quote Post
CrunKMunkY
post May 10 2006, 07:11 AM
Post #5


Linux-Noob Member
**

Group: Members
Posts: 19
Joined: 29-March 06
From: United States
Member No.: 1401



QUOTE (xDamox @ May 9 2006, 06:08 AM) *
Hi,

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

CODE
fdisk -l


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?
Go to the top of the page
 
+Quote Post
Lord Ceiphas
post May 14 2006, 05:56 PM
Post #6


Noob
*

Group: Members
Posts: 1
Joined: 14-May 06
Member No.: 1501



QUOTE (CrunKMunkY @ May 10 2006, 08:11 AM) *
QUOTE (xDamox @ May 9 2006, 06:08 AM) *

Hi,

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

CODE
fdisk -l


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?


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
Go to the top of the page
 
+Quote Post
CrunKMunkY
post May 15 2006, 06:35 AM
Post #7


Linux-Noob Member
**

Group: Members
Posts: 19
Joined: 29-March 06
From: United States
Member No.: 1401



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.
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 6th January 2009 - 02:12 PM