If you found this post inspiring, interesting or helpful show your appreciation by sending me a donation.

Related Post

45 Comments Received

Ouiche
April 29th, 2008 @10:31 am  

wouhouuu !!!
You saved my life !! ;)
Great page, I’ve tried since yesterday evening to get this version work on my USB hard drive, but I was only able to boot in a live non-persistent mode…
I tweak the initrd.gz as you mentionned (by removing the “mode=775″ part, which was “mode=755″ in mine…) Anyway it worked and I’m so pleased now !
Thanks thanks thanks !!!

Now I’ve just one last thing to get rid of the language selection at the boot (I want it in french by default, I’ve added the string “locale=fr_FR bootkbd=fr console-setup/layoutcode=fr” after the “GFXBOOT bootlogo” and the first “APPEND ” in the /syslinux.cfg file, but it did’nt helped. If anyone knows??
Please excuse my poor english…

richard
April 30th, 2008 @6:33 am  

Very nice. Easy to follow and it works.

Only issue is that it’s booting to a prompt (all you have to do is hit enter) rather than the syslinux.cfg menu. I’m not getting the language selection menu either, which is good.

luismmontielg
May 1st, 2008 @2:42 am  

hey, im sorry but i dont understand the step where you ask to Copy and paste the following into you syslinux.cfg file:

code-code–code

do i have to DELETE the previous text in the file, or just ADD it
at the end???

—-
You need to replace the content of the file with the code shown.

0rigamare
May 1st, 2008 @10:15 am  

Do you think I would be able to do this with the mac ppc verion of the hardy heron iso?

And then boot from the usb drive onto an oldworld powerbook g3 wallstreet?

(many sincere thanks in advance for your help)


I am not sure. I don’t see any reason why not. But I am also not too familiar with Macs.

luismmontielg
May 1st, 2008 @11:21 am  

thanks for the help dude, now I have another problem, can i do this same steps in a mp4 player? it also works as a usb stick, but it has 4gb, I’ve tried, but it just wont boot, i think its because of the firmware :s any ideas ?


Sorry man, no ideas. Probably a firmware issue.

May 3rd, 2008 @1:57 pm  

Thanks…this works like a charm..

zhennTil
May 6th, 2008 @12:02 pm  

Great guide - thanks… but I have a problem… I have followed the guide pretty exactly, but I have been unable to actually make it work. Every computer I have tried fails to boot from my USB drive. One of the computers I have tested it with says something like “No operating system found on pendrive. Remove pendrive and reboot.” All others never even recognize its presence, even though I am quite sure they support booting from USB. They are all x86 and all, so I can’t see what I’ve done wrong. Thanks in advance for any help you can give me!


Try “lilo -M /dev/sdx”. That will write a new boot record the that device. Also, make sure you format and copied to the correct device.

dprentice
May 7th, 2008 @1:42 pm  

Excellent! Thank you!

Can I put grub on the stick and have both the i386 and amd64 liveCD images bootable from the same stick?


I do not see why not. If I ever make a USB or bootable disc like that, I will be sure to post a how-to.

restamp
May 12th, 2008 @9:00 pm  

Worked great after an initial glitch: On my thumb drive, the geometry is such that 770M only yields 752336 blocks for the FAT16 partition, and that wasn’t quite enough to store everything. I bumped it until it was larger than your value (755672 above) and then everything installed fine. BTW, the “mode” value I removed was also 755, not 775.

Thanks for the excellent instructions. I’ve got you bookmarked!

palombasso
May 12th, 2008 @9:51 pm  

Two points:
1) In the “gedit syslinux.cfg” step, save was not enabled on this file. I did a “chmod +w syslinux.cfg” and then edited and saved it. Is this right?

2) In “sudo cp -rf .disk * /mnt/usb” I get the following:
bruno@bruno-pc:~/hardy-usb$ sudo cp -rf .disk * /mnt/usb
cp: cannot create symbolic link `/mnt/usb/dists/unstable’: Operation not permitted
cp: cannot create symbolic link `/mnt/usb/dists/stable’: Operation not permitted

Is this normal?
Great tutorial anyway.

palombasso
May 12th, 2008 @9:54 pm  

One more I forgot:
In “syslinux -f /dev/sdb1″ I get a Permission Denied, so I did a “sudo syslinux -f /dev/sdb1″. Is it ok to do that? I’m kind of a newbie when it comes to linux…

Thanks again


Noted and how-to updated. Thanks.

palombasso
May 14th, 2008 @6:23 pm  

Can the UbuntuLive be /dev/sdc2 and casper-rw be /dev/sdc3, with /dev/sdc1 being a FAT32 partition for files?

I’d like to use a 8GB Kingston as a bootable persistent ubuntu, but also use it for files in windows. As Windows only sees the first partition of a usb drive that would be a simple solution.

So the drive would be:
/dev/sdc1 5GB FAT32 Files
/dev/sdc2 770MB FAT16 UbuntuLive
/dev/sdc3 1.2GB ext2

Any ideia with that could work? Any extra steps?

Thanks

oldSkool
May 15th, 2008 @6:10 pm  

Thanks for the great tutorial, almost there although i have probably made a mistake somewhere. My USB Boots and runs the Live CD. However when i run keeping the changes to the USB (Persistent mode?) i t stops booting and drops to the command line while trying to set up the RAM Disk. Any Ideas?

Thanks Again

May 15th, 2008 @8:25 pm  

I’m far afield with only my mac and trying to build a hardy live stick from my mac, which is a PPC (no boot camp)

I think I got most of this to work from a PPC Mac with OS X 10.5 (specifically an iBook G4). There are significant nomenclature differences all along the way and I’m still not sure it works because I haven’t figured out how to run syslinux.

*instead of mounting the .iso, I used hdid

*instead of gedit I used TextWrangler and vi.

*the fdisk nomenclature is fairly different, the interactive mode seems to ask questions in a different order, and doesn’t support byte-sector-chs conversions so I had to calculate them, which got a bit confusing for a while, e.g., the fdisk command assigned an arbitrary cylinder-head-sector geometry?!

*OS X uses newfs which replaces mkfs in newer BSD systems; newfs has an entirely different syntax and must be preceded by disklabel. The newfs command is apparently built on top of mkfs, but don’t get your hopes up, you can’t call mkfs directly.

*Finally, again, I haven’t figured out how to run syslinux from this PPC mac. syslinux isn’t available for mac as far as I can tell, even in Fink. I downloaded the package and the readme says it builds in Linux using nasm. If I was running an intel laptop I’d even install hardy on my laptop, but making U-boot for my PPC is, at least for now, a bridge too far. Any suggestions?

May 17th, 2008 @8:52 pm  

Also, correct me if I’m wrong, but I’m pretty sure the initrd_old directory can be removed, as can the unused .tr and .hlp files, yes?

May 18th, 2008 @6:24 pm  

I get an initramfs prompt upon boot… am I missing something? I am using a xubuntu distro but the procedure should be the same right?

Bob
May 19th, 2008 @2:29 pm  

Ryan

A big thank you for you detailed teaching that even a n00b like me can understand and follow through. You have single handedly elevated my Linux skill through the use of CLI like “gunzip” “cpio” etc. Your unselfish share has made the Linux community very solid.
Just a suggestion to n00b like me at every step if you will either do a “ls” or “pwd” to confirm the directory you are supposed to be at. Especially after such “cd ..” command then there won’t be any problem.
As for the dreaded LOOP_SET_FD error just change the directory of the 8.04iso image to somewhere other than where it was then the -o loop command should be dandy.
I have even managed to put a partition on my macbook pro as a persistence and have been enjoying it without having to use another CD. I will try to post the method if anyone is interested. Macintosh are notorious for it EFI being intolerant to other OS.
Thank you again Bryan.

May 19th, 2008 @6:39 pm  

One more question: I seem to be killing thumbdrive filesystems on shutdown. When you shutdown UbuntuLive and it says remove the disk from the tray and press enter, should I remove the thumbdrive and press enter? or leave it in? Any other suggestions?

May 20th, 2008 @3:41 am  

Hi Ryan,
thanks for the helpful description. I combined it with the tutorial at
https://help.ubuntu.com/community/LiveCDCustomization
to get other important packages in. Especially I wanted to have an encrypted casper-rw, which didn’t work out (I gave up). But I stumbled over another problem: having installed cryptsetup, generated a new initrd which is needed while cryptsetup changes init-files everything worked fine until I encrypted the third partition, which is just a spare one, on the thumb. When there exists an encrypted partition, booting will end up in a busybox.
Would be very nice, if you had an idea….

but thanks anyway for the tut!!
Alex

cybereye
May 24th, 2008 @3:45 am  

Thanks for the tute mate. Just a couple of questions - would this work for the DVD ISO also? And how do we make a USB drive that boots both 32 and 64 bit versions of the kernel?

Keep it rollin’

Martin

heri
May 25th, 2008 @10:16 am  

Hello,
I followed the instructions, but when I boot the USB flash drive I got Grub error Stage 1.5.
I read some suggestion to install grub.
If so, can I just add grub or should I install grub first and then repeat the whole installation process ?

Regards,

May 27th, 2008 @8:22 pm  

I dont like using grub. When I goto a computer that has a diff SATA hard drive setup than mine it wont boot, gives grub errors because of device naming I assume. What do I need to do to use syslinux as the bootloader? Until then looks like the guys over at https://launchpad.net/liveusb are getting close to making it easy. Thanx

May 29th, 2008 @6:04 am  

Very great tutorial.

Would you agree me to translate it in french? I would, of course, put a link to your post and clearly explain i just translated it.

Archon
June 6th, 2008 @5:04 am  

I’ve tried installing Ubuntu 8.04 to a persistent USB a few of different ways and each time my laptop boots to a single cursor in the upper left hand corner and which blinks, but nothing other than a reboot will work afterwards.

I’ve successfully booted other linux distros off of the USB drive with this laptop, so I know that isn’t the problem. I would really love to use Ubuntu, though. Should I just try version 7 instead or am I missing something?

I think I’m on attempt number six or seven by now. Partitions look fine and all of the files are copied over. I’ve tried this way, doing it from a LiveCD, doing it from windows. I’m running out of option and all give the same result so far.

pavanux
June 10th, 2008 @5:33 pm  

Hi Ryan,

I have another problem regarding installing Ubuntu 8.04 to an external usb hdd. I was wondering if you could help me. Tell me how to contact you so I can explain my problem.

Many thanx already
Pavan

kalenetus
June 12th, 2008 @3:39 pm  

thanks!
learned a lot.

got stuck in grub on error 21 though. (can’t find grub.conf or even the /boot). makes me feel quite stupid…

i’m trying to do this with xubuntu.

jone
June 18th, 2008 @4:36 pm  

thanks alot :D

talley
June 18th, 2008 @7:23 pm  

Your guide is wonderful for setting this up, but realizing I have another 6-7gb of space on my thumb drive I was wondering if it would be possible to combine several live distro’s into one menu/thumbdrive.

I have separately gotten all three(backtrack3usb, partmagic, ubuntu8.04) to work with syslinux off the thumbdrive, but looking at the individual syslinux.cfg file’s for each I cannot really see much consistency between them aside from file names. This is fairly offtopic for your post so I will understand if you would rather not dip too deeply into my question.

paulpaul
June 27th, 2008 @1:22 pm  

I got it to work with Mint 5 Elysa.

My syslinux.cfg is:

default vesamenu.c32
timeout 100

menu background splash.jpg
menu title Welcome to Linux Mint 5 Elyssa
menu color border 0 #112da323 #00000000
menu color sel 7 #ffffffff #332da323
menu color title 0 #ff2da323 #00000000
menu color tabmsg 0 #ff2da323 #00000000
menu color unsel 0 #ff2da323 #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color timeout_msg 0 #ffffffff #00000000
menu color timeout 0 #ffffffff #00000000
menu color cmdline 0 #ffffffff #00000000
menu hidden
menu hiddenrow 5
label live
menu label Start Linux Mint Persistent
kernel vmlinuz
append file=/preseed/mint.seed boot=casper persistent initrd=initrd.gz quiet splash –
menu default
label xforcevesa
menu label Start Linux Mint in compatibility mode
kernel vmlinuz
append file=/preseed/mint.seed boot=casper xforcevesa persistent initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll –
label memtest
menu label Memory Test
kernel memtest
label local
menu label Boot from local drive
localboot 0×80

The only problems I have so far:
1) The install icon reappears every restart. I deleted it every time.
2) The time never stays in the correct timezone after restart.
3) Cannot get the EnyNG program to install the ATI drivers.

Thanks,

Paul

June 30th, 2008 @4:46 am  

i followed all of the instruction
when i booting i got error message like

“Boot error”

i don’t know what is going on ?

sunlight
July 8th, 2008 @3:26 am  

i always entry BusyBox. Why?

chouf
July 17th, 2008 @3:04 am  

Great tutorial Ryan!

I have one question though: I would like to install Ubuntu on a usb key but on the second partition.
In fact the first partition would be use as a normal usb key (to store data readable by Windows).
Is it possible to do that and is there any limitations?
I heard the boot sector should be in the first 1024 cylinders of the disk. Is that true?

cheers!

montgoej
July 19th, 2008 @8:41 am  

Nice guide. Thanks much. I’m actually writing this comment from the Hardy Live USB Install. Confirmed definitely working on Acer Aspire 3680, Atheros wireless and all.

July 28th, 2008 @8:36 am  

The great tutorial…….
Very nice. Easy to follow and it works….
GOOooooooooo……D

Mike
July 30th, 2008 @6:54 am  

Ryan,
you forgot the MBR.
I tried this a couple of times and couldn’t get past a GRUB error on booting. From pendrivelinux.com I found that the drive needs an MBR to boot, which can be done with “lilo -M /dev/sdX”.
thanks, Mike

August 3rd, 2008 @1:22 pm  

I followed your howto, and my 8gb thumbdrive would not create the partitions. Instead of /dev/sdb1 and /dev/sdb2, it only showed /dev/sdb1p1 and /dev/sdb1p2. I was not able to target these devices when trying to make filesystems. I tried my 4gb drive and it worked like a charm. I am wondering if anyone else came across this and what did you do to get around it? I sure would love to use my 8gb drive as an all around rescue drive, 4gb would not be enough.

Thanks for the how to though, i was about to give up.

Sean

mrnoas
August 8th, 2008 @4:09 am  

Hi, thanks for the info. It worked with my 8GB Nexus thumbdrive, but it ran VERY slow, about 1 hour to load. It works normally after “syslinux -sf /dev/sdb1″; added using option -s for older/stupid bios.

Aesop
August 14th, 2008 @9:35 pm  

I followed the tutorial to the letter but when i get to the last few steps i get these errors and do not know how to fix them.

mills@mills-laptop:~/hardy-usb$ sudo mount /dev/sdb1 /mnt/usb
mount: mount point /mnt/usb does not exist

Any help would be awesome. Thanks in advance.

Aesop


The mount point does not exist. Use the following command to create a mount point:
sudo mkdir /mnt/usb

tomiro
August 22nd, 2008 @9:53 am  

Using syslinux (via dd if=path/to/mbr.bin of=/def/device) to set the MBR is much more efficient and reliable than using: lilo -M /dev/sdx

The GUFI installer uses it for both flash and hard drive installs instead of lilo, which is then not even required to be installed:
http://webpath.net/gufi/support/index.php?wiki=RestoreDisc_Install

Herua Edhil
October 28th, 2008 @7:17 pm  

Hi, I followed the instructions you gave and it works fine.
I want to have another partition to use on Windows, so I resized the existing partitions and create the new one.
Because Windows XP doesn’t recognize any partition but the first one, I changed the partition numbers. The partition table looks like this now:
Device Boot Start End Blocks Id System
/dev/sdd1 1 145 1164681 6 FAT16
/dev/sdd2 * 146 240 763087+ 6 FAT16
/dev/sdd3 241 501 2096482+ 83 Linux

sdd1 is the partition for Windows,
sdd2 is where the Ubuntu Live CD files are,
sdd3 is casper-rw partition.

The problem is that when after I did that changes, I couldn’t boot again.
Here’s the question:
Is there any way to boot using that partition table?
Thanks in advance,

Fernando

PS: Sorry for my bad English

Pingback & Trackback
Pingback from Ubuntu 8.04 Hardy Heron en tu USB « Gabuntu in May 4th, 2008 @1:02 pm  
Leave A Reply

Please Note: Comments maybe under moderation after you submit your comments so there is no need to resubmit your comment again