LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-03-2009, 01:34 PM   #1
v1nsai
LQ Newbie
 
Registered: May 2009
Posts: 11

Rep: Reputation: 0
booting multiple partitions on usb


I've been lurking these forums since I started using Linux, but this is the first time I've had something so specific that I had to make my own post -_-

I've got an 8gb flash drive I'm trying to partition into sections so that I can boot from a few different distros and repair tools and still have room for my random files. Here's how I've got it chopped up:

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         305     2449881    b  W95 FAT32 
/dev/sdb2             306         342      297202+   6  FAT16
/dev/sdb3             343         586     1959930    5  Extended
/dev/sdb4             587         974     3116610    b  W95 FAT32
/dev/sdb5             343         465      987966    b  W95 FAT32
/dev/sdb6             466         586      971901    b  W95 FAT32
sdb1 - data partition (first so windows can see it)
sdb2 - Damn Small Linux for crappy older systems
sdb3
sdb5 - Ultimate Boot Disk (windows)
sdb6 - room for other distro
sdb4 - Ubuntu 9.04 live cd with persistance

I have installed menu.lst on sdb4 and grub is running and all that (I've learned a LOT about grub in the past 16 hours) but I can't get it to boot properly. I found a vmlinuz and initrd in the /casper directory of sdb4, but since its technically a livecd, but these do not boot properly. I have tried chainloading to sdb4, and it ALMOST worked. It booted to the livecd screen, but when I selected "Try Ubuntu without any change to your computer" I get a popup box that says only /casper.

So here's my question: how do I set up menu.lst to boot from the live cd? I appreciate any help immensely, I've been on the ubuntu forums talking to myself without a single reply :\
 
Old 05-03-2009, 06:30 PM   #2
BeaverusIV
Member
 
Registered: Oct 2004
Location: New Zealand
Distribution: Arch Linux 2010.05
Posts: 136

Rep: Reputation: 18
http://www.linuxquestions.org/questi...out-cd-592527/

http://www.linuxquestions.org/questi...y-grub-367901/

One of these should help you.

Just so you know I just searched 'grub boot from iso' in google to get these.
 
Old 05-03-2009, 06:49 PM   #3
map250r
Member
 
Registered: Aug 2007
Distribution: Debian Squeeze
Posts: 46

Rep: Reputation: 15
I was under the impression that flash disks couldn't be partitioned, because the bios doesn't expect partitions on flash (assuming it can even boot from flash)


I would not leave your non-windows partitions formatted with a windows format, because windows may store data or make changes on them. The data probably won't be valuable, but it will take up space. And if a virus gets into your windows install, it will have a much easier time deleting files or corrupting them on a windows-compatible partition, than one that isn't windows-compatible.
 
Old 05-03-2009, 06:51 PM   #4
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Check out this article-

http://aronzak.wordpress.com/2008/09...one-usb-drive/

And this post-

http://www.linuxquestions.org/questi...-stick-719054/

Also, maybe edit the "append" so it says "root=UUID=number" where number is the UUID of sdb4.

Please show your menu.lst
 
Old 05-03-2009, 07:29 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Your ticket might just be EXTLINUX

( http://syslinux.zytor.com/wiki/index.php/EXTLINUX )
 
Old 05-04-2009, 02:59 PM   #6
billairds
LQ Newbie
 
Registered: Feb 2007
Posts: 24

Rep: Reputation: 16
Cool

Quote:
Originally Posted by v1nsai View Post
I've been lurking these forums since I started using Linux, but this is the first time I've had something so specific that I had to make my own post -_-

I've got an 8gb flash drive I'm trying to partition into sections so that I can boot from a few different distros and repair tools and still have room for my random files. Here's how I've got it chopped up:

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         305     2449881    b  W95 FAT32 
/dev/sdb2             306         342      297202+   6  FAT16
/dev/sdb3             343         586     1959930    5  Extended
/dev/sdb4             587         974     3116610    b  W95 FAT32
/dev/sdb5             343         465      987966    b  W95 FAT32
/dev/sdb6             466         586      971901    b  W95 FAT32
sdb1 - data partition (first so windows can see it)
sdb2 - Damn Small Linux for crappy older systems
sdb3
sdb5 - Ultimate Boot Disk (windows)
sdb6 - room for other distro
sdb4 - Ubuntu 9.04 live cd with persistance

I have installed menu.lst on sdb4 and grub is running and all that (I've learned a LOT about grub in the past 16 hours) but I can't get it to boot properly. I found a vmlinuz and initrd in the /casper directory of sdb4, but since its technically a livecd, but these do not boot properly. I have tried chainloading to sdb4, and it ALMOST worked. It booted to the livecd screen, but when I selected "Try Ubuntu without any change to your computer" I get a popup box that says only /casper.

So here's my question: how do I set up menu.lst to boot from the live cd? I appreciate any help immensely, I've been on the ubuntu forums talking to myself without a single reply :\
the answer to partitioning a flash drive is yes. mine is partitioned 1) dos
2) ext3. I used gparted to do this. http://gparted.sourceforge.net/.

I am confused though. Is sdb the flash drive? Is your bios set to boot the flash drive? I would follow map250r's advice and get rid of the fat file format. Is sdb5 your windows primary partion and is there a boot mgr. there or win. mbr.

Grub can be installed on the flash drive to boot win, linux, etc. after grub update if your patitions are not found then you will have to edit the menu list


hope this helps

billairds
 
Old 05-05-2009, 04:14 AM   #7
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware64-15.0
Posts: 546

Rep: Reputation: 134Reputation: 134
I have a multi linux distro on a 4GB usb stick and
it has only one partition (and it's vfat formatted).
I started out with slax (http://www.slax.org/).
I moved around some of its files, edited a few
then used its makeboot.sh.
Then I added a few other distros by just placing
some files and directories in the usb stick and
editing the main menu.

Right now I have these systems
slax6.2.0
grub-2009-04.23
pmagic4.0
RIPlinux8.3
and a few others
 
Old 05-06-2009, 10:01 PM   #8
v1nsai
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for the replies, here is my menu.lst as of right now, I'm currently just working on getting slax running with grub, then adding others to it.

Code:
##default		3


timeout		5


title		Slax
root		(hd0,7)
kernel		/boot/vmlinuz
initrd 		/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw copy2ram autoexec=xconf;telinit~4 changes=/slax/
quiet
I copied the /boot/grub folder from my ubuntu host and edited menu.lst as above. After running 'root (hd1,7) and 'setup (hd1), on restart GRUB came up with 'GRUB loading stage 1.5' and repeats all the way down the screen until powered off.

SO, then I tried adding the following to the slax.cfg file so I could just use that as my bootloader

Code:
Label bt3

MENU LABEL BT3

KERNEL (hd0,5)/boot/vmlinuz

APPEND initrd=(hd0,7)/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;kdm

TEXT HELP

							Runs BackTrack with KDE

ENDTEXT



Label bt3 cp2ram

MENU LABEL BT3 copy2RAM

KERNEL (hd0,6)/boot/vmlinuz

APPEND initrd=(hd0,7)/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw copy2ram autoexec=xconf;kdm

TEXT HELP

							Runs BackTrack from RAM
These entries showed up in the menu, but when I selected them nothing happened, I pressed enter a hundred times and got nothing.

I really appreciate the responses, but I've already tried the gag and sbm bootloaders and I'm really trying to get this to work with either grub or whatever slax uses (lilo I believe?). I just can't figure out what I'm doing wrong >.<

**EDIT yea bill /dev/sdb is my flash drive. I have it set as hd0 in grub since its the first drive in BIOS, but I'm installing grub to hd1 while ubuntu is booted.

Last edited by v1nsai; 05-06-2009 at 10:03 PM.
 
Old 05-07-2009, 02:19 AM   #9
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware64-15.0
Posts: 546

Rep: Reputation: 134Reputation: 134
yes, I think slax uses lilo

the (hd0,5)/... is grub-specific
I don't think that would work in slax.cfg (it
uses syslinux)


why don't you, instead of having multiple partitions on your
usb drive, create subdirectories, when necessary, according to the
distro

I have this in my usb key:
/slax/
/grml/
/pmagic/
...

/boot/
bg.png bootinst.sh chain.c32 liloinst.sh main.cfg vesamenu.c32
/boot/syslinux/
lilo mbr.bin syslinux syslinux.cfg
/boot/slax/
initrd.gz vmlinuz
/boot/rip/
doc/ initrd.gz kernel32 kernel64 rootfs.cgz
/boot/grml/
initrd.gz linux26

/boot/main.cfg is the file I edit when I add/remove a distro
So, for instance, if I add bt3 I would
1. mkdir boot/bt3
place bt3's vmlinuz and initrd.gz in boot/bt3
2. add this in main.cfg
MENU LABEL BT3
KERNEL /boot/bt3/vmlinuz
APPEND initrd=/boot/bt3/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;kdm
...

So, if you're stuck with grub and nobody can point out
a grub solution there's always the slax solution
(at least it worked for a 4GB usb key):
1. remove all your partitions from the usb key
so now you should have only /dev/sdb1
2. install slax on it (I could send you detailed instructions on how
I did this, as I tweaked a bit the original in order to have
more than one distro)
3. add the other distros just by copying files and directories
to the appropriate location in your usb key, then edit the
main menu
I can send you a howto I installed
slax, grml, rip, pmagic (among other things) in the same
4GB usb key
 
Old 05-07-2009, 10:50 AM   #10
v1nsai
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
You know....I never thought to try that. That's a really good idea von, I'm gonna try it out!

I am still curious about what I'm doing wrong with grub, but at least I can get this running. I'll give it a shot and post results later.

If anyone could explain to me how to do this with grub I would appreciate it, with grub being the most widely used I would like to know how to use it. I've done a lot of research on it and THOUGHT I knew it pretty well, but nothing seems to work.

EDIT:
I kept slax in its original position and moved all the BT3 data into /boot/BT3. So the BT3 folder now contains the /boot folder for BT3 and the rest of the filesystem. I edited slax.cfg to read KERNEL /boot/BT3/boot/vmlinuz
APPEND initrd=/boot/BT3/boot/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw autoexec=xconf;kdm
But whenever I boot from this it loads the kernel and initrd and after a minute or so it tells me that it cannot find the BT3 data. So close....

Last edited by v1nsai; 05-07-2009 at 12:33 PM.
 
Old 05-08-2009, 05:59 AM   #11
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware64-15.0
Posts: 546

Rep: Reputation: 134Reputation: 134
this might help you
on my 4GB usb stick I have slax, grml, rip, pmagic
below are the contents of my usb stick
The first step is to place the slax distro and the 3
dos files as detailed below.
I renamed /boot/slax.cfg to /boot/main.cfg
and replaced /boot/slax.png by /boot/bg.png
Then I edited /boot/syslinux/syslinux.cfg
This is not really necessary (you can keep slax.png, slax.cfg)
to replace the reference to slax.cfg by main.cfg
You'll have to edit main.cfg (or slax.cfg) to
replace the reference to slax.png (if you replaced it)
and the new path of vmlinuz and initrd.gz
(should be now /boot/slax/vmlinuz, /boot/slax/initrd.gz)

After you've done that, with your stick key still mounted
(I'm assuming you're in linux) you go to the subdirectory
boot of your usb drive
e.g., if you mounted it in /mnt/sdb1
# cd /mnt/sdb1/boot
then, from there you run
# ./bootinst.sh

After a little while you should get a message
if everything went ok, you can proceed and add your other
distros
Don't forget to edit the main menu afterwards
(/mnt/sdb1/boot/main.cfg or /mnt/sdb1/boot/slax.cfg)

# to make sure it boots alright I copied the 3 msdos files
# from a floppy image to the usb stick
./: command.com io.sys msdos.sys

./boot/addons: allinone.img balder10.imz dban.img
hdt.c32 memdisk menu.c32 modules.pcimap
mt86p pci.ids reboot.c32

./boot/dos: this is not really necessary. It comes from slax
config linld097.com readme.txt slax.bat

# I moved the 2 files from /boot to /boot/grml (that I created)
./boot/grml: initrd.gz linux26

# same here
./boot/rip: initrd.gz kernel32 kernel64 rootfs.cgz
./boot/rip/doc: ...

# same here
./boot/slax: initrd.gz vmlinuz

# this comes from slax, I just removed the dos exe (*.com, *.exe)
./boot/syslinux: lilo mbr.bin syslinux syslinux.cfg

# I moved the first 2 files from /live to /grml
# the rest of the files in /grml were already there
./grml: filesystem.module grml.squashfs
LICENSE.txt README.txt changeofname.txt
grml-cheatcodes.txt grml-version index.html style.css
./grml/images: ...

# I think it was originally that way
./pmagic: bzImage initramfs cheatcodes.txt
./pmagic/pmodules: pmagic.sqfs scripts
./pmagic/pmodules/scripts:

./slax: I kept the original directory as is
./windows: this came from grml. I don't think it's necessary to keep

# I replaced slax.png by my own splash bg.png
# I renamed slax.cfg main.cfg
# and edited it, also edited other files that refers to slax.cfg,
# such as /boot/syslinux/syslinux.cfg
./boot: bg.png main.cfg
bootinst.sh chain.c32 liloinst.sh vesamenu.c32

good luck
 
Old 05-08-2009, 01:29 PM   #12
v1nsai
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
I ended up doing something pretty similar. I realized that it couldn't find the data because it wasn't where it was looking, so I started editing the bootinst.sh and whatnot but got tired of it, so now I've got a boot folder at root where I boot BT3 from, then I added links to the kernel and initrd for slax, and left all the slax data at root so the kernel would know where to look.

FINALLY GOT IT TO WORK.

I'll probably sit down and use grub to chainload eventually, since both distros have so many different options but for now this works. Thanks for the idea to boot from folders, I had no idea that was possible.

I have one more quick question about installing and booting from folders. With installers for big distros like Fedora and Ubuntu, in the partition menu it provides an option for a mount point. Is this how to specify installing them to a folder? I've never installed a distro without formatting the whole partition, which is why I assumed the same would be necessary with my usb drive project.
 
Old 05-09-2009, 02:36 AM   #13
vonbiber
Member
 
Registered: Apr 2009
Distribution: slackware64-15.0
Posts: 546

Rep: Reputation: 134Reputation: 134
glad to hear you got it to work
regarding your question on ubuntu or fedora
I haven't tried with these distros
but I didn't specify a mount point in my menu.
All the files and directories are on the usb drive
I'm booting from.
I'll give you some examples on some of the entries
I have in the main menu
(/boot/main.cfg,
you might have kept the original name /boot/slax.cfg)

one of slax entries
LABEL ramtextslax
MENU LABEL slax (text mode in RAM)
KERNEL /boot/slax/vmlinuz
APPEND initrd=/boot/slax/initrd.gz ramdisk_size=6666 root=/dev/ram0 rw vga=791 copy2ram

# here you see I edited the original 'KERNEL /boot/vmlinuz'
# and initrd=/boot/initrd.gz to reflect the changes I made
# in the locations

my grml entry
LABEL grml2ram
MENU LABEL grml (CLI in RAM)
KERNEL /boot/grml/linux26
APPEND apm=power-off toram=grml.squashfs keyboard=us xkeyboard=us vga=791 initrd=/boot/grml/initrd.gz boot=live live-media-path=grml nomce

# normally grml uses a /live as default location of grml.squashfs and another
# required file, but there's a boot cheat code that allows specifying
# another location. As I moved the files from /live to /grml and I deleted
# /live, I specified my new location in 'live-media-path=grml'

one of my entry for RIP
LABEL rip32
MENU LABEL rip 32 bit (CLI)
KERNEL /boot/rip/kernel32
APPEND vga=normal nokeymap initrd=/boot/rip/rootfs.cgz root=/dev/ram0 rw

#################################
It's not always possible to change the defaults
There are a few distros I hadn't been able to add this
way. But I was able to have these in the same key

slax, grml, RIP, partedmagic

On another key I have slax, bt4, ...
 
Old 05-11-2009, 08:37 PM   #14
v1nsai
LQ Newbie
 
Registered: May 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Yea thats kind of how I did it, I put all the data folders at root and all the kernel and boot files in a /kernels/distro_nameboot folder, and used GRUB pretty much the same way to boot them. The only difference with grub is that it wants the boot options to be listed on the same line as the kernel. I'm now booting slax and bt3, nice and organized. I ended up creating another partition for all my distros and using the rest for storage, I kept having to reformat because I couldn't boot after my files became "read-only filesystem". I blame windows No problems after separating my linux boot files from windows.
 
Old 05-11-2009, 08:42 PM   #15
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Well, now you can download Portable-Slackware-12.2, as it doesn't need grub/lilo,etc!
you need a big USB to run it from USB though(8GB)
( http://www.linuxquestions.org/questi...at....-725252/ )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Grub on USB with multiple partitions niteshadw Linux - General 1 01-15-2009 05:31 AM
Multiple Blade servers booting from multiple disk drives simultaneously NGC_cheryl Linux - Enterprise 0 11-26-2007 08:38 AM
Mounting USB external drive with multiple partitions, USB bluetooth mouse xmeson Slackware 7 12-17-2006 09:00 AM
[SOLVED] Making multiple partitions on USB memory stick ctkroeker Linux - Hardware 1 06-16-2005 12:20 AM
Exteral USB hard drive with multiple partitions moxx Linux - Hardware 5 05-02-2004 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:50 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