2013-06-12

Updates

← Older revision

Revision as of 20:49, 12 June 2013

Line 15:

Line 15:

== Preparation ==

== Preparation ==

+

{{Note|At least 2 GiB of storage space is recommended. A modest set of packages will fit, leaving a little free space for storage.}}

{{Note|At least 2 GiB of storage space is recommended. A modest set of packages will fit, leaving a little free space for storage.}}

There are various ways of installing Arch on a USB stick, the simplest being from within Arch itself:

There are various ways of installing Arch on a USB stick, the simplest being from within Arch itself:



* If you are already running Arch, simply install {{Pkg|arch-install-scripts}} and proceed with the [
https://wiki.archlinux.org/index.php/Installation_Guide
Installation Guide] just like you would from the iso, but you will not be using /dev/sda. Use {{ic|lsblk}} to get the /dev/sd* name of your USB key prior to installation.

+

* If you are already running Arch, simply
[[pacman|
install
]]
{{Pkg|arch-install-scripts}} and proceed with the [
[
Installation Guide
]
] just like you would from the iso, but you will not be using /dev/sda. Use {{ic|
$
lsblk}} to get the /dev/sd* name of your USB key prior to installation.

{{Warning|If you mistakingly format /dev/sda, you are likely to go about deleting everything on your hard drive.}}

{{Warning|If you mistakingly format /dev/sda, you are likely to go about deleting everything on your hard drive.}}



* An Arch Linux CD/USB can be used to install Arch onto the USB key, via booting the CD/USB and following the [
https://wiki.archlinux.org/index.php/Installation_Guide
Installation Guide]. If booting from a Live USB, the installation will have to be made on a different USB stick.

+

* An Arch Linux CD/USB can be used to install Arch onto the USB key, via booting the CD/USB and following the [
[
Installation Guide
]
]. If booting from a Live USB, the installation will have to be made on a different USB stick.



* Or, if you have another
linux
computer available (it need not be Arch), you can follow the instructions to [[Install_from_Existing_Linux|install from existing
linux
]], and then skip to the configuration section.

+

* Or, if you have another
Linux
computer available (it need not be Arch), you can follow the instructions to [[Install_from_Existing_Linux|install from existing
Linux
]], and then skip to the configuration section.

== Installation ==

== Installation ==

+

Follow the [https://wiki.archlinux.org/index.php/Installation_Guide Installation Guide] as you normally would, with these exceptions:

Follow the [https://wiki.archlinux.org/index.php/Installation_Guide Installation Guide] as you normally would, with these exceptions:

* If cfdisk fails with "Partition ends in the final partial cylinder" fatal error, the only way to proceed is to kill all partitions on the drive. Open another terminal ({{keypress|Alt+F2}}), type {{ic|fdisk /dev/sdX}} (where {{ic|sdX}} is your usb drive), print partition table (p), check that it's ok, delete it (d) and write changes (w). Now return to cfdisk.

* If cfdisk fails with "Partition ends in the final partial cylinder" fatal error, the only way to proceed is to kill all partitions on the drive. Open another terminal ({{keypress|Alt+F2}}), type {{ic|fdisk /dev/sdX}} (where {{ic|sdX}} is your usb drive), print partition table (p), check that it's ok, delete it (d) and write changes (w). Now return to cfdisk.



* It is highly recommended to review the [https://wiki.archlinux.org/index.php/SSD#Tips_for_Minimizing_SSD_Read.2FWrites Tips for Minimizing SSD Read/Writes] on the [[SSD]] wiki article prior to selecting a filesystem.

To sum up, ext4 without a journal should be fine.

Recognize that flash has a limited number of writes, and a journaling file system will take some of these as the journal is updated.

For this same reason, it is best to forgo a swap partition. Note that this does not affect installing onto a USB hard drive.

+

* It is highly recommended to review the [https://wiki.archlinux.org/index.php/SSD#Tips_for_Minimizing_SSD_Read.2FWrites Tips for Minimizing SSD Read/Writes] on the [[SSD]] wiki article prior to selecting a filesystem. To sum up, ext4 without a journal should be fine. Recognize that flash has a limited number of writes, and a journaling file system will take some of these as the journal is updated. For this same reason, it is best to forgo a swap partition. Note that this does not affect installing onto a USB hard drive.

* Before creating the initial RAM disk {{ic|# mkinitcpio -p linux}}, in {{ic|/etc/mkinitcpio.conf}} add the {{ic|block}} hook to the hooks array right after udev. This is necessary for appropriate module loading in early userspace.

* Before creating the initial RAM disk {{ic|# mkinitcpio -p linux}}, in {{ic|/etc/mkinitcpio.conf}} add the {{ic|block}} hook to the hooks array right after udev. This is necessary for appropriate module loading in early userspace.

== Configuration ==

== Configuration ==

+

* Make sure that {{ic|/etc/fstab}} includes the correct partition information for {{ic|/}}, and for any other partitions on the USB key. If the usb key is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use UUID or label:

* Make sure that {{ic|/etc/fstab}} includes the correct partition information for {{ic|/}}, and for any other partitions on the USB key. If the usb key is to be booted on several machines, it is quite likely that devices and number of available hard disks vary. So it is advised to use UUID or label:

To get the proper UUIDs for your partitions issue '''blkid'''

To get the proper UUIDs for your partitions issue '''blkid'''



* menu.lst, the Grub configuration file, should be edited to (loosely) match the following:

+

{{Note|



+

*
When
GRUB
is installed on the USB key, the key will always be
{{ic|
hd0,0}}
.



{{Note|When
grub
is installed on the USB key, the key will always be hd0,0}}

+

*
It seems that current versions of
GRUB
will automatically default to using uuid. The following directions are for GRUB legacy
.



+

}}



{{Note|
It seems that current versions of
GRUB2
will automatically default to using uuid.

The following directions are for GRUB legacy}}

+

=== GRUB legacy ===

=== GRUB legacy ===

+

{{ic|menu.lst}}, the GRUB legacy configuration file, should be edited to (loosely) match the following:

With the static /dev/sdaX:

With the static /dev/sdaX:

Line 71:

Line 74:

INITRD ../initramfs-linux.img

INITRD ../initramfs-linux.img



Using your UUID

+

Using your UUID
:

LABEL Arch

LABEL Arch

Line 85:

Line 88:

==== Architecture ====

==== Architecture ====



For the most versatile compatibility it is recommended that you install the
x64_32
architecture with multilib support because it will run on both 32 and 64 bit architectures.

+

For the most versatile compatibility it is recommended that you install the
x86_64
architecture with
[[
multilib
]]
support because it will run on both 32 and 64 bit architectures.



{{
note
|If you have installed i686 architecture and would like to migrate to
x64_32
please refer to the [[
Migrating_Between_Architectures_Without_Reinstalling
]] wiki article for help}}

+

{{
Note
|If you have installed i686 architecture and would like to migrate to
x86_64,
please refer to the [[
Migrating Between Architectures Without Reinstalling
]] wiki article for help
.
}}

==== Input drivers ====

==== Input drivers ====



For laptop use (or use with a tactile screen) you will need the {{Pkg|xf86-input-synaptics}} package for the touchpad/touchscreen to work
:

+

For laptop use (or use with a tactile screen) you will need the {{Pkg|xf86-input-synaptics}} package for the touchpad/touchscreen to work
.



+



# pacman -S xf86-input-synaptics

+

For instructions on fine tuning or troubleshooting touchpad issues, see the [[Touchpad Synaptics]] article.

For instructions on fine tuning or troubleshooting touchpad issues, see the [[Touchpad Synaptics]] article.

Line 99:

Line 100:

==== Video drivers ====

==== Video drivers ====



For the most versatile compatibility install all
of
the open source
video drivers
including their multilib counterparts
.

+

{{Note|The use
of
proprietary
video drivers
is '''not''' recommended for this type of installation
.
}}



{{
note
|
The use of proprietary
video
drivers is '''not''' recommended for this type of installation.
}}

+

The recommended video drivers are:
{{
Pkg
|
xf86-
video
-vesa
}}
{{Pkg|mesa}}{{Pkg|xf86-video-ati}} {{Pkg|xf86-video-intel}} {{Pkg|xf86-video-nouveau}} {{Pkg|xf86-video-nv}}.



The recommended
video drivers
are
:

+

For the most versatile compatibility install all of the open source
video drivers
including their multilib counterparts
:
{{Pkg|lib32-ati-dri}} {{Pkg|lib32-intel-dri}} {{Pkg|lib32-nouveau-dri}}.



* xf86-video-vesa



* mesa



* xf86-video-ati



* xf86-video-intel



* xf86-video-nouveau



* xf86-video-nv



* lib32-ati-dri



* lib32-intel-dri



* lib32-nouveau-dri





To install all of these drivers at once:





# pacman -S xf86-video-vesa mesa xf86-video-ati xf86-video-intel xf86-video-nouveau xf86-video-nv lib32-ati-dri lib32-intel-dri lib32-nouveau-dri

==== Boot without using UUID ====

==== Boot without using UUID ====

Line 140:

Line 128:

* Run {{ic|udevinfo -p /sys/block/sdx/ -a}} (where sdx is the device name of your usb key)

* Run {{ic|udevinfo -p /sys/block/sdx/ -a}} (where sdx is the device name of your usb key)



* Find unique information pertaining to your usb key. I chose {{ic|1=SYSFS{model}=="DataTraveler 2.0"}}

+

* Find unique information pertaining to your usb key. I chose {{ic|1=SYSFS{model}=="DataTraveler 2.0"}}



* Make a new file: {{ic|/etc/udev/udev.rules/10-my-usb-key.rules}} and insert:

+

* Make a new file: {{ic|/etc/udev/udev.rules/10-my-usb-key.rules}} and insert:

:{{bc|1= KERNEL=="sd**", SYSFS{product}=="DataTraveler 2.0", SYMLINK+="WHATEVERYOUWANTOTCALLIT%n"}}

:{{bc|1= KERNEL=="sd**", SYSFS{product}=="DataTraveler 2.0", SYMLINK+="WHATEVERYOUWANTOTCALLIT%n"}}

:({{ic|1=KERNEL=="sd**"}} is because the kernel - 2.6.16 here - names all usb devices sd as it uses the scsi sub-system and you want to look at every sd device and apply the setting to every partition), with {{ic|1=SYSFS{model}==}} being the unique identifier collected from udevinfo.

:({{ic|1=KERNEL=="sd**"}} is because the kernel - 2.6.16 here - names all usb devices sd as it uses the scsi sub-system and you want to look at every sd device and apply the setting to every partition), with {{ic|1=SYSFS{model}==}} being the unique identifier collected from udevinfo.



* Run {{ic|/etc/start-udev uevents}} and make sure the symlinks appears in {{ic|/dev}}.

+

* Run {{ic|/etc/start-udev uevents}} and make sure the symlinks appears in {{ic|/dev}}.

* If so, edit {{ic|/etc/fstab}}, replacing your old sdx with the new symlinks.

* If so, edit {{ic|/etc/fstab}}, replacing your old sdx with the new symlinks.

Line 154:

Line 142:

=== Optimizing for the lifespan of flash memory ===

=== Optimizing for the lifespan of flash memory ===



* Again, it is highly recommended to review the [[SSD#Tips_for_Minimizing_SSD_Read.2FWrites |Tips for Minimizing SSD Read/Writes]] on the [[SSD]] wiki article.



== See
Also
==

+

* Again, it is highly recommended to review the [[SSD#Tips_for_Minimizing_SSD_Read.2FWrites|Tips for Minimizing SSD Read/Writes]] on the [[SSD]] wiki article.

+

+

== See
also
==

+

* [[Official Arch Linux Install Guide]]

* [[Official Arch Linux Install Guide]]

* [[Installing Arch Linux from VirtualBox]]

* [[Installing Arch Linux from VirtualBox]]

* [[Solid State Drives]]

* [[Solid State Drives]]

Show more