http://ubuntuforums.org/showthread.php?p=11890356
## 우선 아래 처럼 usb를 깨끗하게 밀라네요..
## 어떤 밀어야 하는 녀석이 먼지 알아야죠..
sudo fdisk -lu
## 여기서 빠진 것이
sudo umount -l /dev/sdcX ##같은 거네요..
sudo blkid
sudo dd if=/dev/zero of=/dev/sdX bs=4096
#! /bin/bash
if [ "$(whoami)" != "root" ]
then
echo "Usage: sudo $0"
exit
fi
label="Lubuntu 12.04 i386"
isofile="precise-desktop-i386.iso"
target=$(blkid|grep "LABEL=\"$label\" TYPE=\"iso9660\""|sed s/1.*//)
if [ "$target" != "" ]
then
echo "Install to $target? (y/n)"
read ans
if [ "$ans" == "y" ]
then
echo "dd if=$isofile of=$target bs=4096 ..."
dd if="$isofile" of="$target" bs=4096
echo ":-) The $label USB stick is re-cloned :-)"
fi
else
echo ":-( The $label USB stick is not found :-("
echo " Do you want to make a new one?"
read ans
if [ "$ans" == "y" ]
then
hlptxt="help-mkusb.txt"
echo "sudo lshw -class disk #####" > "$hlptxt"
lshw -class disk >> "$hlptxt"
echo "lsusb|sort -k 4,4 -k 1 #####" >> "$hlptxt"
lsusb|sort -k 4,4 -k 1 >> "$hlptxt"
echo "sudo fdisk -lu|grep "/dev/sd"|sort #####" >> "$hlptxt"
fdisk -lu|grep "/dev/sd"|sort >> "$hlptxt"
echo "df|grep "/dev/sd"|sort #####" >> "$hlptxt"
df|grep "/dev/sd"|sort >> "$hlptxt"
echo "*** WARNING: the drive will be completely overwritten ***"
echo " Use the info in the xterm window (less $hlptxt)"
xterm -e less "$hlptxt" &
echo
echo " *Unmount the drive if mounted*"
echo " Edit the following line (x --> another letter)"
echo " "
echo "sudo dd if=$isofile of=/dev/sdx bs=4096"
fi
fi