Difference between revisions of "Talk:USB flash installation media"

From ArchWiki
Jump to: navigation, search
(Universal USB Installer)
m (edit previous talk)
(45 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
+
== <s>About making the installation media without overwriting</s> ==
== 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
+
 
+
--[[User:Zatricky|Zatricky]] 06:45, 22 January 2009 (EST)
+
 
+
== dd for Windows ==
+
 
+
There is also '''dd''' for Windows. I tried it and it works perfectly: [http://www.chrysocome.net/dd]
+
 
+
  dd if=file.img of=\\.\e:
+
 
+
where '''e:''' is your USB drive letter.
+
 
+
--[[User:Liquen|Liquen]] 14:55, 4 April 2009 (EDT)
+
 
+
== <s> Universal USB Installer </s>==
+
 
+
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...
+
 
+
[[User:Xyon|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]].
+
:-- [[User:Kynikos|Kynikos]] 06:41, 10 November 2011 (EST)
+
:: Note added. Close. Thanks. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 05:59, 8 February 2013 (UTC)
+
 
+
== 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:
 
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:
  
Line 52: Line 19:
  
 
Thanks !!
 
Thanks !!
 +
:I cannot find that this is still relevant to the article as it now exists. I am striking it out as it looks like it could be good to remove. [[User:AdamT|AdamT]] ([[User talk:AdamT|talk]]) 10:33, 8 August 2013 (UTC)
  
== Recovering the USB drive afterwards ==
+
::Just lunched from USB drive without UUID(don't have any idea why it didn't have one). Solution was to change label to appropriate in loader/entries/archiso-x86_64.conf. Not sure weither this should be added to article.
 
+
--[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 16:00, 18 August 2013 (UTC)
This didn't work for me:
+
::Versusvoid, I would love to adapt the article but I cannot follow your description above. Looking at that section, it may be out dated. If you are watching this please elaborate when you have time. Thanks, [[User:AdamT|AdamT]] ([[User_talk:AdamT|Talk]]) 08:32, 23 August 2013 (UTC)
 
+
# 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.
+
 
+
# 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:
+
[http://www.patriotmemory.com/forums/showthread.php?3696-HOWTO-Increase-write-speed-by-aligning-FAT32]
+
 
+
# dd count=100 bs=4M if=/dev/zero of=/dev/sdx; sync
+
# 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)
+
 
+
# 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 {{ic|dd}}, we're talking about MBR-formatted because the ISO contains a MBR (hybrid) partition table.--[[User:DSpider|DSpider]] ([[User talk: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?
+
 
+
== <s> Universal USB Installer </s>==
+
 
+
This method seems to not work for me, and from a little research that I did it has to do with SYSLINUX not accepting relative paths for FAT filesystems (see [https://bbs.archlinux.org/viewtopic.php?id=145749 here]). Since this would be my first edit, I thought I should run it by the discussion page before adding a note.
+
 
+
[[User:Svart|Svart]] ([[User talk:Svart|talk]]) 22:04, 12 November 2012 (UTC)
+
  
:Syslinux 4.06 came out a couple of weeks ago, or something like that, and it seems it fixed this bug. The Arch Linux ISO uses the latest {{Pkg|syslinux}} package ''(for confirmation, you can run {{ic|pacman -Qi syslinux}})'', but maybe this program adds its own version, like Unetbootin does. In that case, it either needs an update, or you need to use another method.
+
:::Ok. For some reason ubuntu did not see USB UUID. So ''blkid -o value -s UUID /dev/sdx1'' were returning empty string. The solution was:
:--[[User:DSpider|DSpider]] ([[User talk:DSpider|talk]]) 12:01, 13 November 2012 (UTC)
+
:: Remove fixed issue. At the same time, LABEL is wrong. See the note in main page. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 06:02, 8 February 2013 (UTC)
+
  
== Rationale for block size ==
+
:::''$ sed -i "s|label=ARCH_.*|label=$(blkid -o value -s LABEL /dev/sdx1)|" loader/entries/archiso-x86_64.conf''
  
Why specifically ''bs=4M'' in the [[USB_Installation_Media#Overwrite_the_USB_drive|example]]:
+
:::in the USB mounting directory. --[[User:Versusvoid|Versusvoid]] ([[User talk:Versusvoid|talk]]) 08:05, 31 August 2013 (UTC)
[[USB_Installation_Media#Overwrite_the_USB_drive|# dd '''bs=4M''' if=/path/to/archlinux.iso of=/dev/sdx]]
+
[[User:NoobCp|NoobCp]] ([[User talk:NoobCp|talk]]) 11:08, 20 December 2012 (UTC)
+
  
:Because it speeds up the process, that's why. I guess somebody decided that one warning, two notes and a tip would be too rainbow-like. See [https://wiki.archlinux.org/index.php?title=USB_Installation_Media&oldid=218405 this] older edit (which references [http://sprunge.us/SGIY this] script). I reduces the time it needs almost by half. --[[User:DSpider|DSpider]] ([[User talk:DSpider|talk]]) 12:17, 4 February 2013 (UTC)
+
:::It seems that sometimes you have to get the UUID by running the command as root. --[[User:Rongmu|Rongmu]] ([[User talk:Rongmu|talk]]) 11:23, 3 October 2013 (UTC)

Revision as of 11:23, 3 October 2013

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 !!

I cannot find that this is still relevant to the article as it now exists. I am striking it out as it looks like it could be good to remove. AdamT (talk) 10:33, 8 August 2013 (UTC)
Just lunched from USB drive without UUID(don't have any idea why it didn't have one). Solution was to change label to appropriate in loader/entries/archiso-x86_64.conf. Not sure weither this should be added to article.

--Versusvoid (talk) 16:00, 18 August 2013 (UTC)

Versusvoid, I would love to adapt the article but I cannot follow your description above. Looking at that section, it may be out dated. If you are watching this please elaborate when you have time. Thanks, AdamT (Talk) 08:32, 23 August 2013 (UTC)
Ok. For some reason ubuntu did not see USB UUID. So blkid -o value -s UUID /dev/sdx1 were returning empty string. The solution was:
$ sed -i "s|label=ARCH_.*|label=$(blkid -o value -s LABEL /dev/sdx1)|" loader/entries/archiso-x86_64.conf
in the USB mounting directory. --Versusvoid (talk) 08:05, 31 August 2013 (UTC)
It seems that sometimes you have to get the UUID by running the command as root. --Rongmu (talk) 11:23, 3 October 2013 (UTC)