LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-28-2003, 12:53 PM   #1
preswang
Member
 
Registered: Oct 2003
Location: UK/Chinese
Distribution: Slackware9.1
Posts: 55

Rep: Reputation: 15
How to clean super block and MBR under Linux


I want to clean the super block and MBR before installing a new distro. Some one told me that use Windos98's fdisk /mbr. But when I reboot from win98 boot disk and use fdisk /mbr, it shows no disk.

Can I use cfdisk or fdisk under linux command to clean the super block and MBR?

Thanks!!
 
Old 10-28-2003, 01:12 PM   #2
Kroppus
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Debian UNSTABLE + latest 2.6.kernel
Posts: 391

Rep: Reputation: 30
Eh?

" But when I reboot from win98 boot disk and use fdisk /mbr, it shows no disk."

What do you mean with that? If you're waiting for a confirmation or anything you won't get it. What happens is that the command starts fdisk and when that's done you'll get back the command prompt. THat's all there is to it.

I don't know if fdisk or cfdisk for linux has the same command.
but as far as i can see, none of them have.

Use fdisk from your bootdisk.
 
Old 10-28-2003, 02:34 PM   #3
preswang
Member
 
Registered: Oct 2003
Location: UK/Chinese
Distribution: Slackware9.1
Posts: 55

Original Poster
Rep: Reputation: 15
I have tried fdisk from win98 boot disk or some other win98 boot cd, the fdisk just can not work, a:\>fdisk /mbr it show no disk found.
if I use a:\>fdisk support large HD ?<y/n>
I type y
then exit fdisk

I use reiserFS file system and lilo (Slackware9.1)

I confuse that why fdisk and cfdisk under linux do not support clean MBR and super block.
 
Old 10-29-2003, 08:04 PM   #4
preswang
Member
 
Registered: Oct 2003
Location: UK/Chinese
Distribution: Slackware9.1
Posts: 55

Original Poster
Rep: Reputation: 15
I find this command from google, the guy said it can clean MBR, anyone else know this?
# fdisk -B -b /boot/mbr ad0
 
Old 10-29-2003, 09:00 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,666
Blog Entries: 54

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Can I use cfdisk or fdisk under linux command to clean the super block and MBR?
Use "dd". Make a backup of the Master Boot Record and the Partition Table on disk /dev/hda to a dated file in /tmp: "dd if=/dev/hda of=/tmp/mbr-$(/bin/date '+%Y%m%d').dat bs=1 count=512", then zap the MBR, leaving the PT: "dd if=/dev/zero of=/dev/hda bs=1 count=446" (else change the 466 to 512).

Superblocks are part of the filesystem structure. Reformat the partition to wipe those.


I find this command from google, the guy said it can clean MBR, anyone else know this?
# fdisk -B -b /boot/mbr ad0

Yes it can. Only if you run this command from an installed BSD tho.
 
Old 10-30-2003, 06:31 AM   #6
preswang
Member
 
Registered: Oct 2003
Location: UK/Chinese
Distribution: Slackware9.1
Posts: 55

Original Poster
Rep: Reputation: 15
thanks! I understand now.
bs=512 for pt and mbr
bs=446 for mbr

do you mean super block is located below the MBR ? for example MBR and partition structure are in 0~512 bytes, where is super block? (512~???)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clean MBR since Windows XP Bob_Esponja Linux - Newbie 3 12-12-2006 06:26 AM
ext3 bad super block Sridhar Kumar K Linux - General 3 05-23-2005 09:18 PM
HD won't boot after clean OS installs. Unfixable MBR? Guivre Linux - Hardware 1 04-22-2005 09:24 PM
regarding backup super block? zameer_india Linux - Networking 1 02-10-2005 03:31 PM
mdadm super block - RH9 wombatz Linux - Software 4 05-04-2004 05:20 PM


All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration