LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-24-2013, 05:17 PM   #1
jms89
Member
 
Registered: Jan 2013
Posts: 37

Rep: Reputation: Disabled
creating a multi-boot partion on an external HDD


Hi, I have an external HDD which I'd like to set up as both storage for my files, and also create a partition which I can use to boot from. I figure though, since I have so much disk space on it, I'd like to be ambitious and install grub, and be able to boot from multiple live-cd images on the drive.

I know there are programs out there designed to do all this automatically for you, on a USB at least, but I'd like to learn something in the process and do this manually.

Any tips where to start? I think I understand how to install grub, but I don't understand what do to do wit the .ISO images. Do each need to go in their own partion? Do they have to be uncompressed in some way, or left as a simple .ISO file? Do I need to configure grub to recognize all the OS's I might install?

Any help appreciated, thanks.
 
Old 01-25-2013, 10:56 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,758

Rep: Reputation: Disabled
It will help if multiple os are installed separately on the disk (instead of putting in live iso/images).
Install instances of Grub on both external disk and internal disk.
There would be no need to configure grub2 (usually), but "custom entries" for chain load may be useful.
 
Old 01-25-2013, 03:27 PM   #3
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,484

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
If you want to boot an iso file, you will need to use Grub2. Put the iso file in the / of a filesystem which uses the Grub2 bootloader and put an entry in the grub.cfg file for the iso. You can use the loopback method as in the example entry below which boots Linux Mint 12 from a partition with Ubuntu 11.10 installed. The changes you would need to make are the drive/partition numbers on the loopback line, the exact name of the iso file. You would also need the correct path and correct file names for the kernel and initrd entries on the linux and initrd lines. I've used this with Ubuntu derivatives and Parted Magic,don't know if it will work with others:

Code:
menuentry "Linux Mint 12" {
    loopback loop (hd0,5)/mint12.iso
    linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/mint12.iso quiet splash --
    initrd (loop)/casper/initrd.gz
}
You can loop mount then copy directories/files to the / of a system booting with Grub2 as in the entry below for Fedora which is also in the / of the Ubuntu 11.10 system above and boots as a Live CD. The files have been copied to the LiveCD directory in the / of the Ubuntu 11.10 partition. The same changes to drive/partition would need to be made as indicated above and also you would need the correct uuid for the partition, in the example below it would be for sda5:

Code:
menuentry "Fedora 16 (LiveCD - extracted)" { 

 insmod ext2  
 set root='(hd0,msdos5)'  
 search --no-floppy --fs-uuid --set=root 47891df9-aa27-4df9-99ac-aa96276780ac  
  linux /LiveCD/isolinux/vmlinuz0 rootfstype=auto  root=UUID=47891df9-aa27-4df9-99ac-aa96276780ac liveimg live_dir=/LiveCD/LiveOS/ ro quiet rhgb 
  initrd /LiveCD/isolinux/initrd0.img 
}
The entry which boots the same extracted Fedora 16 on sda5 above from Grub Legacy on another partition is below. Note the differences and similarities:

Quote:
title Fedora 16 Verne (LiveCD - extracted)
root (hd0,4)
kernel (hd0,4)/LiveCD/isolinux/vmlinuz0 rootfstype=auto root=UUID=47891df9-aa27-4df9-99ac-aa96276780ac liveimg live_dir=/LiveCD/LiveOS/ ro quiet rhgb
initrd (hd0,4)/LiveCD/isolinux/initrd0.img

You can use Grub Legacy if you extract the files and copy them to a directory, usually works best if it is in the / of the filesystem. The example for Puppy below shows the Puppy files copied to a directory named 'puppy' on sda8. You should be sure that you have the stage2_eltorito file in the /boot/grub directory of whichever partition you use, in the example below it would be sda8. The entries are going to change for different distributions and you will need to check the isolinux.cfg file on the mounted system to try to ascertain the correct entry:

Quote:
title Puppy-Lupu-511
kernel (hd0,7)/puppy/vmlinuz
initrd (hd0,7)/puppy/initrd.gz
If you have that much disk space, why not just install to the hard drive. The methods above will boot the systems as a Live CD and be read-only.

Last edited by yancek; 01-25-2013 at 04:04 PM.
 
  


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
I installed ubuntu 9.04 to my Maxtor external hdd. I have no internal hdd. I can boot dont33 Linux - Newbie 1 08-13-2009 04:13 PM
Multi HDD Multi OS Question Linux OS on seperate HDD From ALL Files? pilot258 Linux - Newbie 1 05-08-2008 05:41 AM
Creating bootable image of FC-4 on external HDD quest.science Fedora 1 01-30-2007 05:02 AM
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 09:50 PM
Bootable partion on external HDD? 40 gb firelight hdd. Trebile34 Linux - Hardware 1 03-14-2005 11:50 AM


All times are GMT -5. The time now is 11:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration