You are not logged in.
Hi again,
I managed to install Arch on my USB flash drive which I partitioned /dev/sdb1 to be /boot,
/dev/sdb2 = PV of vgarch with one lv_root and one lv_var, and swap as /dev/sdb5 (first partition in extended part.)
The FTP install went fine after I had mounted /boot and the LVs / and /var.
I also successfully ran the setup afterwards, editing each config file, even those where I didn't apply any modifications.
Finally, I installed grub in the MBR of the USB drive, viz. /dev/sdb.
When asked during the configuration what modules I would require during boot
I confirmed LVM, RAID and included dm-mod manually in the MODULES array.
Nevertheless, the initial RAM disk must have been created incorrectly.
Because when I boot from the stick
the grub menu appears and when the default entry gets started I get the error message:
Booting 'Arch Linux'
root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz26 root=/dev/mapper/vgarch-lv_root ro
Error 15: File not found
Press any key to continue...
I know that something must have gone wrong while createing the initrd file.
Sorry, right now I cannot even mount my USB stick in the running Xubuntu from where I write this posting.
The reason is pretty daft, as I was too unwary.
Being used to the RHEL/CentOS initrd image files (where absolute path names are stripped)
I instantly did the following mess and buggered up my running Linux.
# mkdir /tmp/arch
# cd /tmp/arch
# gzip -dc /media/disk/kernel26.img | cpio -di
Ouch, this overrode many important binaries
I should have first piped it into
... | cpio -ti | less
or at least
... | cpio -di --no-absolute-filenames
Did I mention that I haven't made a backup
Never mind, this is a surf only installation anyway which I quickly can replace.
After having extracted the cpio image with stripped absolute paths I looked at the init script.
On RHEL/CentOS there is the mkinitrd script to recreate the initial RAM disk more easily
than from scratch.
Exists something similar under Arch?
Last edited by archIbald (2008-08-31 22:20:09)
Offline
I'm not sure if this is what you're looking for, but is "mkinitcpio" what you want?
/sbin/mkinitcpio -k 2.6.26-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26-fallback.img -S autodetect
is what gets run when you do a kernel update through pacman. You'll probably have to chroot or change the paths or something. But perhaps that'll at least get you pointed in the right direction.
Last edited by Profjim (2008-08-31 23:47:55)
Offline
Hello Profjim,
yes I think so.
mkinitcpio seems to be to Arch what mkinitrd is to RHEL.
Unfortunately, right now I cannot mount my USB stick without booting into Linux, and I mkfs-ed only ext3 Filesystems on it.
(I am condemned to work on an XP PC here )
So I cannot check, is it a shell script as well, is there a man page for mkinitcpio, or does it output a short help screen?
What is the -S option for in your sample invocation line?
Offline
MKINITCPIO(5) MKINITCPIO(5)
NAME
mkinitcpio - Create an initial ramdisk environment
SYNOPSIS
mkinitcpio [OPTIONS]
DESCRIPTION
Creates an initial ramdisk environment for booting the linux kernel.
The initial ramdisk is in essence a very small environment (early
userspace) which loads various kernel modules and sets up necessary
things before handing over control to init. This makes it possible to
have, for example, encrypted root filesystems and root filesystems on a
software RAID array. mkinitcpio allows for easy extension with custom
hooks, has autodetection at runtime, and many other features.
OPTIONS
-c config
Use config file to generate the ramdisk. Default:
/etc/mkinitcpio.conf
-k kernelversion
Use kernelversion. Default is the current running kernel.
-s filelist
Saves a list of all the files in the initial ramdisk in filelist.
Default: no; This means the filelist will not be retained if this
option isn´t specified. Useful for debugging purposes.
-b basedir
Use basedir as a starting point for gathering information about the
currently running system. Default: /.
-g filename
Generate a CPIO image as filename. Default: no; this means nothing
will be written to the filesystem unless this option is specified.
-a filelist
Append to an existing filelist. Default no.
-p preset
Build initial ramdisk according to specified preset. Presets are
found in /etc/mkinitcpio.d
-m message
Print message before passing control to kinit.
-S hooks
Skip hooks when generating the image. Several hooks should be
comma-separated.
-v
Verbose output. Outputs more information about what´s happening
during creation of the ramdisk.
-M
Display modules found via autodetection. mkinitcpio will
automatically try to determine which kernel modules are needed to
start your computer. This option lists which modules were detected.
-L
List all available hooks.
-H hookname
Output help for hookname hookname
-h
Output a short overview of available command-line switches.
ABOUT HOOKS
A hook is a script that executes in the initial ramdisk. The order and
which scripts are executed is found in the HOOKS=() array in the
mkinitcpio configuration file. A hook will, for example, set up the
udev device filesystem, load IDE modules, etc...
ABOUT PRESETS
A preset is a pre-defined definition on how to create an initial
ramdisk. Instead of specifying the configuration file and which output
file, every time you generate a new intial ramdisk, you define a preset
and use the -p switch to generate an initial ramdisk according to your
preset. Presets are located in /etc/mkinitcpio.d
FILES
/etc/mkinitcpio.conf
Default configuration file for mkinitcpio.
/etc/mkinitcpio.d
Folder containing mkinitcpio presets.
/lib/initcpio
Files related to creating an initial ramdisk.
EXAMPLES
mkinitcpio
Perform a dry-run. This will generate an initial ramdisk but will
not write anything. Use -g to create the real image.
mkinitcpio -p kernel26
Create an initial ramdisk based on the kernel26 preset.
SEE ALSO
A more thorough article on configuring mkinitcpio:
<http://wiki.archlinux.org/index.php/Con … mkinitcpio>
initrd(4)
BUGS
Upon writing this manpage, there were no noticeable bugs present.
Please visit <http://bugs.archlinux.org/> for an up to date list.
AUTHORS
mkinitcpio created by the Arch Linux Developer community.
Manpage written by:
· Glenn RedShift Matthys <glenn@opengate.be>
Manpage contributions by:
· Jens byte Adam <j_adam@web.de>
· Geir gejr Vaagland
· Joerie Thralas de Gram <j.de.gram@gmail.com>
VERSION INFORMATION
Manpage written for mkinitcpio 0.5.17
COPYRIGHT
Copyright (c) Arch Linux
03/16/2008 MKINITCPIO(5)
Offline