Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Tip of the Day: "ghosting" a machine with nc and dd



On Tue, 17 Jul 2007 20:01:36 +0900, tlug@example.com wrote:

> Note that the command above runs the fdisk program, which lets you type
> in fdisk commands, so it does not give the partition information
> immediately. You will get a prompt such as "Command (m for help):" where
> you can type "p" to print the partition table (like above) and then "q"
> to exit fdisk.

I think you'll find that Josh meant to tell people to run:

sudo /sbin/fdisk -l /dev/(h|s)da

fdisk, being in /sbin usually, is not in a regular user's $PATH and
therefore needs to be invoked with a fully qualified pathname:

godwin@example.com:~ $ sudo fdisk -l /dev/hda
sudo: fdisk: command not found
godwin@example.com:~ $ sudo /sbin/fdisk -l /dev/hda

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1020     8193118+   c  W95 FAT32 (LBA)
/dev/hda2            1021        1028       64260   83  Linux
/dev/hda3            1029        1637     4891792+  83  Linux
/dev/hda4            1638       14593   104069070    5  Extended
/dev/hda5            1638        1701      514048+  83  Linux
/dev/hda6            1702        1765      514048+  83  Linux
/dev/hda7            1766        1900     1084356   83  Linux
/dev/hda8            1901        3117     9775521   83  Linux
/dev/hda9            3118        3181      514048+  82  Linux swap
/dev/hda10           3182       13500    82887336   83  Linux
/dev/hda11          13501       14593     8779491   83  Linux

The "-l" (that's a lowercase "L") option does the same as the "p" command in
the interactive version but just spits the information out and quits
immediately.

-- 
G. Stewart - gstewart@example.com

"A reputation for releasing inferior software will make it more
 difficult for a software vendor to induce customers to pay for
 new products or new versions of existing products."
              -- Microsoft

Attachment: pgp6pdm1u14Pl.pgp
Description: PGP signature


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links