Main Menu

friends

Banner

Latest articles

convert mysql table from MyISAM to InnoDB
30/12/2009 | mad mad mod

MyISAM is the default storage engine for MySQL. Unfortunately it doesn't support transactions or foreign keys (but it has some other nice features like compression). However, because InnoDB does su [ ... ]


find world writable files
09/01/2010 | mad mad mod

No file on a server should have o+w permissions (at least I can't think of a reason).The command to find all world writable files on system is: # find / -perm -0002  -type f -print
This command will [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
backup MBR (master boot record) with dd E-mail
sysadmin

The first 512 bytes of a partitioned storage device is called the MBR (master boot record). The main reason why I think you should backup the MBR is because it contains the disks primary partition table.

 

To backup the MBR of /dev/sda to /tmp/sda.mbr.dump type:

 

# dd if=/dev/sda of=/tmp/sda.mbr.dump bs=512 count=1

 

 

To restore the MBR type:

 

 

# dd if=/tmp/sda.mbr.dump of=/dev/sda

 

 

To exclude the partition table from being restored type:

 

# dd if=/tmp/sda.mbr.dump of=/dev/sda count=1 bs=446

 

 

To restore only the partition table:

 

 

# dd if=/tmp/sda.mbr.dump of=/dev/sda bs=1 count=64 skip=446 seek=446

 

 

Usually it is a good idea to re-install grub afterwards:

 

# grub-install /dev/sda

 

 

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting