Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a 1GB USB flash drive which I wanted to use as an installation medium for Linux distros. My first experiment was to be installing Arch on an old laptop (old enough that if I really messed it up, it wouldn't matter). I downloaded the ISO image, and put the USB into the port; it mounted automatically. Following the instructions on Arch's installation how-to page, I ran dd if archlinux-XXXX.iso of /dev/sdg1. I then could not see any files on the USB (whether using ls or nautilus). I umounted it, then plugged it back in, and it had some files on it. I'm afraid I can't remember exactly what they were, but I'm pretty sure I saw a directory named /boot.

I then plugged it into the laptop, which would not boot from the flash drive. I plugged the USB back into my main computer, only to be told:

Unable to mount 168 MB Filesystem
Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sdg1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try dmesg | tail or so

That command, dmesg | tail, gives the following: [338915.672127] UDF-fs: No anchor found [338915.672133] UDF-fs: No partition found (1) [338955.452708] UDF-fs: No anchor found [338955.452714] UDF-fs: Rescanning with blocksize 2048 [338955.479829] UDF-fs: No anchor found [338955.479834] UDF-fs: No partition found (1) [338955.527366] UDF-fs: No anchor found [338955.527373] UDF-fs: Rescanning with blocksize 2048 [338955.555208] UDF-fs: No anchor found [338955.555213] UDF-fs: No partition found (1)

So I'm curious about what has happened here. Did I do something wrong somewhere? Why is the error message referring to a 168 MB device, when it's supposed to be 1 GB? Also, is there any way to salvage the flash drive, or is it toast?

Edit: Information from fdisk /dev/sdg Command (m for help): p [print the partition table]

Disk /dev/sdg: 1021 MB, 1021125120 bytes
64 heads, 32 sectors/track, 973 cylinders, total 1994385 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe797d5bb

   Device Boot      Start         End      Blocks   Id  System
/dev/sdg1   *           0      327679      163840   17  Hidden HPFS/NTFS
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

If you were working from Official Arch Linux Install Guide, note that it says:

Make sure to use /dev/sdX and not /dev/sdX1

Assuming you did dd to /dev/sdg1 (as opposed to mistyping the command in your question), you've copied the ISO image into a partition on the flash drive. The partition is likely too small to hold the ISO, and the boot sector of /dev/sdg was untouched.

Probably the best thing to do is re-dd the image, using the correct target. Once that's done, fdisk will probably say you don't have a partition table. Note that in your fdisk output, the total device size is correct, 1021 MB. It's hard to say why the drive might have been formatted with a 168 MB partition.

It is possible to put the ISO in a partition, as long as the partition is big enough, but that's less likely to be bootable.

share|improve this answer
    
Thanks, Andy. In my bash history i had both ...of=/dev/sdg and ...of=-/dev/sdg1. Apparently for some reason I thought the first one didn't work. I reran dd just now, put it in the laptop, and the Arch installer booted just fine. Mea culpa. –  Wolf Apr 25 '11 at 19:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.