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
+
 
+
2) Making or using a suitable mount point, mount the partition somewhere (you can use option -tiso9660 but mount should work it out):
+
 
  mkdir /mnt/archCD
 
  mkdir /mnt/archCD
  mount /dev/hda12 /mnt/archCD
+
  mount /dev/sda12 /mnt/archCD
  
3) Edit lilo.conf and add:
+
3) Read the kernel options in isolinux.cfg:
  image=/mnt/archCD/isolinux/vmlinuz
+
  grep -e APPEND /mnt/archCD/boot/isolinux/isolinux.cfg
        label=archCD
+
Remember the value of the initrd= and archisolabel= options; the other options are less important on most systems.
        initrd=/mnt/archCD/isolinux/initrd.img
+
        append="root=/dev/hda12 BOOTMEDIA=cd"
+
  
then don't forget to run:
+
==Booting the ISO with GRUB==
lilo
+
  
==Grub==
+
{{Note|It is possible to boot the ISO image using LILO; see [[#Booting the ISO with LILO]] below.}}
  
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:
+
1) Reboot the computer. When the GRUB menu appears, press 'c' for a command line.
  
1) Format the spare partition and (making or using a suitable mount point) mount it:
+
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).
  
mkreiserfs /dev/hda12
+
3) Load the kernel:
  mkdir /mnt/archCD
+
  kernel /boot/vmlinuz26 archisolabel=''FOO''
mount /dev/hda12 /mnt/archCD
+
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.
  
2) Mount the Arch iso file (making or using a suitable mount point):
+
4) Load the initial ramdisk:
  mkdir /mnt/tmp
+
  initrd ''/boot/archiso.img''
mount -o loop arch-0.7.iso /mnt/tmp
+
where ''/boot/archiso.img'' is the value of initrd you memorized or wrote down above.
  
3) Copy from the iso to the spare partition:
+
5) Boot:
  cd /mnt/tmp
+
  boot
cp -a * /mnt/archCD
+
  
4) then modify <code>/boot/grub/menu.lst</code>
+
==And to reclaim the spare partition when Arch is up and running...==
title ArchCD
+
kernel (hd0,11)/isolinux/vmlinuz root=/dev/hda12 BOOTMEDIA=cd
+
initrd (hd0,11)/isolinux/initrd.img
+
  
==Reboot and Install Arch==
+
1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using sda12 as an example:
 +
mkreiserfs /dev/sda12
  
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:
+
2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:
  mount -t iso9660 /dev/hda12 /src
+
  /dev/sda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0
if you are using grub:
+
mount /dev/hda12 /src
+
  
* replace <code>/dev/hda12</code> with the spare partition you allocated
+
3) Lastly check that the mount point exists, if not:
* remember you can use "tab completion" to find that partition, rather than type the whole thing in
+
mkdir /mnt/spare
* 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...==
+
==Booting the ISO with LILO==
  
1) The spare partition can be reclaimed by making a file system with "mkreiserfs", "mke2fs" etc. Using hda12 as an example:
+
{{Out of date}}
mkreiserfs /dev/hda12
+
  
2) Then edit /etc/fstab to check the partition has the correct file system and options listed against it:
+
'''''FIXME FIXME FIXME'''''
/dev/hda12 /mnt/spare reiserfs defaults,noatime,notail,noauto 0 0
+
  
3) Lastly check that the mount point exists, if not:
+
3) Edit lilo.conf and add:
  mkdir /mnt/spare
+
  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

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