View Single Post
Old 05-13-2006   #1 (permalink)
beakmyn
root\.workspace\.garbage.
 
Join Date: Aug 2003
Posts: 4,807
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?
__________________
Daughter with arms inside shirt: "Daddy I'm not Armish"

┌──────────────────────────────┐
NS Icons Explained|et hoc genus omne
└──────────────────────────────┘

Last edited by beakmyn : 06-08-2006 at 06:28 PM.
beakmyn is offline   Reply With Quote