Restoring a USB Stick formatted as ISO9660
Since I am using a netbook, I purchased software on a USB stick. Once I get a new version of the software, I am left with an old version on a USB stick formatted as iso9660. In particular, I wanted to create a multiboot USB stick using GRUB2 as a bootloader. It took over a day to find a solution that made grub-setup happy.
I tried cfdisk to force a new partition table. Then I used gparted to setup a new partition, label the partition, and set the flag. While I could now mount and add files to the USB stick, grub-setup still complained about the disk being iso9660.
I used the command:
dd if=/dev/zero of=/dev/sdb bs=512 count=1
to zero out the MBR. This change did not make grub-setup stop complaining about iso9660. Even stranger is that I could add Lilo to the MBR, or SysLinux to the boot sector of the partition. Neither of these utilities complained. I was totally confused.
I then found Boot Info Script, which provided the clues that I needed. This is one great script that I highly recommend. It provides a great summary report for all attached disks and partitions.
By the time I ran the Boot Info Script, it was after midnight. I was to exhausted to think. I awoke the next morning with a plan. I plugged in the USB stick, and let automount do its thing. I than ran the command:
df --block-size=512
to determine the number of blocks I need for the next command:
sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1354772
Note: The actual device may be different on your system. You can use the dmesg command to find out the actual device name.
This zeroed out the entire 4 gig USB stick. When I unplugged the USB stick and plugged it back in, automount fail to mount the stick as there was no filesystem on it. I than ran gparted to create a new partition table, and to create a new FAT32 partition. After unplugging it and plugging it back in, automount correctly mounted it. I then tried the command:
sudo grub-install --force --no-floppy --root-directory=/media/MULTIBOOT /dev/sdb
This time grub-install did not fail at grub-setup. All this was so that I could run the MultiSystem utility, to create a multiboot USB stick. I ran the Boot Info Script, and everything looked could. I used MultiSystem to install Ubuntu on the stick. I rebooted my netbook to the USB stick and it worked.
Armed with this knowledge, I tried it on another USB stick that was formatted as device type iso9660. For some reason automount failed, so I used the following approach:
sudo mkdir /mnt/usb sudo mount /dev/usb /mnt/usb df --block-size=512 sudo dd if=/dev/zero of=/dev/sdb bs=512 count=3952
Since this was a 2gig USB stick that contained and iso image for PartedMagic, I only had to zero out the iso image. Once again, automount failed to mount the partition. This time, gparted recognized that there was a partition on the stick for the full size of the stick. I created a new partition table, and created a new partition. The USB stick is now back to normal.

