Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to use an external hard drive to start a live Ubuntu session?

Is having an ISO file as the whole content of the first partition of the device enough?

Thank you for reading...!

EDIT upon reading the first comment to my original question: If I remember correctly, I COULD run a live session of Oneiric Ocelot somehow. It was not from a CD because I failed to burn one, so it must have been from an ISO file. Still very very confused....

share|improve this question
    
No. Simply extracting an ISO onto a drive is not enough. You could look at unetbootin or installing grub2 on the external drive and chainloading ISOs. No details so it's a comment not an answer. –  hbdgaf Feb 7 '12 at 10:57

3 Answers 3

up vote 0 down vote accepted

You must use a tool called uNetbootin Download From Here

just point the file to ISO and your portable Drive

Also for a faster performance provide atleast 512 MB of persistence space You can also Checkout the website PenDriveLinux.com for more info.

share|improve this answer

You just need to put your ISO on your external drive, then install Grub2 and configure it properly.

Let's assume your drive is /dev/sdb mounted under /media/Drive, then in a root terminal (use sudo -i to become root), type in :

grub-install --no-floppy --root-directory=/media/Drive /dev/sdb

You'll obtain a boot folder at the root of your external drive. Go to /media/drive/boot/grub and put there a grub.cfg file, containing something like (please adapt paths and ISO names to your needs - in the example below, ISOs are juste put at the root of the partition) :

set timeout=10
set default=0

menuentry "System Rescue CD 64 bits" {
 loopback loop /systemRescueCD.iso
 linux (loop)/isolinux/rescue64 isoloop=/systemRescueCD.iso setkmap=fr docache
 initrd (loop)/isolinux/initram.igz
}

menuentry "System Rescue CD 32 bits" {
 loopback loop /systemRescueCD.iso
 linux (loop)/isolinux/rescuecd isoloop=/systemRescueCD.iso setkmap=fr docache
 initrd (loop)/isolinux/initram.igz
}

menuentry "Ubuntu 11.10 64 bits ISO" {
 loopback loop /ubuntu64-11.10.iso
 linux (loop)/casper/vmlinuz boot=casper locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=/ubuntu64-11.10.iso file=/cdrom/preseed/ubuntu.seed noeject noprompt quiet splash --
 initrd (loop)/casper/initrd.lz
}

menuentry "Ubuntu 11.10 64 bits alternate ISO" {
 loopback loop /ubuntu64-11.10-alternate.iso
 linux (loop)/casper/vmlinuz boot=casper locale=fr_FR bootkbd=fr console-setup/layoutcode=fr iso-scan/filename=/ubuntu64-11.10-alternate.iso noeject --
 initrd (loop)/casper/initrd.lz
}

As you can see, you can put others ISOs. Please note that all ISOs are not compatible ! For example you need to extract the content of a Fedora 16 ISO and use a slightly different configuration for Grub2 : menuentry "Fedora 16 64 bits Gnome" { set root=(hd0,msdos1) linux /fedora16-64/efi/boot/vmlinuz0 root=LABEL=InstalLinux live_dir=/fedora16-64/LiveOS/ rootfstype=auto ro liveimg rhgb locale=fr_FR bootkbd=fr initrd /fedora16-64/efi/boot/initrd0.img }

Also, note that your external drive must have a proper filesystem (avoid NTFS !) and that it's sometimes completely impossible to use some USB keys this way (don't know why... they just doesn't boot, event with boot flag set !)

Lastly, a suggestion : make two partitions on your external drive. One (typically FAT32 or ext?) where you will put your ISOs, and another where you wille be able to store data persistently.

Hoping this helps...

PS : Grub could complain at the first stage. You could use --force option, or reformat you external drive (making the first partition starting at 1 MB).

Also if you are using a system like DSL (DamnSmallLINUX) then it wont see ext4 partition extensions need to format external drive using ext3 for persistence.

share|improve this answer

Thanks, that is exactly what I need:

grub.cfg:

set timeout=10
set default=0

menuentry "linuxmint-17-mate-32bit-v2.iso" {
        insmod part_msdos
        insmod ext2

        iso_path="/boot/iso/linuxmint-17-mate-32bit-v2.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/iso/linuxmint-17-mate-32bit-v2.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}

Package grml-rescueboot helps to create such entries. Image is in /boot/iso/ on external hard drive. It's better to move it grml directory, it's less confusing :). Perfect for system updating.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.