Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what command to restore if the boot block is corrupted in
linux



what command to restore if the boot block is corrupted in linux..

Answer / mohammed sajjad

Scenario 1: Backup the boot sector (or MBR)
If the first harddisk in the system is /dev/sda, to backup the boot sector the following command can be used:

# dd if=/dev/sda of=bsbackup.bin bs=512 count=1

Essentially this command will read the first 512 bytes of /dev/sda and write it to the file bsbackup.bin.
Scenario 2: Restore the boot sector from a file:

# dd if=bsbackup.bin of=/dev/sda bs=512 count=1

This will restore the boot sector to /dev/sda that was backed up in Scenario 1.
Scenario 3: Zero out the boot sector (leaving the partition table intact)
Sometimes a virus or other issue can leave a corrupted executable code section in the MBR. I have personally seen a boot sector that would not store grub information (and thus boot linux after its installed) properly until the first 446 bytes were zeroed out and grub re-installed. The following command will do just that:

# dd if=/dev/zero of=/dev/sda bs=446 count=1

Scenario 4: Zero out the entire MBR (this will erase the partition table as well – effectively destroying the ability to easily access data on the drive)
A variation of the last dd command will wipe out the master boot record entirely. You will have to repartition and reformat your hard disk after this:

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Networking Administration Interview Questions

A subnet's mask is 255.255.255.224. How many nodes can this subnet have?

1 Answers  


Define the role of ieee in computer networking?

0 Answers  


Name 3 problems with distance-vector protocol ? a. not feasible for small internetwork b. count-to-infinite c. routing loops d. inconsistent views of network

1 Answers  


True/Flase: Secondary DNS servers can not be authoritative for any domains .

1 Answers  


Cached ethernet addresses are stored for about 5 minutes and is used to avoid a rebroadcast. This is called ____________ .

1 Answers  


Your previous Network Administrator had subnneted your class C network into many subnets. Only info you have is that one of the IP range was 200.252.144.33 through 128.252.144.46. How many subnets did he make ? what was the mask ?

1 Answers  


what is troubleshooting ?

12 Answers   CarrizalSoft Technologies, HCL, Sify,


Which standar does IEE 802.4 define ?

1 Answers  


what is VPN ?

4 Answers  


PPP has used for multi-protocol support ? a. protocol identifier b. specified bit values c. protocol indicator d. protocol frame length

1 Answers  


Explain how to identify the ip class of a given ip address?

0 Answers  


What connectivity device typically work at the Application layer of the OSI model?

1 Answers  


Categories
  • Networking Protocols Interview Questions Networking Protocols (671)
  • Networking Administration Interview Questions Networking Administration (1008)
  • Networking Security Interview Questions Networking Security (196)
  • Networking General Interview Questions Networking General (266)
  • Networking AllOther Interview Questions Networking AllOther (430)