Sponsored Content
Full Discussion: initrd
Operating Systems Linux initrd Post 99546 by thmnetwork on Saturday 18th of February 2006 04:59:24 PM
Old 02-18-2006
initrd

ok, I'm trying to roll an initrd from scratch for learning purposes. I'm using cramfs for the filesystem so that I can modularize ext2 and ext3. The initrd has the modules required for ext3, a static insmod, a statis 'ash', static pivot_root, and a linuxrc that mounts the needed root partition after insmod'ing the needed ext3 ko's (like jbd, etc)

the problem comes with the reboot, I try to boot and it exec's the /linuxrc script which uses ash, calling all utilites with their full pathes and pivots root from the mount point of the root partition to /

the problem is this: all my messages are reported to the user as successes, however they're obviously not, when I give init=/bin/sh (which on my root partition is a link to bash, but in initrd is what ash is called) I try to do an ls (both by itself and it's supposed path) it says it can't find it, if I try to auto-complete on the mount point for root it says access is denied, and I'm apparently still running in ash.

so, can anyone help me here?

Last edited by thmnetwork; 02-18-2006 at 06:13 PM..
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

kernel and initrd on machine with little amount of RAM

(rus cp1251) Вобщем смысл поста такой: я пытаюсь сделать Linux на дискетке и всё это опробовать на 386... =D поскольку памяти там мало, а ядро и initrd вроде как зажаты, я хотел бы узнать а) я сделал ядро (bzImage) оно 600 Кб. оно в памяти займёт 600 Кб или оно ещё разожмётся? б) аналогично с initrd. и ещё: он вроде 4МБ а можно в параметрах ядра сделать поменьше, можно-ли в 1-2МБ памяти уместить initrd и ядро? (eng) i am try to make linux on diskette and run it on i386... =D there are... (0 Replies)
Discussion started by: MR.Z
0 Replies

2. Red Hat

Fedora installation getting stuck in initrd.img

I have a 80GB hard disk with WinXP already installed.I had tried installing Fedora 10 earlier without creating new partitions(real foolish and ignorant of me :o:o ) and tried creating partitions using Fedora10 bootable.It didnt work.Then I created a free partition and again tried installing... (4 Replies)
Discussion started by: ganesh.k28
4 Replies

3. Linux

What's role of swap in initrd?

Hello, I want to know why initrd need swap for work. In the shell of mkinitrd, it look for the swap partation for "swsuspdev", then write a sentence "resume /dev/sdXX" in the file init from initrd.gz, and the /dev/sdXX is the swap partation. Why initrd need swap when it boot a system? what is... (4 Replies)
Discussion started by: ZR_Lang
4 Replies

4. UNIX for Advanced & Expert Users

Could I get the initrd.img file without recompile the kernel?

Hi, all: The vmlinuz-3.0.4.old is a kernel previous to the current running kernel vmlinuz-3.0.4 which is compiled the most currently. Could I get the initrd.img-3.0.4.old without recompile under the condition that the config-3.0.4.old, System.map-3.0.4.old and vmlinuz-3.0.4.old exist? if it... (1 Reply)
Discussion started by: liklstar
1 Replies

5. Red Hat

help about qemu-kvm boot with initrd

I used the redhat RHEL6 boot with initrd but it failed, can sb help me # /usr/libexec/qemu-kvm --enable-kvm -smp 8 -m 1024 -net nic,model=virtio -net tap,script=/etc/qemu-ifup -initrd /boot/initramfs-2.6.32-279.el6.x86_64.img -kernel /boot/vmlinuz-2.6.32-279.el6.x86_64 -append "root=/dev/ram... (4 Replies)
Discussion started by: yanglei_fage
4 Replies

6. UNIX for Advanced & Expert Users

Help with adding a new driver in initrd at install time

I have a really old distro (FC7) that I am trying to make compatible with some new hardware (ie. new RAID drivers)... I put the RAID driver into the ISO so that the installer can detect the RAID set... but post-install (aka: first boot) it appears that the Anaconda-generated initrd does not have... (0 Replies)
Discussion started by: jjinno
0 Replies
MKINITRD(8)						      System Manager's Manual						       MKINITRD(8)

NAME
mkinitrd - creates initial ramdisk images for preloading modules SYNOPSIS
mkinitrd [--version] [-v] [-f] [--preload=module] [--omit-scsi-modules] [--omit-raid-modules] [--omit-lvm-modules] [--with=module] [--image-version] [--fstab=fstab] [--nocompress] [--builtin=module] [--nopivot] image kernel-version DESCRIPTION
mkinitrd creates filesystem images which are suitable for use as Linux initial ramdisk (initrd) images. Such images are often used for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. mkinitrd automatically loads filesystem modules (such as ext3 and jbd), IDE modules, all scsi_hostadapter entries in /etc/modules.conf, and raid modules if the system's root partition is on raid, which makes it simple to build and use kernels using modular device drivers. Any module options specified in /etc/modules.conf are passed to the modules as they are loaded by the initial ramdisk. If the root device is on a loop device (such as /dev/loop0), mkinitrd will build an initrd which sets up the loopback file properly. To do this, the fstab must contain a comment of the form: # LOOP0: /dev/hda1 vfat /linux/rootfs LOOP0 must be the name of the loop device which needs to be configured, in all capital lettes. The parameters after the colon are the device which contains the filesystem with the loopback image on it, the filesystem which is on the device, and the full path to the loop- back image. If the filesystem is modular, initrd will automatically add the filesystem's modules to the initrd image. The root filesystem used by the kernel is specified in the boot configuration file, as always. The traditional root=/dev/hda1 style device specification is allowed. If a label is used, as in root=LABEL=rootPart the initrd will search all available devices for an ext2 or ext3 filesystem with the appropriate label, and mount that device as the root filesystem. OPTIONS
--builtin=module Act as if module is built into the kernel being used. mkinitrd will not look for this module, and will not emit an error if it does not exist. This option may be used multiple times. -f Allows mkinitrd to overwrite an existing image file. --fstab=fstab Use fstab to automatically determine what type of filesystem the root device is on. Normally, /etc/fstab is used. --image-version The kernel version number is appended to the initrd image path before the image is created. --nocompress Normally the created initrd image is compressed with gzip. If this option is specified, the compression is skipped. --nopivot Do not use the pivot_root system call as part of the initrd. This lets mkinitrd build proper images for Linux 2.2 kernels at the expense of some features. In particular, some filesystems (such as ext3) will not work properly and filesystem options will not be used to mount root. This option is not recommended, and will be removed in future versions. --omit-lvm-modules Do not load any lvm modules, even if /etc/fstab expects them. --omit-raid-modules Do not load any raid modules, even if /etc/fstab and /etc/raidtab expect them. --omit-scsi-modules Do not load any scsi modules, including 'scsi_mod' and 'sd_mod' modules, even if they are present. --preload=module Load the module module in the initial ramdisk image. The module gets loaded before any SCSI modules which are specified in /etc/mod- ules.conf. This option may be used as many times as necessary. -v Prints out verbose information while creating the image (normally the mkinitrd runs silently). --version Prints the version of mkinitrd that's being used and then exits. --with=module Load the modules module in the initial ramdisk image. The module gets loaded after any SCSI modules which are specified in /etc/mod- ules.conf. This option may be used as many times as necessary. FILES
/dev/loop* A block loopback device is used to create the image, which makes this script useless on systems without block loopback support available. /etc/modules.conf Specified SCSI modules to be loaded and module options to be used. SEE ALSO
fstab(5), insmod(1), kerneld(8), lilo(8) AUTHOR
Erik Troan <ewt@redhat.com> 4th Berkeley Distribution Sat Mar 27 1999 MKINITRD(8)
All times are GMT -4. The time now is 05:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy