![]() |
|
|||||||
| Register | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
root\.workspace\.garbage.
Join Date: Aug 2003
Posts: 4,767
|
Remote-exploit is down so in your infinite Linux wisdom help me with initrd
I know some of you use Slackware so maybe you get elighten me. I'm trying to install Backtrack onto an external USB Hard drive as a full operating system so I can just plug it into my work laptop and boot (and have plenty of space to save files). So, I run the install and everything seems to go well until I try to boot.
It starts to boot but I get a kernel panic, I do a few hours of Google searching and find out that the USB modules are not being loaded at boot so Slax can't properly mount my root. Ok, seems to make sense. Now, I do some more googling and and find that I have hack a copy of the initrd.gz on the CD, mount it as a loopback file system and modify the linuxrc. For the unintiated or those not paying close enough attention here is what I did, don't worry we're getting to my question.. Boot into my Damn Small Linux /dev/hda2 For some reason if you try to mount the loop filesystem from a Backtrack LiveCD it locks up the system completely! Insert the Backtrack CD # cd /mnt # gunzip -c /mnt/CDROM/boot/boot/initrd.gz !yes there's two /boots you got two feet don't you? That's a little Linux humor there, stay on task and maybe we'll go out for Ice cream ![]() # mkdir initrdmnt # mount -o loop initrd initmnt # cp -a initmnt initimage # umount initrd So at this point I have a copy of all the files that were in the the initrd.gz file now located at /mnt/initimage So I go and change the linuxrc and from a post on the Backtrack forum and I get to this step: repack the initrd mounted image As simple as that sounds, what is the correct way to do this? I thougt .gz could only contain one file? All the googling I do points to using scripts to do this but I can't locate this scripts and will they work in a debian environment on a Slax initrd, Hell if I really fuxor it up I should use XP in a VMware Linux install that's sure to piss of a few folks. Anyway. what's the easiest way to get initimage back to initrd.gz so I can then: # cp initrd.gz /mnt/sda1/boot/ # cd /mnt/sda1 # chroot . # nano lilo.conf add initrd=/boot/initrd.gz ! I've also seen initrd=/boot/initrd.img ?? # lilo !no that's not the guy who lived in Wyatt's closet ![]() Anybody?
__________________
It's not Intelligent Design, it's peer pressure. ┌──────────────────────────────┐ ╞ NS Icons Explained|et hoc genus omne ╡ └──────────────────────────────┘ Last edited by beakmyn : 06-08-2006 at 05:28 PM. |
|
|
|
|
|
#2 (permalink) |
|
Psychic Amish Stumbler
Join Date: Jul 2004
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
Posts: 11,708
|
Remote-exploit is werkin' fer me.
__________________
"One of these days, I'm going to cut you to pieces." If you're offended by this post, please feel free to report it to one of the many helpful moderators of this forum. Thank you. |
|
|
|
|
|
#3 (permalink) | |
|
root\.workspace\.garbage.
Join Date: Aug 2003
Posts: 4,767
|
Quote:
__________________
It's not Intelligent Design, it's peer pressure. ┌──────────────────────────────┐ ╞ NS Icons Explained|et hoc genus omne ╡ └──────────────────────────────┘ |
|
|
|
|
|
|
#4 (permalink) |
|
Church of WiFi
Join Date: Jun 2002
Location: not behind you, or am I?
Posts: 290
|
I think you might be making it a little too difficult on yourself
![]() * make backup copy if desired * gunzip it * mount it * modify files in the mounted loop * unmount * gzip -9 < initrd > newinitrd ... that way you gzip the actual unmounted image and not a copied directory structure from the image. Something else that may be helpful depending on how you want to approach things, man mkinitrd... I think that's probably the script folks are referring to for rebuilding the image from your copied directory structure.
__________________
He shall recount his worthies: they shall stumble in their walk; they shall make haste to the wall thereof, and the defence shall be prepared. -- Nahum 2:5, The Holy Bible, KJV |
|
|
|
|
|
#5 (permalink) | |
|
root\.workspace\.garbage.
Join Date: Aug 2003
Posts: 4,767
|
Quote:
__________________
It's not Intelligent Design, it's peer pressure. ┌──────────────────────────────┐ ╞ NS Icons Explained|et hoc genus omne ╡ └──────────────────────────────┘ |
|
|
|
|
|
|
#6 (permalink) |
|
root\.workspace\.garbage.
Join Date: Aug 2003
Posts: 4,767
|
So close yet so far. I've got a new initrd.gz file ready to go, however now I've got to figure out why my chroot system thinks /dev/sda is a raid_setup which it isn't I'm gonna try a few other things first.
__________________
It's not Intelligent Design, it's peer pressure. ┌──────────────────────────────┐ ╞ NS Icons Explained|et hoc genus omne ╡ └──────────────────────────────┘ |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|