LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-18-2009, 12:31 PM   #1
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Rep: Reputation: 0
Exclamation How do I pack stage2.img into initrd.img for a PXE linux rescue?


My goal is to repack stage2.img into initrd.img and have it detected without it asking for a seperate location during pxe boot. I want this so I can run "linux rescue" without FTP, HTTP, NFS.
I know that initrd.img checks the cdrom for stage2 inside /images/

This would make a great linux password reset tool for admins to add to PXE menus hosted from a windows server.

Can anyone help me figure out the loader process and howto change the detected location of stage2.img inside initrd in pxe ram?


Please Help
 
Old 09-21-2009, 05:57 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

why not get rid of windows server software ...for a start?

2) I can not tell from your post count...but have you ever re-mastered a linux cd of any kind before?

3) also how about a link to the distro you are referring to for the cd image?
 
Old 09-21-2009, 08:53 AM   #3
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Question Info update

More info:

1) Windows2003r2 using 3com TFTP (sorry just the way it is)
3com tftp--> pxelinux --> initrd.img (using menu of course)

2) I have made a similiar disk with KNOPPIX for Damn Small Linux using a great tutorial I found.
http://www.damnsmalllinux.org/f/topic-3-26-15960-0.html

3) rhel-server-5.4-i386-dvd.iso (redhat.com via account only)
files I am trying to use:
/images/pxeboot/initrd.img
/images/pxeboot/vmlinuz
/images/stage2.img

The tutorial for DSL leads me to think something similiar for Red Hat is possible, I just need some real help. Or if someone has a turorial that would be awesome. I don't want to use a kickstart via fixed IP, or NFS/HTTP/FTP. (I already can do that) I just need this for a pxe "linux rescue" via only TFTP (aka 1 bigger initrd.img)
 
Old 09-23-2009, 08:46 AM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
don't know but see if you like this link?

http://grml.org/terminalserver/
 
Old 09-23-2009, 11:59 AM   #5
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
I will check out the link you sent

Thanks for the link.. I will try it out right now.
 
Old 09-23-2009, 02:34 PM   #6
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
grml not quite what i need

any other ideas how to easily achieve a "linux rescue" via pxe
 
Old 09-23-2009, 07:54 PM   #7
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
http://smorgasbork.com/linux/35-linu...rt-disc-part-1
 
Old 10-05-2009, 07:36 PM   #8
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Still unsolved

This would be a great problem for a linux guru to help me solve. None of the links so far relate to packing stage1 and initrd together. I appreciate the input so for, but I still need help solving this problem.
 
Old 10-05-2009, 09:10 PM   #9
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
http://www.linux-archive.org/centos/...er-initrd.html

gunzip -c --suffix '.img' /boot/initrd-<version>.img | cpio -i
>
> to unpack the file, and
>
> find . -print | cpio -c -o | gzip -c9 >/path/of/new/initrd

may help you unpack and repack an initrd

edit

I have re-looked at your post. I think you already know howto unpack? if you know there is some folder called /images
or is it that pxe calls a script that looks at a folder outside the intrd called /images?

Last edited by aus9; 10-05-2009 at 09:33 PM.
 
Old 10-06-2009, 05:53 PM   #10
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
I know how to unpack

I have unpacked the initrd.img and found it contains "loader" and "init" inside the /etc folder. Inside these compiled files is the location lookup for stage2.img I cannot decompile the 2 files. Simply creating a /images folder inside the initrd.img subsystem did not work. Any clues?
 
Old 10-07-2009, 07:38 AM   #11
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I can offer no guarantee but a link to actual distro you are using might help others see what you mean.

leaping ahead..if no one helps....

2) alternative ??
http://www.tux.org/pub/people/kent-r...looplinux/rip/ he has a PXE distro
and docs on how to remaster
 
Old 10-14-2009, 03:31 PM   #12
real1elmo
LQ Newbie
 
Registered: Sep 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Thumbs down Obviously I need a Red Hat person

For the last time AUS9... I am not giving you a link to the distro. Stop asking. It is Red Hat Enterprise Linux 5.3 (or any RHEL 4+)
I do not want any advise pointing me to any other "distro." All info is in my previous posts. Aus9 please do not "help" me anymore I do not want wild goose chases just 1 RHEL solution from someone else.
 
Old 10-14-2009, 06:29 PM   #13
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
consider reporting your first post to a moderator.

you have my permission to get entire post deleted...so you start a fresh post and will appear in zero replies....and I can assure you I will not reply...is the best I can do

but the moderator is the only one who can kill this post and all thread all delete all replies ok

cheerio
 
  


Reply

Tags
initrd



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add new cciss driver module to initrd.img ,stage2.img kunalroy2002 Linux - Software 4 09-25-2007 12:09 AM
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img Scotteh Linux - Software 8 06-01-2007 11:24 PM
What is stage2.img AlanL Fedora 1 04-01-2007 08:32 AM
Is it possible to update the pxe network install initrd.img and vmlinuz ? lets-eat-gary Fedora 1 08-22-2006 04:54 AM
How to update the pxe network install initrd.img and vmlinuz ? lets-eat-gary Linux - Networking 3 08-20-2006 03:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 11:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration