Q. One of my responsibilities is backing up UNIX server. How do I backup data under HP-UX UNIX? How do I use mt, fbackup and frecover commands to perform full and incremental backups?
Continue reading “How to: HP-UX UNIX Backup and Recover Data to Tape Device”
Q. I’ve Debian Linux 4.0 Install on HP Server. This server has SCSI tape device. According to my tape documentation size should be 64k. How can I set the block size for a HP SCSI tape device?
Continue reading “Linux Set the Block Size for a SCSI Tape Device”
Q. I’m using CentOS Linux and I’d like to create bootable Linux CD for the same. How do I create an installation boot disk?
A. You need to find images/ directory located on CentOS / Fedora / RHEL or any other Linux distribution. This directory contains image files that can be used to create media capable of starting the Linux installation process.
Continue reading “How to Create Bootable Linux CD”
Q. How can I copy one hard disk to another using dd command?
A. dd command can copy disk in raw format. It will copy partition table and bootloader and all partitions within this disk. For example, you can copy /dev/sda to /dev/sdb (same size) using the following dd command. dd should complete with no errors, but output the number of records read and written.
Login as the root user (use sudo or su command)
These examples may result into data loss, ensure there are good backups before doing this, as using dd wrong way can be dangerous.
Open terminal or shell prompt and type the following dd command:
# dd if=/dev/sda of=/dev/sdb
- if=/dev/sda : Input disk (source)
- of=/dev/sdb : Output disk (destination)
You can also copy hard disk or partition image to another system using a network and netcat (nc) command.
How do I copy MBR from one hard disk to another hard disk under Debian Linux?
Q. How do I uninstall GRUB? I need to uninstall everything before sending this hard disk to someone including GRUB. All I need to keep is windows XP.
A. GNU GRUB (“GRUB” for short) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which allows a user to have several different operating systems on their computer at once, and to choose which one to run when the computer starts.
You can overwrite MBR with standard dd command. You can also use old good MS-DOS fdisk command to overwrite MBR.
Using MS-DOS/Windows 9x boot disk
In order to remove the GRUB bootloader from a Linux and Windows XP machine, boot with a Windows 9x startup disk or CD and execute the MS-DOS command:
Using Windows XP boot disk
Boot computer using Windows XP (Windows 2000) setup disc / CD / DVD. Next, type the following commands:
You can also use dd command from Linux itself (it removes partition table):
# dd if=/dev/null of=/dev/sdX bs=512 count=1
Just remove MBR, without the partition table (see comment below):
# dd if=/dev/null of=/dev/sdX bs=446 count=1
Replace /dev/hdX with your actual device name such as /dev/hda. Use fdisk -l command to find out device name:
# fdisk -lOutput:
Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 30384 243955057+ 83 Linux
/dev/sda3 30385 30515 1052257+ 82 Linux swap
need additional swap space to improve my Linux server/desktop system performance. How do I add a swap file to Linux system using command line options without creating a new partitions?