While I've not used it, you may want to google 'grub4dos'.
Hello dear bt community
I have a dream and wanted to know if it was possible to create a USB with bt4r1 and jolicloud both installed on it with persistence. If this is possible can someone please point me in the right direction because I have been searching all over and can't seem to find an effective way of doing this.
Would it be possible to create two partitions (each one for an OS with persistence) and having grub connect both partitions together (or any other gui)?
I found many sites showing how to create a single persistent OS on a USB but not two.
Any help would be appreciated.
Thanks in advance
Last edited by dampbuffalo; 08-20-2010 at 08:18 AM.
While I've not used it, you may want to google 'grub4dos'.
It depends on your definition of 'persistence'. Sometimes persistence means using the casper RW filesystem (link) to save the changes of a live CD or an ISO installed to a usb drive via unetbootin. Persistence can also mean installing Linux to a usb drive just like it was a normal hard drive.
What I would do is the second option since it is a lot simpler. I would get a large thumbdrive (at least 16GB) and do the following:
SDA (16GB)
SDA1 (/ for Jolicloud) EXT3 7GB
SDA2 (/ for Backtrack) EXT3 7GB
SDA3 (SWAP Space for both) Whatever space is left over, should be at least a GB.
When you are installing one, create a blank, unformatted partition for the other and install the second OS after the first one is finished.
Last edited by Agarax; 08-19-2010 at 06:52 PM.
"If you haven’t trashed your computer while doing something questionable, then you’re not a computer scientist – you’re just an arts grad who didn’t get laid."
If the time stamp for my post is less than 15 minutes old, hold off on the flamethrower, there's a pretty decent chance I'm going to change it.
Thanks! Thats what I had in mind.
Would you have any idea how my menu.lst file would look like if I did share the swap and have both OS available from the gui? Would it be something like this?
Would that be persistent? What would the bt4r1 lines look like?title Jolicloud robby (PreFinal Release), kernel 2.6.32.9-1-jolicloud
root ()/jolicloud/disks
kernel /boot/vmlinuz-2.6.32.9-1-jolicloud root=UUID=EE6AE8636AE82A53 loop=/jolicloud/disks/root.disk ro quiet splash mem=2000mb
initrd /boot/initrd.img-2.6.32.9-1-jolicloud
title Jolicloud robby (PreFinal Release), kernel 2.6.32.9-1-jolicloud (recovery mode)
root ()/jolicloud/disks
kernel /boot/vmlinuz-2.6.32.9-1-jolicloud root=UUID=EE6AE8636AE82A53 loop=/jolicloud/disks/root.disk ro single mem=2000mb
initrd /boot/initrd.img-2.6.32.9-1-jolicloud
can I use this to point grub to a different partition?
So now I have this as my backtrack 4r1 partition (SDA1) menu.lst:title Other Grub Menu List
root (hd0,1)
makeactive
chainloader +1
And for my other partition for Jolicloud (SDA2) menu.lst looks like this:# By default, boot the first entry.
default 6
# Boot automatically after 30 secs.
timeout 30
splashimage=/boot/grub/bt4.xpm.gz
foreground e3e3e3
background 303030
title Other Grub Menu List
root (hd0,1)
makeactive
chainloader +1
title Start BackTrack FrameBuffer (1024x768)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd /boot/initrd.gz
title Start BackTrack FrameBuffer (800x600)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x314
initrd /boot/initrd800.gz
title Start BackTrack Forensics (no swap)
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw vga=0x317
initrd /boot/initrdfr.gz
title Start BackTrack in Safe Graphical Mode
kernel /boot/vmlinuz BOOT=casper boot=casper xforcevesa rw quiet
initrd /boot/initrd.gz
title Start Persistent Live CD
kernel /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet
initrd /boot/initrd.gz
title Start BackTrack in Text Mode
kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent textonly rw quiet
initrd /boot/initrd.gz
title Start BackTrack Graphical Mode from RAM
kernel /boot/vmlinuz BOOT=casper boot=casper toram nopersistent rw quiet
initrd /boot/initrd.gz
title Memory Test
kernel /boot/memtest86+.bin
title Boot the First Hard Disk
root (hd0)
chainloader +1
It doesn't work thoughtitle Jolicloud robby (PreFinal Release), kernel 2.6.32.9-1-jolicloud
root ()/jolicloud/disks
kernel /boot/vmlinuz-2.6.32.9-1-jolicloud root=UUID=EE6AE8636AE82A53 loop=/jolicloud/disks/root.disk ro quiet splash mem=2000mb
initrd /boot/initrd.img-2.6.32.9-1-jolicloud
title Jolicloud robby (PreFinal Release), kernel 2.6.32.9-1-jolicloud (recovery mode)
root ()/jolicloud/disks
kernel /boot/vmlinuz-2.6.32.9-1-jolicloud root=UUID=EE6AE8636AE82A53 loop=/jolicloud/disks/root.disk ro single mem=2000mb
initrd /boot/initrd.img-2.6.32.9-1-jolicloud![]()
Last edited by dampbuffalo; 08-20-2010 at 10:27 AM.
A word of caution: -Here be dragons-
You're on the right track by using grub. You'll need to rip apart the initrd's for each live distribution you'd like on your pen-drive and learn what their startup scripts actually mean. For instance, the backtrack casper stuff actually comes from ubuntu; if you understand it well enough, you can actually have multiple different BackTrack versions each with their own persistence (look at the way the BOOT= flag is interpreted). The kernel actually just ignores command line arguments that it doesn't understand, which means you can find what the different scripts are doing just by grep'ing the expanded initrd scripts for /proc/cmdline.
I've got a USB stick somewhere which has Ubuntu 9.10, BT4PF, Pentoo, and DSL. The first 3 support persistence, but it requires mucking a bit with the boot options and understanding their init process (for instance, Ubuntu based systems support overriding the BOOT= and root options to specify any number of different partitions for persistence; Pentoo uses filesystem files as breadcrumbs). It's just a bit of extra effort and a lot more parsing.
So it's more complicating then I thought.
Would you help me out to make this possible? I would really appreciate it. If we can make this work I'm sure it would help out a lot of people who want to accomplish the same thing on their flash drive. There are no tutorials out there that show how to do it so we can make this thread the first one out there.
I will do my homework and try to understand a little more about the whole boot process and what not. Will try to keep this thread alive.![]()
Ok, here's my grub.conf and my layout for a USB without persistence. I don't have the one with persistence turned on at work. YMMV, but this should get you a non-persistent USB with pentoo and BT4.
1st: I have the following in the root of that USB:
- livecd
- md5sum.txt
- boot.catalog
- directory casper
- contains the filesystem stuff from BT4
- directory modules
- contains the portage file from pentoo
- directory pentoo
- contains the squashfs image from pentoo
- directory boot
- contains pentoo.igz (the initrd for pentoo)
- contains all the initrd's for BT4
- contains the kernel image for BT4 (named vmlinuz)
- contains the kernel image for pentoo (named pentoo)
- contains the directory grub
- contains all the grub1 boot files and configuration
2nd:
The following is my grub.conf (note: menu.lst isn't symlinked here, but instead I removed menu.lst and copied grub.conf to it; I don't remember why)
Ripping apart BT4's initrd, I find that the following parameters have meaning:Code:# By default, boot the first entry. default 0 # Boot automatically after 30 secs. timeout 30 splashimage=/boot/grub/splash.xpm #foreground e3e3e3 #background 303030 title Start BackTrack FrameBuffer (1024x768) kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317 initrd /boot/initrd.gz title Start BackTrack Forensics (no swap) kernel /boot/vmlinuz BOOT=casper boot=casper nopersistent rw vga=0x317 initrd /boot/initrdfr.gz title Start Pentoo kernel /boot/pentoo root=/dev/ram0 init=/linuxrc aufs max_loop=256 dokeymap looptype=squashfs loop=/pentoo/image.squashfs cdroot video=uvesafb:mtrr:3,ywrap,1024x768-16 usbcore.autosuspend=1 console=tty0 initrd /boot/pentoo.igz title Start BackTrack Graphical Mode from RAM kernel /boot/vmlinuz BOOT=casper boot=casper toram nopersistent rw quiet initrd /boot/initrd.gz title Memory Test kernel /boot/memtest86+.bin title Boot the First Hard Disk root (hd0) chainloader +1
boot=casper selects the /scripts/casper script in the initrd.
persistent / nopersistent are part of the parse_cmdline() in that script and set persistence mode.
root_persistence is a variable in there which isn't changeable (that I can see) and points to casper-rw
root_snapshot_label is a variable for copying in snapshots from a partition to the system. it's set to look for casper-sn
It doesn't seem that these are settable by default, which leads me to believe that I made a modification to my persistent versions to support pointing to alternate partition labels (remember, I'm doing this rather ad-hoc). I don't know how Jolicloud determines it's persistence, but I'll bet that you can find out by extracting the initrd and grepping it for cmdline, and reading the scripts.