Howto: Install Mint from a USB Pendrive/SD

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
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Howto: Install Mint from a USB Pendrive/SD

Post by Ede » Thu Jun 14, 2007 10:07 pm

Hi, new to the forum. Hi everyone.
This guide is for people who want to install Linux Mint FROM a pendrive, not ON, on computers that boots from USB.

// Silver got it to work with a card-read with a 1 gb SD-card! Props to him! =) //

Today, I thought I should give Mint a try, so I brought forth my old laptop, which hasn't a cd-rom. It can boot from USB (Been meddeling with Ubuntu there.) so I though I should give it a try, but there was no guide here on this forum. Since Mint is related to Ubuntu, I crawled the wiki's and all that on the ubuntu-pages, but the guides there didn't work at all with Mint.
There are some threads here on how to use a pendrive as the main drive for Mint with persistence, but that's not what I want at all, although it's great.

I just wanted to install Mint on my craptop which doesn't have a cd-rom, and I was too lazy to boot up a linux on my regular pc to make the pendrive bootable, so everthing was to be done in Windows. I later edited this guide to include instructions on how to do the same from linux. I used Linux Mint 3.0/3.1-beta.

Anyway, here's what I did and what worked for me. I used a Creative MuVo Tx 1gB for this. The computer must be able to boot from USB.

Step 1: Make the Pendrive bootable.

[Windows]
Format the pen-drive to FAT32. This is done by right-clicking on it in 'My computer' and pressing 'Format'.
Then grab syslinux: http://www.kernel.org/pub/linux/utils/b ... x-3.60.zip
Unzip somewhere, then use the windows command-line. Navigate to the directory where you unzipped Syslinux (I called the folder syslinux), then to the win32-folder inside that folder. Then use the command syslinux -s X: (Whereas X is the drive-letter for the pendrive.)
In my example, since the pendrive had the drive-letter I:

Code: Select all

C:\syslinux\win32\syslinux -s I:
[Linux]
I used the console for this, but you could probably use Gparted aswell.
//Edit by husse/
Gparted is more secure in this case as you can easily see the partitons, their size and so, thus avoiding any mistake
For this just right click the pendrive and that gives you the options to create and format a FAT16 partition//

Anyway, in console, first find the pendrive. sudo fdisk -l will list every mounted thing, see if you can find it. For me, the pendrive was mounted as /dev/sdb1
Then I used sudo fdisk /dev/sdb1
This will start the fdisk-program. A command-prompt will start. First, we must delete any existing partition. Use the letter 'd'. Follow the instructions. Then use the letter 'n', for add a new partision. Make it a primary. Partition number should be 1.
Then use the command 't' to make it a FAT16. Other filesystems should work, but fat16 is a garantee. It's very stable and supported. The hex-code for fat16 is 6, so use that.
Then write it with 'w'.

Now, format the stick. You probably have to unmount it first.

Code: Select all

sudo umount /dev/sdb1
sudo mkfs.vfat -F 16 /dev/sdb1
Now mount it again. It should be clean and stuff.

Install Syslinux and Mtools (sudo apt-get install syslinux mtools) and run the console command:

Code: Select all

sudo syslinux /dev/sdb1
Note: The syslinux apt-get will download is severly outdated!! It took me some time to discover this. >_>
Anyway, download a fresh syslinux here: http://www.kernel.org/pub/linux/utils/b ... .51.tar.gz
Extract it somewhere. I used the desktop, since I only need syslinux for this small operation. Then go console:

Code: Select all

sudo Desktop/syslinux-3.51/unix/syslinux /dev/sdb1
Step 2: Copy the files from the Mint live-cd.

[Windows]
Download the ISO, then open it/mount it. It can be opened and extracted with WinRar or mounted with daemon-tools. Whatever you chose, make sure you copy _every_ file to the pendrive. _Every_ file.
To be 100% sure, mount it, then do the windows-command: xcopy /e /h /k X:\*.* XX: (Whereas the X is the mounted cd-drive and XX is the pendrive. In my case below;

Code: Select all

xcopy /e /h /k h:\*.* i:
This will copy everything. Everything. Yay.

[Linux]
Mount the ISO to a folder. This part is easiest done if you have the iso in your home-folder. It should then suffice do to this:

Code: Select all

mkdir mint
sudo mount LinuxMint-version.iso mint -o loop
Then copy everything to the pendrive using cp.

Code: Select all

sudo cp -r mint/.* /media/cdrom0
I had mounted the pendrive to /media/cdrom0. If you have mounted it somewhere else, use that directory instead. During this process, there will be no progress-bar or something like that, just wait. It takes some time to copy 700mB. It's important to use /.* or it won't copy the hidden files.


Step 3: Edit some files!

[Windows and Linux]
On the pendrive, rename the folder isolinux to syslinux. Very important.
Open that folder, and rename the isolinux.cfg to syslinux.cfg.
In linux you could use the console-command;

Code: Select all

sudo mv /media/cdrom0/isolinux /media/cdrom0/syslinux
sudo mv /media/cdrom0/syslinux/isolinux.cfg /media/cdrom0/syslinux/syslinux.cfg
And that's it! You should now have a bootable Linux Mint on the pendrive you can install from!

The parts here that confused me from the ubuntu-guide was that here, you were supposed to edit the syslinux.cfg and remove every instance of /casper/ and /install/. For somewhat reason, you should NOT edit it at all, just rename. And it works. Actually, me myself used some hours while ripping out my hair trying to figure this out, and in the end I just gave my pc the finger, then just tried with a clean unedited syslinux.cfg since it was the only thing I hadn't tried.

And yeah, this works 100% the same way as the Live CD, so if you just want to test Mint without burning any cd's, this is a good option.

// Updates /
6. September - Added 3.1-beta and colorized Husse's comments.
26. September - Tested with 3.1 final.
3. November - Works with 4.0 beta. Changed the title. Guide is so good it works for every release. :3
13. January - No, this guide is not outdated. It works with Mint 4.0 final too. I removed a part and fixed the syslinux-link. Thanks to those who posted here that the link was dead.//
Last edited by Ede on Sun Jan 13, 2008 5:07 pm, edited 18 times in total.

scorp123
Level 8
Level 8
Posts: 2277
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 » Fri Jun 15, 2007 2:19 pm

And how about writing a version of this guide for people without Windows in the first place?? :roll:

User avatar
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Post by Ede » Fri Jun 15, 2007 8:11 pm

Ah, sure. :) I can do that, now that I have mint running. Just give me some days untill I have free-time for that.

Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Post by Husse » Sat Jun 16, 2007 5:11 am

From Linux needs only minor adjustments. I might try to get it working on my pendrive - before I've not had any success
//edit//hmmm - needs a few more thoughts....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

User avatar
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Post by Ede » Mon Jun 18, 2007 5:31 pm

Finally figured it out. Damn apt-get downloaded an outdated version of syslinux.

The guide now supports linux. Hooray. :) I also did a MC-Hammer dance and fixed some grammar.

User avatar
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Post by Ede » Thu Sep 06, 2007 11:08 am

*bump*

As the guide now supports the new 3.1-beta Celena. =)

carlos
Level 4
Level 4
Posts: 470
Joined: Thu Dec 14, 2006 4:30 pm
Location: USA
Contact:

Post by carlos » Thu Sep 06, 2007 9:44 pm

Ede, you should also add this excellent guide to the wiki. And let us know on the forum when you've updated again.
____________ ________ ______ ____ ___ __ __ _
http://www.designdrifter.com
The Purpose of Life is for DNA to reproduce.

silver
Level 2
Level 2
Posts: 73
Joined: Thu Aug 30, 2007 6:32 pm
Location: Honduras
Contact:

Post by silver » Tue Sep 25, 2007 10:11 pm

dosen't seem to work with multi-card readers and 1gig sd cards.

antone get this to work on a sd card??

Ronnie
Image

User avatar
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Post by Ede » Wed Sep 26, 2007 2:56 pm

I have personally never even heard of anyone booting anything off a card-reader before, and this guide is for USB, since USB is pretty much superior to everything on earth when it comes to versatility.

silver
Level 2
Level 2
Posts: 73
Joined: Thu Aug 30, 2007 6:32 pm
Location: Honduras
Contact:

it works :)

Post by silver » Wed Sep 26, 2007 8:54 pm

I got it to work.

I'm using a usb multi card reader with a 1 gig sd card.

My problem wasn't with the instructions here It was in my cmos setup.

Works great too.

Thanks for the howto.

Ronnie
Image

User avatar
Ede
Level 4
Level 4
Posts: 291
Joined: Thu Jun 14, 2007 7:02 pm
Location: Norway

Post by Ede » Thu Sep 27, 2007 12:02 pm

Wow, awesome. =) I did not now that was possible. Wow.

Great job. I will edit my first post tomorrow, no time today.

User avatar
eagle
Level 1
Level 1
Posts: 31
Joined: Fri Jul 06, 2007 12:22 am

Post by eagle » Sat Oct 27, 2007 2:22 pm

Hey, I was wondering if this would work with the 3.0 Xfce version. I have an old laptop with a trashed CD-R drive, and I don't think it's powerful enough to run Gnome.

User avatar
merlwiz79
Level 8
Level 8
Posts: 2421
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

Post by merlwiz79 » Sat Oct 27, 2007 4:06 pm

eagle wrote:Hey, I was wondering if this would work with the 3.0 Xfce version. I have an old laptop with a trashed CD-R drive, and I don't think it's powerful enough to run Gnome.
I took a quick look and all you would have to change is the iso name in this command:

Code: Select all

sudo mount LinuxMint-3.1.iso mint -o loop
The rest should be the same.
Image

mintmd

Re: Howto: Install Mint from a USB Pendrive/SD

Post by mintmd » Sun Jan 20, 2008 12:26 pm

Hi! I too have a trashed CD-R and was wondering if this would work to install the Debian version? Or I may try the Fluxbox version.

Thanks!

Mdmint

Husse
Level 23
Level 23
Posts: 18701
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Howto: Install Mint from a USB Pendrive/SD

Post by Husse » Sun Jan 20, 2008 1:24 pm

Lock at the post immediately above - I think merlwiz79's advice is valid for all (?) versions except the KDE one as the ISO is large - but with a 2GB stick ....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

smash102
Level 1
Level 1
Posts: 17
Joined: Sun Jan 20, 2008 12:13 am

Re: Howto: Install Mint from a USB Pendrive/SD

Post by smash102 » Mon Jan 21, 2008 12:46 am

I had some trouble following this "How To".
It would have been easier to separate the windows and Linux from each other, have steps 1-3 listed right after each other for each system and not mixed like they are.
The most trouble I had was with the first step.
You had me download the file but I didn't see what it was supposed to do.

I could not get the drive to save files to itself or save any settings I made once the computer booted from the USB drive.

I know that this "How To" was intended to allow someone to install Linux from a USB drive and it does just that. I guess I was hoping for a more permanent OS from this install.

User avatar
merlwiz79
Level 8
Level 8
Posts: 2421
Joined: Wed Apr 04, 2007 1:50 pm
Location: Here again :)

Re: Howto: Install Mint from a USB Pendrive/SD

Post by merlwiz79 » Tue Jan 22, 2008 8:14 pm

smash102 wrote:I had some trouble following this "How To".
It would have been easier to separate the windows and Linux from each other, have steps 1-3 listed right after each other for each system and not mixed like they are.
The most trouble I had was with the first step.
You had me download the file but I didn't see what it was supposed to do.

I could not get the drive to save files to itself or save any settings I made once the computer booted from the USB drive.

I know that this "How To" was intended to allow someone to install Linux from a USB drive and it does just that. I guess I was hoping for a more permanent OS from this install.
This may help you.
http://www.pendrivelinux.com/2007/09/28 ... n-install/
Image

speaker219
Level 2
Level 2
Posts: 56
Joined: Tue Jun 19, 2007 4:54 pm

Re: Howto: Install Mint from a USB Pendrive/SD

Post by speaker219 » Sat Jan 26, 2008 7:59 pm

Just wanted to thank you a lot! The CD/DVD drive in my Laptop computer has a lot of reading problems, and this was both faster, and actually worked! (Large improvement over installing via CD/DVD :wink:)

ca.kushagra
Level 1
Level 1
Posts: 5
Joined: Wed Feb 06, 2008 3:11 am

Re: Howto: Install Mint from a USB Pendrive/SD

Post by ca.kushagra » Thu Feb 07, 2008 12:35 pm

I used this method and also the method at pendrivelinux.com but i get following error
NWhen i booted from the pen drive it went fine till it showed me a black screen similar to dos prompt...some error like:
/etc / resolv.conf : - no such file of directory.
no DHCPOFFER received
Undefined kernel key code for 214, 215, 216, 217

After that I waited and waited nothing happened...can u tell me what to do...to run it...in gui...any commands or tweaking required.

schmolch

Re: Howto: Install Mint from a USB Pendrive/SD

Post by schmolch » Sun Feb 10, 2008 11:02 pm

/.* is the parent folder.

Post Reply

Return to “Tutorials”