Linux Mint on a USB Stick

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
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.
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: 4303
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: 4303
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.
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: 1633
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
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

well here i am running off my 1GB USB mint.
just initial testing of the install procedure.
so i generally followed the instructions from the above link.
1. used gparted to partition and format the USB stick (do not use fdisk!)
partition 1 750MB fat32 and boot flag, partition 2 ext2.
2. copied the files and folders that existed to the USB drive.
3. renamed isolinux.cft to syslinux.cfg and modified the parts that existed as per the instructions.
eg: looks like.
DEFAULT /casper/vmlinuz
GFXBOOT bootlogo
GFXBOOT-BACKGROUND 0x9bcf61
APPEND preseed/file=preseed/ubuntu.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL live
menu label ^Start Linux Mint
kernel vmlinuz
append freseed/file=preseed/ubuntu.seed boot=casper initrd=initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL xforcevesa
menu label Start Linux Mint in safe ^graphics mode
kernel vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper xforcevesa initrd=/casper/initrd.gz ramdisk_size=1048576 root=/dev/ram rw quiet splash --
LABEL hd
menu label ^Boot from first hard disk
localboot 0x80
append -
DISPLAY isolinux.txt
TIMEOUT 300
PROMPT 1
F1 f1.txt
F2 f2.txt
F3 f3.txt
F4 f4.txt
F5 f5.txt
F6 f6.txt
F7 f7.txt
F8 f8.txt
F9 f9.txt
F0 f10.txt

4. had to install syslinux and mtools
sudo apt-get install syslinux mtools
5. run syslinux on USB drive partition 1.
syslinux /dev/sda1
6. Reboot, set bios to boot off USB-HDD. For my machine I have to put USB dirve into a rear USB port and not a front one (it comes off a USB riser) to make it boot off it.
7. This is sweet.
8. work out the cfdisk commands so i can script this.
9. time for bed.

:D
Image
Now where was i going? Oh yes, crazy!
mvisconte
Level 1
Level 1
Posts: 5
Joined: Sun Mar 11, 2007 12:43 am
Location: Martini-ville, Mars
Contact:

Exciting developments...

Post by mvisconte »

Exciting developments...
and I am hoping I get a chance to try it soon. Not too soon, as I am heading for a bad bout of bronchitis, if I don't get some rest... soon.

Bianca, here I come... (probably get Bianca running just in time for the next iteration).

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

Post by jonpackard »

Booting Linux Mint from a USB stick seems kind of hit or miss for me. On my own PC, it fails to boot 90% of the time. I can use it on my PC at work without any problems. I just downloaded SimplyMEPIS 6.5 and tried the USB live install option in the LiveCD and it worked great on my PC. I zipped my Mint USB files (minus the sqaushfs, initrd and vmlinuz) so that I could easily reproduce it. If anyone would like it let me know.. I don't have a place to post it, but I can e-mail it to you.
Jon Packard -- Linux Mint user since 11/14/2006
NiksaVel
Level 5
Level 5
Posts: 782
Joined: Wed Feb 28, 2007 4:06 am
Location: Croatia
Contact:

Post by NiksaVel »

maybe we could get a 1gb USB iso for mint? :D
Windows is extremely fast after a fresh install. If you want to make it stay that way: - don't use it.
-Clem
Post Reply

Return to “Tutorials”