Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General > Member Success Stories
User Name
Password Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.


  Search this Thread
Old 12-31-2010, 12:34 AM   #1
LQ Newbie
Registered: Dec 2010
Location: México
Distribution: Debian
Posts: 28

Rep: Reputation: 3
Lightbulb Success: Multiple live distros in a single external HDD with GRUB2

So, here I am, with my brand new external USB HDD and wonderign what can I do with it. Of curse!! an "all terrain" rescue hard drive with all the live distros I need!!


This is a HOWTO create a rescue HDD containing multiple (or single... but that's not so funny) live distros with the extra feature of implementing GRUB2.

Warning! GRUB 2 is still beta software. Although it already ships with Ubuntu flavors, it is not yet production quality per se. You can probably use it without any troubles, although there is a slight, remote yet possible chance of damage.
Basic Assumptions:
- You have a formatted and sized partition on your HDD
- Your host system has GRUB2 (1)

Part I - Preparing the files

Here I assume you are on your HDD-mounting-point folder

1.- create a file for the boot folder in your HDD (one for each OS)

# mkdir os-boot
2.- extract the iso

- mount
  # mount -t iso9660 -o ro,loop <iso path> <mounting point>
- copy
  # cp -r <mounting point>/* <your HDD>/os-boot
- umount
  # umount <mounting point>
3.- move the system (all non boot) folder(s) to the parent folder
# mv so-boot/sysFolder .
*repeat for each folder EXCEPT boot, isolinux or any other equivalent.

Part II - Installing and configuring GRUB2

For this part I assume you are at /etc/grub.d/

4.- install grub in the HDD

# grub-install --root-directory=<mounting point of sdx1> sdx
- this will create a boot/ folder on your HDD

5.- create a xx_os script for each OS IN THE HOST SYSTEM

# nano /etc/grub.d/xx_os
with a content like
#! /bin/sh -e
echo "Adding <OS Name>"
cat << EOF
menuentry "<OS Name or something>"{
set root(hd0,1)
linux <kernel path>
initrd <initrd path>
* the kernel and initrd paths are relative to the root HDD
* take this data from the menu.lst/isolinux.cfg or equivalent from the boot/ folder of each OS
* REMEMBER to ADD /os-boot/ at the start of each line. This is to give GRUB the right path. More details in step 4 of the first source (below)

6.- generate the grub.cfg

-first, set permissions for 10_linux script to 644 in order to avoid the inclusion of the host system
   # chmod 644 10_linux
# grub-mkconfig -o <HDD mounting point>/boot/grub/grub.cfg

remember to restore the permissions to 755 for 10_linux script.

I also recomend to delete, change location or change permissions (to 644) for every new script you made for this.

sources: (Steps 1, 2, and a little bit of 4)

(1) This was indeed the root of all my problems. I have GRUB2, and all the howto's I found implemented GRUB Legacy.

Last edited by d3249; 12-31-2010 at 12:38 AM. Reason: Misspellings


externalharddrive, grub2, multibooting, rescue

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
Multiple Distros, Single /boot partition grndrush Member Success Stories 5 03-09-2011 05:54 AM
having multiple distros on a single flash stick Predatorian Linux - General 13 04-22-2009 07:42 AM
Multiple bootable (live) distros on one portable hdd? GustavTheMushroom Linux - Software 8 09-03-2007 10:06 AM
Burning Multiple Distros On A Single DVD...!! crash_override_me Linux - General 2 09-03-2006 02:17 PM
multiple OS on single HDD darkangel Linux - General 7 08-31-2002 01:35 PM > Forums > Linux Forums > Linux - General > Member Success Stories

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration