Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Kickstart installation - adding commands available at 'pre' time

Posted on 2004-08-10
2
Medium Priority
?
493 Views
Last Modified: 2013-12-15
I'm currently building a kickstart cd, and it's all ready to go except...the script I'm using in the 'pre' section needs to commands (bc and expr), that arn't available by default in the stage2.img file.
Everything I've read tells me to just mount the file, add the commands I need, and all will be fine.
Whilst I can mount the img file, it appears to be mounted in a read-only mode, so whenever I try and add the commands to it, I'm just getting the 'permission denied' error:

# mount -o loop stage2.img j
# touch j/test
touch: creating `j/test': Permission denied
# umount j
# mount --o loop,rw stage2.img j
# touch j/test
touch: creating `j/test': Permission denied
#

mount does show the image file being mounted read/write:
/tmp/j/stage2.img on /tmp/j/j type cramfs (rw,loop=/dev/loop0)

Anyone got any bright ideas on how to add these commands to the img file?
500 points on offer, 'coz my new servers are due to arrive in about 3 hours or so, and I want to start getting linux installed as soon as possible!
0
Comment
Question by:j_dyer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
de2Zotjes earned 2000 total points
ID: 11761369
Cramfs file systems are read only by nature.

There is a tool mkcramfs that creates a cramfs file.

What you would do is mount the original image. Copy the contents to an empty subdir elsewhere in the dir-tree. Add the stuff you want in the image and then mkcramfs <subdir> <filename>
0
 
LVL 2

Author Comment

by:j_dyer
ID: 11762998
Thanks for the fast response - worked fine.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question