Posts Tagged With: hdd

Installing GRUB Into MBR

Tagged with: , , , , , , ,

Use this when your MBR gets corrupted – usually happens after you reinstall windows. Pop in a bootable ubuntu DVD and boot into it. Then open a terminal and type in the following commands…


$ sudo grub
> find /boot/grub/stage1
(hd0,1)
> root (hd0,1) #Must be same as the output of the last command
> setup (hd0)
1 Comment »

Backup HDD To Remote Host

Tagged with: , , , , , , , , , , ,

Make a backup of a local hard disk on remote host via ssh


dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda.gz'
No Comments »

Backup Entire Harddrive to an Image

Tagged with: , , , , , , , ,

Backup content of the harddrive to a file. Creates an image of the drive


dd if=/dev/sda of=/tmp/sda.iso
4 Comments »

Shows all Partitions

Tagged with: , , , , ,

Shows all partitions on the HDD


fdisk -l
No Comments »

fsck command

Tagged with: , , , , , ,

Repair / check integrity of linux filesystem on disk hda1


fsck  /dev/hda1 
No Comments »

Check for Badblocks on the HDD

Tagged with: , , , ,

Check bad blocks in disk hda1


badblocks  -v  /dev/hda1
No Comments »

Check for Bad Blocks in HDD

Tagged with: , , , , , ,

Linux Command to search the Harddisk for bad sectors


sudo badblocks -v /dev/sda
No Comments »

Find All Connected Harddisks

Tagged with: , , , , , , ,

<p class=”intro”>If you have many IDE harddisks connected to the system(but not mounted), this command will find it. This will work for sata HDD as well if you use ‘sd’ instead of ‘hd'</p>

<pre><code class=”cli”>
ls /dev/hd*
</code></pre>

<p>Simple, is it not? To find the mounted drives just use the command ‘dh’.</p>

[tags]hda,harddisk,ide,sata,linux,command,hdd,partition[/tags]

No Comments »