0

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....

1
  • 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. Feb 7, 2012 at 10:57

2 Answers 2

3

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.

1

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.

1
  • is in necessary to dual partition the hdd with a persistent usb, or if one desires only a single partition, just select as much space as possible for persistent installs? Thanks!
    – Rachael
    Aug 20, 2015 at 4:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .