Difference between revisions of "Fast Arch Install from existing Linux System"

From ArchWiki
Jump to: navigation, search
(Lilo: I don't think dd will ever cause trouble)
(rewrite)
Line 1: Line 1:
{{Out of date}}
 
 
 
[[Category:Getting and installing Arch (English)]]
 
[[Category:Getting and installing Arch (English)]]
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
Line 16: Line 14:
 
Read the [[Official Arch Linux Install Guide]] first so that you know what to expect.
 
Read the [[Official Arch Linux Install Guide]] first so that you know what to expect.
  
You need one '''more''' spare partition, bigger than the Arch CD iso. Here I'm logged in as '''root''' and am using "/dev/hda12" which happens to be 6GB.
+
You need one '''more''' spare partition, at least as large as the Arch ISO image. Here I'm logged in as '''root''' and am using "/dev/sda12" which happens to be 6GB.
  
Depending on your boot loader, follow the "LILO" or "GRUB" section. Then the "REBOOT AND INSTALL" section
+
==Preparation==
  
==Lilo==
+
1) Write the ISO image onto the spare partition:
 +
dd if=archlinux-2010.05-netinstall-x86_64.iso of=/dev/sda12 bs=4k
  
1) Copy the ISO to the spare partition:
+
2) Making or using a suitable mount point, mount the partition somewhere (you can specify -t iso9660, but mount should auto-detect the filesystem type):
  dd if=arch-0.7.iso of=/dev/hda12 bs=4k
+
  mkdir /mnt/archCD
 +
mount /dev/sda12 /mnt/archCD
  
2) Making or using a suitable mount point, mount the partition somewhere (you can use option -tiso9660 but mount should work it out):
+
3) Read the kernel options in isolinux.cfg:
  mkdir /mnt/archCD
+
  grep -e APPEND /mnt/archCD/boot/isolinux/isolinux.cfg
mount /dev/hda12 /mnt/archCD
+
Remember the value of the initrd= and archisolabel= options; the other options are less important on most systems.
  
3) Edit lilo.conf and add:
+
==Booting the ISO with GRUB==
image=/mnt/archCD/isolinux/vmlinuz
 
        label=archCD
 
        initrd=/mnt/archCD/isolinux/initrd.img
 
        append="root=/dev/hda12 BOOTMEDIA=cd"
 
  
then don't forget to run:
+
{{Note|It is possible to boot the ISO image using LILO; see [[#Booting the ISO with LILO]] below.}}
lilo
 
  
==Grub==
+
1) Reboot the computer.  When the GRUB menu appears, press 'c' for a command line.
  
I've not been able to boot a hard disk partition containing the Arch iso with grub, instead the iso must first be unpacked to an ordinary partition. This is still quicker than burning a CD:
+
2) Type:
 +
root (hd#,#)
 +
If you are using [[GRUB-Legacy]], /dev/sda12 corresponds to (hd0,11); if you are using [[GRUB2]], /dev/sda12 corresponds to (hd0,12).
  
1) Format the spare partition and (making or using a suitable mount point) mount it:
+
3) Load the kernel:
 +
kernel /boot/vmlinuz26 archisolabel=''FOO''
 +
where ''FOO'' is the value of archisolabel you memorized or wrote down above.
  
mkreiserfs /dev/hda12
+
If you are using GRUB2, use '''linux''' instead of '''kernel''' in the above command.
mkdir /mnt/archCD
 
mount /dev/hda12 /mnt/archCD
 
  
 +
4) Load the initial ramdisk:
 +
initrd ''/boot/archiso.img''
 +
where ''/boot/archiso.img'' is the value of initrd you memorized or wrote down above.
  
2) Mount the Arch iso file (making or using a suitable mount point):
+
5) Boot:
  mkdir /mnt/tmp
+
  boot
mount -o loop arch-0.7.iso /mnt/tmp
 
  
3) Copy from the iso to the spare partition:
+
==And to reclaim the spare partition when Arch is up and running...==
cd /mnt/tmp
 
cp -a * /mnt/archCD
 
  
4) then modify <code>/boot/grub/menu.lst</code>
+
1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using sda12 as an example:
  title ArchCD
+
  mkreiserfs /dev/sda12
kernel (hd0,11)/isolinux/vmlinuz root=/dev/hda12 BOOTMEDIA=cd
 
initrd (hd0,11)/isolinux/initrd.img
 
  
==Reboot and Install Arch==
+
2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:
 +
/dev/sda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0
  
Reboot and select '''archCD''', when the installer asks if you're using CD or SRC, you can hop out to another shell and if you are using lilo:
+
3) Lastly check that the mount point exists, if not:
mount -t iso9660 /dev/hda12 /src
+
  mkdir /mnt/spare
if you are using grub:
 
  mount /dev/hda12 /src
 
  
* replace <code>/dev/hda12</code> with the spare partition you allocated
+
==Booting the ISO with LILO==
* remember you can use "tab completion" to find that partition, rather than type the whole thing in
 
* then hop back and install from hard drive by selecting SRC rather than CD.
 
  
==And to reclaim the spare partition when Arch is up and running...==
+
{{Out of date}}
  
1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using hda12 as an example:
+
'''''FIXME FIXME FIXME'''''
mkreiserfs /dev/hda12
 
  
2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:
+
3) Edit lilo.conf and add:
  /dev/hda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0
+
  image=/mnt/archCD/isolinux/vmlinuz
 +
        label=archCD
 +
        initrd=/mnt/archCD/isolinux/initrd.img
 +
        append="root=/dev/hda12 BOOTMEDIA=cd"
  
3) Lastly check that the mount point exists, if not:
+
then don't forget to run:
  mkdir /mnt/spare
+
  lilo

Revision as of 21:33, 25 May 2010

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

If you are running Linux already and don't have a CD writer---or if you simply want a faster install process---here is how to install Arch from another running Linux installation.

Read the Official Arch Linux Install Guide first so that you know what to expect.

You need one more spare partition, at least as large as the Arch ISO image. Here I'm logged in as root and am using "/dev/sda12" which happens to be 6GB.

Preparation

1) Write the ISO image onto the spare partition:

dd if=archlinux-2010.05-netinstall-x86_64.iso of=/dev/sda12 bs=4k

2) Making or using a suitable mount point, mount the partition somewhere (you can specify -t iso9660, but mount should auto-detect the filesystem type):

mkdir /mnt/archCD
mount /dev/sda12 /mnt/archCD

3) Read the kernel options in isolinux.cfg:

grep -e APPEND /mnt/archCD/boot/isolinux/isolinux.cfg

Remember the value of the initrd= and archisolabel= options; the other options are less important on most systems.

Booting the ISO with GRUB

Note: It is possible to boot the ISO image using LILO; see #Booting the ISO with LILO below.

1) Reboot the computer. When the GRUB menu appears, press 'c' for a command line.

2) Type:

root (hd#,#)

If you are using GRUB-Legacy, /dev/sda12 corresponds to (hd0,11); if you are using GRUB2, /dev/sda12 corresponds to (hd0,12).

3) Load the kernel:

kernel /boot/vmlinuz26 archisolabel=FOO

where FOO is the value of archisolabel you memorized or wrote down above.

If you are using GRUB2, use linux instead of kernel in the above command.

4) Load the initial ramdisk:

initrd /boot/archiso.img

where /boot/archiso.img is the value of initrd you memorized or wrote down above.

5) Boot:

boot

And to reclaim the spare partition when Arch is up and running...

1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using sda12 as an example:

mkreiserfs /dev/sda12

2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:

/dev/sda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0

3) Lastly check that the mount point exists, if not:

mkdir /mnt/spare

Booting the ISO with LILO

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:Fast Arch Install from existing Linux System#)

FIXME FIXME FIXME

3) Edit lilo.conf and add:

image=/mnt/archCD/isolinux/vmlinuz
        label=archCD
        initrd=/mnt/archCD/isolinux/initrd.img
        append="root=/dev/hda12 BOOTMEDIA=cd"

then don't forget to run:

lilo