Talk:USB flash installation media

From ArchWiki
Revision as of 18:05, 21 October 2012 by Osaka (Talk | contribs) (flush file system buffers after dd: new section)

Jump to: navigation, search

Verifying the USB

Before and after having performed the dd onto the USB disk, check that the md5sums are correct. For example:

- $ md5sum archlinux-2008.06-core-x86_64.img && echo && cat md5sums.x86_64

The next command will give similar results, but will also let you confirm that the data was written correctly and can be read correctly:

- dd if=/dev/sdb count=661159 status=noxfer | md5sum && echo && cat md5sums.x86_64

--Zatricky 06:45, 22 January 2009 (EST)

dd for Windows

There is also dd for Windows. I tried it and it works perfectly: [1]

 dd if=file.img of=\\.\e:

where e: is your USB drive letter.

--Liquen 14:55, 4 April 2009 (EDT)

Universal USB Installer

This method works fine for me though I got a little stuck when Arch tried to get at the boot device and couldn't find it. Turns out UUSBI's default trick is to label your device "PENDRIVE" if it formats it during the process (user-selectable). I'd like to add a note about this to the section on this page which covers the tool, but as it'd be my first change here I want to be sure I'm not going to be shouted at...

Xyon 09:57, 9 November 2011 (EST)

Hi and welcome! I've moved your discussion at the bottom of the page according to Help:Style#Discussion pages.
Yes you can add such a note, just always remember to explain your edits in the Summary field. For more style guidelines see Help:Style.
-- Kynikos 06:41, 10 November 2011 (EST)

About making the installation media without overwriting

I'm not totally sure if I misunderstood something, but I had to change the path of the entries of the *.cfg files. For instance:

INCLUDE boot/syslinux/archiso_sys.cfg

became:

INCLUDE syslinux/archiso_sys.cfg

It was the only way it worked with the unofficial ISO x86_64 image of march 13th, 2012. Looks like the syslinux command described in the page doesn't get the path as it should.

I edited all of the .cfg files, but probably only editing this ones should have been enough:

archiso.cfg archiso_head.cfg archiso_sys_inc.cfg

I hope it could be useful to somebody, because I spend some time with this (I even thought that was a problem with the hardware). I think it could be possible to make a simple script (or give some command lines) to patch the files once they are copied into the USB and run syslinux.

Thanks !!

Recovering the USB drive afterwards

This didn't work for me:

  1. dd count=1 bs=512 if=/dev/zero of=/dev/sdx

I tried this multiple times. No matter how I formatted the disk, 'devmon' always mounted '/dev/sdd' as /media/ARCH_whatever.

I finally just zeroed as much of the disk as I thought the ISO might have been written to.

  1. dd count=100 bs=4M if=/dev/zero of=/dev/sdx; sync

That worked. I believe we need to zero MORE than just the initial 512 bytes, but I have no idea how much. Maybe 2048?

At any rate, put '; sync' in there somewhere.

This is what I did eventually, taking a tip from: [2]

  1. dd count=100 bs=4M if=/dev/zero of=/dev/sdx; sync
  2. fdisk -H 224 -S 56 /dev/sdx

(new partition, primary, 1, 2048, whatever, type of partition, c (fat32 LBA), x, beginning data sector, 256, write)

  1. mkfs.vfat -F 32 -n volume_label -s 32 -v /dev/sdx1; sync

See the link for more details on the beginning data sector.

  • Um, zeroing out the first 512 bytes is fine for MBR-formatted drives. Were you using GPT? Because then you would need to zero out the first 512+512+16k, and the last 16k+512. See GPT. But assuming you used dd, we're talking about MBR-formatted because the ISO contains a MBR (hybrid) partition table.--DSpider (talk) 06:25, 8 September 2012 (UTC)

flush file system buffers after dd

I found that after using dd to write the data to my USB I had to wait for the file system to actually write it to my drive. (as dd completed and returned its stats) This could cause confusion, should we add 'sync' after the dd command on the artical?