Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to create a live CD from my RHEL5.3 installed machine. This is for some internal testing purpose !! The following is what I am doing
1. I took syslinux and replaced initrd and vmlinuz in isolinux directory with the one in the server.
2. I created a file of ext3 file system and copied every thing under / in the server ( except dev, proc, sys, tmp )
3. Copied the file to CD
4. I need to modify initrd init script to mount the file ( file system ) to some directory and create required devices, mount proc and switch root.
5. Switch root to the newly mounted directory.
Here I am not sure how to get the handle to cdrom in initrd. Could some one help me give me some tips on how to do this in init script please.
If you have a better way to make a liveCD from an already existing system, please let me know. I don't want to dump every thing in initrd :-(.
I probably don't understand the question, because the answer seems too easy! On my machine the cdrom devices are simply /dev/hdc and /dev/hdd, as they're both IDE devices. To mount either one in the init script in the initrd, you would need the filesystem modules and then simply issue e.g.: mount /dev/hdc /MountPointInInitrd. I presume the modules needed would depend on the cdrom; iso9660, joliet, RockRidge. I *think* those are all included in the fat support and if I recall you need the nls and codepage modules also...
Thanks for the reply. I think I will have to scan the devices like hdc or hdd ( or is it going to srX in case of scsi devices ?? )
One more thing I am getting stuck is - I am not able to change the init script in the initrd. In RHEL based initrd nash is being used as the shell - which has very limited features !! So I thought of adding sh or bash ( statically linked ) in the /bin directory of initrd and change init script to run sh. But that doesn't work some how. I don't know if the kernel has any hard binding to nash or not !!!.
Rather than trying sh or bash, you'd be better off copying over busybox into the initrd-tree/bin; that will enable you to use mount, ls and everything else you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.