How to modify or customize the installation initrd

This document (3909888) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
SUSE Linux Enterprise Server 8
SUSE Linux Enterprise Desktop 10

Situation

There are times where you may need to modify the initrd used during operating system installation, such as when you have to include AutoYaST info files.

Resolution

SUSE Linux Enterprise Server 8 and 9
In these operating system versions, the initrd is a compressed loopback filesystem.

To open it for modification:

# mv initrd initrd.orig
# gzip -dc initrd.orig>initrd.img
# mount -o loop initrd.img /mnt

You can now access the files under /mnt.

To close it so it can be used, simply reverse the process:

# umount /mnt
# gzip initrd
# mv initrd.gz initrd

The file initrd can now be placed on the installation media.

SUSE Enterprise Linux Desktop and Server 10
In these operating system versions, the initrd is a compressed cpio archive.

To unpack for modification:

# cp initrd /tmp
# cd /tmp
# mv initrd initrd.orig
# gzip -dc initrd.orig>initrd.img
# mkdir initrd-work
# cd initrd-work
# cpio -i < /tmp/initrd.img

The directory /tmp/initrd-work will now contain the initrd files and directories. You
can make your modifications here. When you're done making your modifications, you can
repack the initrd by:

# cd /tmp/initrd-work
# find . | cpio -H newc -o> /tmp/newinitrd.img
# cd /tmp
# gzip -c newinitrd.img> /tmp/initrd

The file initrd can now be copied to the installation media.

Additional Information

As of SUSE Linux Enterprise Server 10 Service Pack 1, and SUSE Linux Enterprise Desktop 10 Service Pack 1 it is no longer required to have the AutoYaST info files in the root of the initrd. You can put them on the installation media and specify their location with the info=boot option.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:3909888
  • Creation Date: 05-Jun-2007
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center