Linux Mint on a USB Stick

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Linux Mint on a USB Stick

Post by jonpackard »

I have found a way to put the Linux Mint Live CD on a 1GB or larger USB stick. I have been making these for my friends and co-workers and they love them! I was able to play DVDs in live mode from a PC with only one optical drive. It also boots very quickly.

If you're interested in making Linux Mint USB sticks, see this page for a rough start. https://wiki.ubuntu.com/LiveUsbPendrive ... endrive%29

If you have questions about doing this, reply to this post and I will help if I can.

pegazuz
Level 1
Level 1
Posts: 9
Joined: Thu Dec 07, 2006 7:37 pm

Re: Linux Mint on a USB Stick

Post by pegazuz »

jonpackard wrote:I have found a way to put the Linux Mint Live CD on a 1GB or larger USB stick. I have been making these for my friends and co-workers and they love them! I was able to play DVDs in live mode from a PC with only one optical drive. It also boots very quickly.

If you're interested in making Linux Mint USB sticks, see this page for a rough start. https://wiki.ubuntu.com/LiveUsbPendrive ... endrive%29

If you have questions about doing this, reply to this post and I will help if I can.
I think it is great that you could do this but the procedure seems too daunting for some new to linux like myself. I wonder if some one could develop a live CD that will do the install simply like it does it in Puppy Linux. I tried some other linux program installs listed on Pen Drive linux but only Puppy would boot my Acer Laptop. It seems to work pretty good but it would be nice to have some other options.

User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Post by jonpackard »

That would be really great. If someone wrote a script for this, it would not be terribly difficult to implement in a Live CD/DVD. However.. it looks like it would be a very difficult script to write. I tried to make the directions a bit easier to boot Bea on a USB stick in this post: http://lt.k1011.nutime.de/forum/viewtopic.php?t=226. I hope that helps.
Jon Packard -- Linux Mint user since 11/14/2006

User avatar
clem
Level 12
Level 12
Posts: 4141
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Post by clem »

Hi Jon,

You mean run the "live" version from the stick or "install" Mint into a stick and run it from there after that...

for the first option --> Unionfs could be a problem and I'm not sure data would actually be "written" and made permanent on the stick. So you'd have a live session.. running from a stick but your session wouldn't be permanent.

for the second option --> I believe you can just install the normal way.. maybe choose your stick as the target and install grub in that same stick (/dev/sda for instance). If your BIOS can boot from a USB drive it should work (provided it doesn't invert sda and sdb... if that's the case you may want to take out your HDD prior to installing).

Clem

User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Post by jonpackard »

I've had better luck with running the Live mode from USB than installing to USB in the past with Ubuntu. I have not tried a Linux Mint installation on USB yet. Another consideration is disk size. You can use a 1GB live USB stick and still have ~ 300MB free space. Using a persistence partition, it is possible to retain changes to the live system. Installing onto a USB stick would take a LOT more space.. even a 2GB stick might not be sufficient. If you have a USB hard drive on the other hand, it might be a more viable solution to having a protable OS. I might have to try the USB HD install with Linux Mint and see if it's a good option. Right now my Cowon A2 30GB PMP has Bea Live on it, with a 5GB persistence partition. Now if only my fiancee didn't always have it. :roll:
Jon Packard -- Linux Mint user since 11/14/2006

User avatar
clem
Level 12
Level 12
Posts: 4141
Joined: Wed Nov 15, 2006 8:34 am
Contact:

Post by clem »

Is it fast ? I suppose it's faster than with a CD but still.. it's using squashfs..

Clem

User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Post by jonpackard »

Linux Mint on a USB stick can be blazing fast when compared to loading from a CD. It's not a replacement for installing onto a hard drive though.
Jon Packard -- Linux Mint user since 11/14/2006

alleycat

Post by alleycat »

That would be really great. If someone wrote a script for this, it would not be terribly difficult to implement in a Live CD/DVD. However.. it looks like it would be a very difficult script to write. I tried to make the directions a bit easier to boot Bea on a USB stick in this post: http://linuxmint.com/forum/viewtopic.php?t=226. I hope that helps.
this is scriptable afaict. i'm guessing that perhaps the part you feel might be tricky is the fdisk stuff, but that's easily enough done with sfdisk, but perhaps i'm wrong about what the problem would be. i don't see a whole lot of showstoppers in it.

User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Post by jonpackard »

Hi Alleycat. I might look into learning how to script this later. Right now I'm fairly busy putting together the add-on CD for Linux Mint. This would be a major project for me. I don't have much experience writing Linux scripts.
Jon Packard -- Linux Mint user since 11/14/2006

User avatar
theoneghost
Level 1
Level 1
Posts: 31
Joined: Thu Feb 01, 2007 5:28 pm
Location: San Antonio, Texas
Contact:

Tried

Post by theoneghost »

I just did everything that the install guide asked, and as I type, it boots, and seems to be ok. Its going slow, but it seems to be booting up. I just tried using the 2.2 Bianca. I'll keep posting to say if it works.

User avatar
theoneghost
Level 1
Level 1
Posts: 31
Joined: Thu Feb 01, 2007 5:28 pm
Location: San Antonio, Texas
Contact:

Nevermind

Post by theoneghost »

It wouldn't go anywhere after the bootsplash screen. Oh well. I would really like to try and get it working. Does anyone have any ideas?

User avatar
theoneghost
Level 1
Level 1
Posts: 31
Joined: Thu Feb 01, 2007 5:28 pm
Location: San Antonio, Texas
Contact:

Post by theoneghost »

I don't know what happened. It booted after a restart. Everything works! Looks great.

User avatar
theoneghost
Level 1
Level 1
Posts: 31
Joined: Thu Feb 01, 2007 5:28 pm
Location: San Antonio, Texas
Contact:

Post by theoneghost »

I'm currently Installing 2.2 Bianca to my laptop from the thumbdrive. The instructions really worked out great.

random guy
Level 1
Level 1
Posts: 7
Joined: Fri Nov 17, 2006 1:21 am

Post by random guy »

wow ironic i was just working on this yesterday but with another distro + a dvd, by the way i dont have a dvd drive so running a live dvd system from my external hard drive was nice.

by the way i would love an regular isntall since i have 160 gb on my external hard drive. there is a guide to do it + edgy o nthe ubuntu forums but it didnt work for me.

by the way once you do the setup there you wont ever have to do it again for any distro, live cd, isntaller disk. in last 2 days i have tried it out with installer disks and live disks just by copying out the files and all work amazingly easily.

pegazuz
Level 1
Level 1
Posts: 9
Joined: Thu Dec 07, 2006 7:37 pm

Changing distros on external hard drive?

Post by pegazuz »

random guy wrote:wow ironic i was just working on this yesterday but with another distro + a dvd, by the way i dont have a dvd drive so running a live dvd system from my external hard drive was nice.

by the way i would love an regular isntall since i have 160 gb on my external hard drive. there is a guide to do it + edgy o nthe ubuntu forums but it didnt work for me.

by the way once you do the setup there you wont ever have to do it again for any distro, live cd, isntaller disk. in last 2 days i have tried it out with installer disks and live disks just by copying out the files and all work amazingly easily.
Can you expound on the last part? I had Suse 10.2 running off an external hard rive after it installed fine but tried to replace it with Mepis 6.5 and can't get it to boot up at all. Are you installing them to a hard drive or just copying an ISO to hard drive and then running it as an LIVE CD?

mvisconte
Level 1
Level 1
Posts: 5
Joined: Sun Mar 11, 2007 12:43 am
Location: Martini-ville, Mars
Contact:

Time for a Minty USB Install?

Post by mvisconte »

Will one of the succesful and adventurous folks who have a working Mint Bianca usb memory stick install, please document it step-by-step?

I've been struggling with this for over 4 days, and I'm frustrated and giving up.

I have another usb memory stick with a semi-working Mint Bea (semi, because if I have it running for too long, it starts giving me "could not create kio-slave, no room left of device" -- and it's starting to have problems shutting down -- so I am having to force power-off (hard power off) more and more). I did get that one running, based on various "how to's" on the net, but I haven't been successful w/ Mint at all. And I'm getting really frustrated.

I am using a reasonably fast 2G usb stick. I have obtained Bianca, and checked the MD5 sum. Burned a CD that works well, and have tried to apply the same steps from the How Tos... remove partitions, make new partitions, format, install syslinux, etc. I have re-built the stick multiple time, just in case my steps were "off".

I originall figured it was a problem with syslinux.cfg. I have hacked and re-hacked it, and see some of my problems, but I'm beyond that as an issue...

I now get it to START booting, but it still fails, and even hangs requiring the hard-boot. After removing "QUIET" as a boot option, I followed as many of the steps as I could until it choked:

Last statements on screen:
RAMDISK: Compressed image found at block 0.
(a couple of other successful steps about keyboard and net configuration)
RAN OUT OF COMPRESSED DATA
INVALID COMPRESSED FORMAT (err=1)
NO FILESYSTEM COULD MOUNT ROOT, TRIED: CRAMFS
KERNEL PANIC -- NOT SYNCING: VFS: Unable to mount root fs on unknown block (1,0)

Then it just hangs on a blank line. No key combination will break it (Ctrl-Alt-Del, Alt-F2, Ctrl-C, etc.) -- and I have to hard boot.

I followed the standard steps, copying initrt.gz and vmlinuz from Casper to the root dir, copying ISOLINUX contents to root, rename isolinux.cfg, etc.

Does anybody know wx I am supposed to move filesystem.squashfs from Casper to root, or if I need to note it's location in the boot sequence?

Argh.

PLEASE, somebody, put together a step-by-step! It's driving me crazy.

(Lately I've been having poor luck w/ 'puters... my slax usb is hanging on shut down, I over-wrote the first 800M of my laptop as Ext2 because I ASSUMED the the HD would be hda, and the USB would be sda. And I've spent about the last week -- which I was home sick anyway -- wrestling with Bianca. And it wasn't as much fun as I had hoped. ;-) )

User avatar
jonpackard
Level 1
Level 1
Posts: 44
Joined: Mon Nov 27, 2006 5:44 pm
Location: Bradenton, FL, USA

Post by jonpackard »

I haven't experimented with Linux Mint on a USB stick since Bea due to the fact that I do not own a USB stick. That will change this week. As soon as I receive my USB stick, I will start updating my how-to.
Jon Packard -- Linux Mint user since 11/14/2006

mvisconte
Level 1
Level 1
Posts: 5
Joined: Sun Mar 11, 2007 12:43 am
Location: Martini-ville, Mars
Contact:

Minty goodness on the stick

Post by mvisconte »

I hope that a good install method is discovered... just about anything will beat my attempts.

My old (Bea) install is failing, with boot errors, failure to update or install s/w, and hard hangs on shutdown. I think that it's terminal and don't think it will be with us much longer. My attempts at Bianca are much worse, as I haven't gotten a boot yet.

If you are in the market for an inexpensive USB memory stick, most of the office supply stores seem to have sales every other week or so (the four main competitors in our area seem to rotate w/ sales), but MicroCenter has flat-priced sticks. 1G for $10, and 2G for $16. A buddy has been running by and picking up sticks at random - they sell out for some reason.

Some of the early ones were clocking at about 16 MBs -- not great, but much better than my old 512M sticks @ 6 MBs. The 1G I got is a little less... about 10 MBs, but still better than my old sticks or CD -- and, booting w/ "persistent" in the options seems to keep all my changes. MicroCenter ships, and can be found on the web. I haven't been by lately, or else I'd have another one or two for Ubuntu 6.10 and to upgrade my Slax USB. I guess I could put Puppy on one, but Ubuntu and Mint pretty much blow the socks off DSL and while I'm fond of Puppy, Mint's got it beat once we've got USBability and a reasonably quick stick.

I'll dream of Bianca tonight... on a stick.

User avatar
Boo
Level 7
Level 7
Posts: 1634
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

I am going to start scripting this on the weekend.
sounds like fun.
:D
Image
Now where was i going? Oh yes, crazy!

User avatar
imcfused
Level 1
Level 1
Posts: 1
Joined: Sat Mar 31, 2007 8:48 am
Location: US

Mixed Result

Post by imcfused »

Well it took a bit of digging, testing and a late night, but I managed to get this largely working with a minimum amount of changes, but I cannot get my wireless on my IBM T60 work nor can I get the image to shut down cleanly.

I started with the procedure from the first post in this thread. I fairly quickly ran into a wall because of script failure in the initrd image. Copying the vmlinuz kernel out of the casper directly and running it form the root of the USB stick is what caused this failure. To get around this, I used syslinux 3.35 which allowed me to: 1.) keep all of the files in the isolinux directory still in a directory, now name syslinux, and 2.) leave vmlinuz and initrd.gz in casper.

Once I did this, things would boot cleanly but not a lot faster but I ran into the problems that I mentioned early in this note. I think the problem here probably has something to do wth the preseed. Since I am fairly new to Mint/Ubuntu/Debian I am not familiar with this feature. The path in the isolinux.cfg file contains a /cdrom directory that is probably causing failure for me.

Here is a brief procedure that I followed.

My USB stick is a Patriot Memory 2 GB stick.

1. Created partiitions using cfdisk from the Mint Linux LiveCD. fdisk thought the stick was a 1 GB stick and created a partition twice the size needed. First Partition set to FAT16 and 750 MB in size, Second partition EXT2 filling the remaining room.

2. Created MBR using install-mbr

3. Copied all of the LiveCD contents to the first partition.

4. Renamed isolinux directory to syslinux.

5. Renmaed isolinux.cfg to syslinux.cfg

6. Edited syslinux.cfg to add Custom section to boot with persistence enabled. (Also deleted quiet and splash from the append line in this section so that I could see what was going on).

7. Ran syslinux 3.35 (actually from Windows Vista - because it was more convenient that tracking down the Linux package - Mint is currently at 3.11 which doesn't support subdirectories. -- Slay me if you will - I am about getting this to work, not be an elitist -- if I were an elitist, I would be using Mint :)

8. Rebooted and voila, it worked. Oddly enough though, using the generic syslinux caused the initial syslinux splash to be ubuntu and I didn't have a menu. But, I type custom and hit enter and things worked. So apparently Mint custom coded syslinux instead of creating a boot menu using syslinux/isolinux.

I'm taking a break from this for a while, my bruised ego has suffered as much as I can stand it for now. Any additional tips will be appreciated.

Cheerio!

Post Reply

Return to “Tutorials”