Now, that you know how to create a bootable cdrom, you have to admit, it is a bit of a pain to buy and burn a cdrom every time you want to try a new linux distro and then wait forever until the OS is installed from the super-slow cd rom. The solution is to create a bootable usb disk and the procedure to create one, assuming you already have a partitioned and formatted pendrive, couldn’t have been more easier. All you have to do is
$ dd if=mylinux.iso of=/dev/sdb bs=20M
Here if stands for input file, of for output file and bs for block-size.
After this, make sure you flush the write buffers to disk by issuing the command
$ sync
Here /dev/sdb is the device file that represents your usb pendrive. It may be different on your system. But it is always something like sdb or sdc. To find out exactly, plug in your usb disk and then run ‘$ sudo fdisk -l’. You should be able to see a partition table for your pendrive at the bottom and also atleast one partition which would be something like sdb1 or sdc1. However, if you haven’t formatted your pendrive before and want to learn how to do it from the command line, then read the next section.
If you haven’t already realized, you can do amazing things with the dd command. You can create a backup of an entire hard disk partition by
$ dd if=/dev/sda1 of=/dev/sda2
This command copied the entire partition sda1 on your hard disk to partition sda2. You can restore the partition simply by interchanging the if and of attributes. However, exercise extreme caution while using the dd command as you can completely mess up your hard drive and lose all data if you specify the if and of attributes wrongly.
No comments:
Post a Comment