Jump to content

Backtrack 4 pre-final -Casper on root


PiousMinion

Recommended Posts

Hi, I've got my multipass almost where I want it with several OSes, tools, etc. I only have 2 items on the root of the drive, my "grldr" and a directory named "multipass" which holds everything multipass related.

All of this works fine for everything I've added to my multipass except for Backtrack4 pre-final which absolutely refuses to boot without it's "casper" directory on ths drives root.

Does anyone know a way to boot bt4-pre-final via grub legacy without "casper" residing on the root of the drive?

P.S. I mention "pre-final" specifically because I have read things that suggest this is not an issue for bt4-beta.

Link to comment
Share on other sites

Apologies for not getting that all done within the time frame i gave myself. I've just been quite busy with school, but I'll get it done. I haven't messed around with BT4 because I wasn't sure how I should write up the Ophcrack tutorial since keeping the flash drive as writable could potentially screw it up bad, as well as diminish the life of your flash drive MUCH faster the normal use. I think I'll post the Ophcrack tutorial on how to change the default directory to find the tables in without making the drive writable. Then I'll get the BT4 one done.

Link to comment
Share on other sites

Instead of using BT4 I decided I would just roll my own livecd with some tools from my favouraite distro that contains all the programs I need, which works great and for me is much better than BT4.

Problem is that it also uses squashfs.

So, I decided to crack open it's initrd to see what I could hack up. Unfortunely I couldn't figure out what to change to cause it to look elswhere for the squashfs files.

Taking a look at your work with the BT4 initrd (when you complete it) might be my only hope for getting my own to work. :/

I guess I'm basically posting to say that I'm back at square one, despite my efforts.

Link to comment
Share on other sites

  • 3 weeks later...

hi guys,

I also was having issues with BT4 Pre Release, When that tutrial comes out i am sure alot of people will be thankful, I know ill be lookingat it. Thankyou for the Ophcrack tutorial, im working with that tonight.

I plan on adding UBCD4win to min as well.

Link to comment
Share on other sites

I've run into a couple problems with Back|Track and it seems I'll have to do a bit more than I did with Ophcrack to get it to change the directory. I also want to make some other changes to it, like remove the idiotic message "remove the disk and press Enter to reboot" (or whatever it says), when you reboot, which means changing the actual squashfs, but I've found guides and I'll just incorporate them into my guide. I'm pretty flooded with homework and stuff for school, while also getting preoccupied with another project I'm trying to come up with, which I think I'll call the SAMGrabber (a very small Linux distro that will automatically and silently save the SAM and SYSTEM files of a Windows machine to your flash drive upon boot :) ), but I'll get back to the Back|Track project though and hopefully I'll be able to complete it before too long.

Link to comment
Share on other sites

  • 4 weeks later...

I didn't do this for multipass, but for multi-boot USB i was compiling on my own. This will add an extra boot parameter to casper called "casperpath" that will point to where casper is stored:

1) mount the iso:

mount -o loop image_file.iso /path/to/iso/mount

2) make a build directory and extract the initrd.gz into it

mkdir build
cd build
gunzip /path/to/iso/mount/boot/initrd.gz | cpio -i

3) edit scripts/casper

towards the beginning add the line:
    export CASPERPATH=""
  then in the parse_cmdline() method:
    parse_cmdline() {
        for x in $(cat /proc/cmdline); do
            case $x in
                casperpath=*)                        <---
                    export CASPERPATH="${x#casperpath=}"    <--- Add these three lines
                   ;;                                <---
                showmounts|show-cow)
                    export SHOWMOUNTS='Yes';;
  then find path=$1 in is_casper_path() and matches_uuid() and change to:
    path="$1/${CASPERPATH}"
  then find directory=$1 in mount_images_in_directory() and change to:
    directory="$1/${CASPERPATH}"

4) rezip initrd.gz

find . | cpio -o -H newc | gzip -9 > ../initrd.gz

5) replace the initrd.gz file on the USB

6) add casperpath=/path/to/casperdir

maybe not as nice as H@LO_FOO, but it worked for me :)

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for the tip, Strocknar. But somehow, I can't make it work.

I get "cpio: premature end of archive" when I do the "gunzip initrd.gz | cpio -i"

But still, I can edit the casper-file and repackage it like you wrote in the guide.

Could this be the reason why I'm having problems?

This should work for all "casper on root"-reliable programs, right?

This is my menu-entry:

title -=BackTrack 4 Pre-release=-

root (hd0,0)

kernel /boot/bootbt4/vmlinuz ramdisk_size=6666 casperpath=/boot/bootbt4/casper root=/dev/ram0 rw

initrd=/boot/bootbt4/initrd.gz

boot

I get the error that it can't find "/dev/ram0", and that is because casper is not on root, right?

Link to comment
Share on other sites

Jarvis: I think so. I was able to do this for Backtrack and Mint on the same USB stick. Although, I didn't extensively test the persistence.

Earbleed: when initrd.gz references casperpath, it tacks on /casper. So if your stick has /boot/bootbt4/casper on it, then the casperpath should be /boot/bootbt4. I believe you also need to have boot=casper on your kernel line

Link to comment
Share on other sites

I'm trying to do it all over again, but when I do the "gunzip /home/earbleed/Desktop/bt4-pre-final.iso /home/earbleed/Desktop/mountbt4/boot/initrd.gz | cpio -i", I get:

gzip: /home/earbleed/Desktop/mountbt4/boot/initrd: Read-only file system

cpio: Premature end of archive

I've doublechecked both the attributes(which is rw), and the md5sum of the ISO, and everything is ok.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...